1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
|
acons
@c snarfed from alist.c:36
@deffn {Scheme Procedure} acons key value alist
@deffnx {C Function} scm_acons (key, value, alist)
Add a new key-value pair to @var{alist}. A new pair is
created whose car is @var{key} and whose cdr is @var{value}, and the
pair is consed onto @var{alist}, and the new list is returned. This
function is @emph{not} destructive; @var{alist} is not modified.
@end deffn
sloppy-assq
@c snarfed from alist.c:50
@deffn {Scheme Procedure} sloppy-assq key alist
@deffnx {C Function} scm_sloppy_assq (key, alist)
Behaves like @code{assq} but does not do any error checking.
Recommended only for use in Guile internals.
@end deffn
sloppy-assv
@c snarfed from alist.c:68
@deffn {Scheme Procedure} sloppy-assv key alist
@deffnx {C Function} scm_sloppy_assv (key, alist)
Behaves like @code{assv} but does not do any error checking.
Recommended only for use in Guile internals.
@end deffn
sloppy-assoc
@c snarfed from alist.c:86
@deffn {Scheme Procedure} sloppy-assoc key alist
@deffnx {C Function} scm_sloppy_assoc (key, alist)
Behaves like @code{assoc} but does not do any error checking.
Recommended only for use in Guile internals.
@end deffn
assq
@c snarfed from alist.c:113
@deffn {Scheme Procedure} assq key alist
@deffnx {Scheme Procedure} assv key alist
@deffnx {Scheme Procedure} assoc key alist
@deffnx {C Function} scm_assq (key, alist)
Fetch the entry in @var{alist} that is associated with @var{key}. To
decide whether the argument @var{key} matches a particular entry in
@var{alist}, @code{assq} compares keys with @code{eq?}, @code{assv}
uses @code{eqv?} and @code{assoc} uses @code{equal?}. If @var{key}
cannot be found in @var{alist} (according to whichever equality
predicate is in use), then return @code{#f}. These functions
return the entire alist entry found (i.e. both the key and the value).
@end deffn
assv
@c snarfed from alist.c:134
@deffn {Scheme Procedure} assv key alist
@deffnx {C Function} scm_assv (key, alist)
Behaves like @code{assq} but uses @code{eqv?} for key comparison.
@end deffn
assoc
@c snarfed from alist.c:155
@deffn {Scheme Procedure} assoc key alist
@deffnx {C Function} scm_assoc (key, alist)
Behaves like @code{assq} but uses @code{equal?} for key comparison.
@end deffn
assq-ref
@c snarfed from alist.c:199
@deffn {Scheme Procedure} assq-ref alist key
@deffnx {Scheme Procedure} assv-ref alist key
@deffnx {Scheme Procedure} assoc-ref alist key
@deffnx {C Function} scm_assq_ref (alist, key)
Like @code{assq}, @code{assv} and @code{assoc}, except that only the
value associated with @var{key} in @var{alist} is returned. These
functions are equivalent to
@lisp
(let ((ent (@var{associator} @var{key} @var{alist})))
(and ent (cdr ent)))
@end lisp
where @var{associator} is one of @code{assq}, @code{assv} or @code{assoc}.
@end deffn
assv-ref
@c snarfed from alist.c:216
@deffn {Scheme Procedure} assv-ref alist key
@deffnx {C Function} scm_assv_ref (alist, key)
Behaves like @code{assq-ref} but uses @code{eqv?} for key comparison.
@end deffn
assoc-ref
@c snarfed from alist.c:233
@deffn {Scheme Procedure} assoc-ref alist key
@deffnx {C Function} scm_assoc_ref (alist, key)
Behaves like @code{assq-ref} but uses @code{equal?} for key comparison.
@end deffn
assq-set!
@c snarfed from alist.c:262
@deffn {Scheme Procedure} assq-set! alist key val
@deffnx {Scheme Procedure} assv-set! alist key value
@deffnx {Scheme Procedure} assoc-set! alist key value
@deffnx {C Function} scm_assq_set_x (alist, key, val)
Reassociate @var{key} in @var{alist} with @var{value}: find any existing
@var{alist} entry for @var{key} and associate it with the new
@var{value}. If @var{alist} does not contain an entry for @var{key},
add a new one. Return the (possibly new) alist.
These functions do not attempt to verify the structure of @var{alist},
and so may cause unusual results if passed an object that is not an
association list.
@end deffn
assv-set!
@c snarfed from alist.c:280
@deffn {Scheme Procedure} assv-set! alist key val
@deffnx {C Function} scm_assv_set_x (alist, key, val)
Behaves like @code{assq-set!} but uses @code{eqv?} for key comparison.
@end deffn
assoc-set!
@c snarfed from alist.c:298
@deffn {Scheme Procedure} assoc-set! alist key val
@deffnx {C Function} scm_assoc_set_x (alist, key, val)
Behaves like @code{assq-set!} but uses @code{equal?} for key comparison.
@end deffn
assq-remove!
@c snarfed from alist.c:322
@deffn {Scheme Procedure} assq-remove! alist key
@deffnx {Scheme Procedure} assv-remove! alist key
@deffnx {Scheme Procedure} assoc-remove! alist key
@deffnx {C Function} scm_assq_remove_x (alist, key)
Delete the first entry in @var{alist} associated with @var{key}, and return
the resulting alist.
@end deffn
assv-remove!
@c snarfed from alist.c:338
@deffn {Scheme Procedure} assv-remove! alist key
@deffnx {C Function} scm_assv_remove_x (alist, key)
Behaves like @code{assq-remove!} but uses @code{eqv?} for key comparison.
@end deffn
assoc-remove!
@c snarfed from alist.c:354
@deffn {Scheme Procedure} assoc-remove! alist key
@deffnx {C Function} scm_assoc_remove_x (alist, key)
Behaves like @code{assq-remove!} but uses @code{equal?} for key comparison.
@end deffn
make-arbiter
@c snarfed from arbiters.c:99
@deffn {Scheme Procedure} make-arbiter name
@deffnx {C Function} scm_make_arbiter (name)
Return an arbiter object, initially unlocked. Currently
@var{name} is only used for diagnostic output.
@end deffn
try-arbiter
@c snarfed from arbiters.c:116
@deffn {Scheme Procedure} try-arbiter arb
@deffnx {C Function} scm_try_arbiter (arb)
If @var{arb} is unlocked, then lock it and return @code{#t}.
If @var{arb} is already locked, then do nothing and return
@code{#f}.
@end deffn
release-arbiter
@c snarfed from arbiters.c:142
@deffn {Scheme Procedure} release-arbiter arb
@deffnx {C Function} scm_release_arbiter (arb)
If @var{arb} is locked, then unlock it and return @code{#t}.
If @var{arb} is already unlocked, then do nothing and return
@code{#f}.
Typical usage is for the thread which locked an arbiter to
later release it, but that's not required, any thread can
release it.
@end deffn
async
@c snarfed from async.c:97
@deffn {Scheme Procedure} async thunk
@deffnx {C Function} scm_async (thunk)
Create a new async for the procedure @var{thunk}.
@end deffn
async-mark
@c snarfed from async.c:106
@deffn {Scheme Procedure} async-mark a
@deffnx {C Function} scm_async_mark (a)
Mark the async @var{a} for future execution.
@end deffn
run-asyncs
@c snarfed from async.c:117
@deffn {Scheme Procedure} run-asyncs list_of_a
@deffnx {C Function} scm_run_asyncs (list_of_a)
Execute all thunks from the asyncs of the list @var{list_of_a}.
@end deffn
system-async
@c snarfed from async.c:180
@deffn {Scheme Procedure} system-async thunk
@deffnx {C Function} scm_system_async (thunk)
This function is deprecated. You can use @var{thunk} directly
instead of explicitly creating an async object.
@end deffn
system-async-mark
@c snarfed from async.c:296
@deffn {Scheme Procedure} system-async-mark proc [thread]
@deffnx {C Function} scm_system_async_mark_for_thread (proc, thread)
Mark @var{proc} (a procedure with zero arguments) for future execution
in @var{thread}. If @var{proc} has already been marked for
@var{thread} but has not been executed yet, this call has no effect.
If @var{thread} is omitted, the thread that called
@code{system-async-mark} is used.
This procedure is not safe to be called from C signal handlers. Use
@code{scm_sigaction} or @code{scm_sigaction_for_thread} to install
signal handlers.
@end deffn
noop
@c snarfed from async.c:335
@deffn {Scheme Procedure} noop . args
@deffnx {C Function} scm_noop (args)
Do nothing. When called without arguments, return @code{#f},
otherwise return the first argument.
@end deffn
unmask-signals
@c snarfed from async.c:350
@deffn {Scheme Procedure} unmask-signals
@deffnx {C Function} scm_unmask_signals ()
Unmask signals. The returned value is not specified.
@end deffn
mask-signals
@c snarfed from async.c:370
@deffn {Scheme Procedure} mask-signals
@deffnx {C Function} scm_mask_signals ()
Mask signals. The returned value is not specified.
@end deffn
call-with-blocked-asyncs
@c snarfed from async.c:404
@deffn {Scheme Procedure} call-with-blocked-asyncs proc
@deffnx {C Function} scm_call_with_blocked_asyncs (proc)
Call @var{proc} with no arguments and block the execution
of system asyncs by one level for the current thread while
it is running. Return the value returned by @var{proc}.
@end deffn
call-with-unblocked-asyncs
@c snarfed from async.c:430
@deffn {Scheme Procedure} call-with-unblocked-asyncs proc
@deffnx {C Function} scm_call_with_unblocked_asyncs (proc)
Call @var{proc} with no arguments and unblock the execution
of system asyncs by one level for the current thread while
it is running. Return the value returned by @var{proc}.
@end deffn
display-error
@c snarfed from backtrace.c:303
@deffn {Scheme Procedure} display-error stack port subr message args rest
@deffnx {C Function} scm_display_error (stack, port, subr, message, args, rest)
Display an error message to the output port @var{port}.
@var{stack} is the saved stack for the error, @var{subr} is
the name of the procedure in which the error occurred and
@var{message} is the actual error message, which may contain
formatting instructions. These will format the arguments in
the list @var{args} accordingly. @var{rest} is currently
ignored.
@end deffn
display-application
@c snarfed from backtrace.c:425
@deffn {Scheme Procedure} display-application frame [port [indent]]
@deffnx {C Function} scm_display_application (frame, port, indent)
Display a procedure application @var{frame} to the output port
@var{port}. @var{indent} specifies the indentation of the
output.
@end deffn
display-backtrace
@c snarfed from backtrace.c:740
@deffn {Scheme Procedure} display-backtrace stack port [first [depth [highlights]]]
@deffnx {C Function} scm_display_backtrace_with_highlights (stack, port, first, depth, highlights)
Display a backtrace to the output port @var{port}. @var{stack}
is the stack to take the backtrace from, @var{first} specifies
where in the stack to start and @var{depth} how much frames
to display. Both @var{first} and @var{depth} can be @code{#f},
which means that default values will be used.
When @var{highlights} is given,
it should be a list and all members of it are highligthed in
the backtrace.
@end deffn
backtrace
@c snarfed from backtrace.c:776
@deffn {Scheme Procedure} backtrace [highlights]
@deffnx {C Function} scm_backtrace_with_highlights (highlights)
Display a backtrace of the stack saved by the last error
to the current output port. When @var{highlights} is given,
it should be a list and all members of it are highligthed in
the backtrace.
@end deffn
not
@c snarfed from boolean.c:33
@deffn {Scheme Procedure} not x
@deffnx {C Function} scm_not (x)
Return @code{#t} iff @var{x} is @code{#f}, else return @code{#f}.
@end deffn
boolean?
@c snarfed from boolean.c:43
@deffn {Scheme Procedure} boolean? obj
@deffnx {C Function} scm_boolean_p (obj)
Return @code{#t} iff @var{obj} is either @code{#t} or @code{#f}.
@end deffn
char?
@c snarfed from chars.c:33
@deffn {Scheme Procedure} char? x
@deffnx {C Function} scm_char_p (x)
Return @code{#t} iff @var{x} is a character, else @code{#f}.
@end deffn
char=?
@c snarfed from chars.c:42
@deffn {Scheme Procedure} char=? x y
Return @code{#t} iff @var{x} is the same character as @var{y}, else @code{#f}.
@end deffn
char<?
@c snarfed from chars.c:55
@deffn {Scheme Procedure} char<? x y
Return @code{#t} iff @var{x} is less than @var{y} in the ASCII sequence,
else @code{#f}.
@end deffn
char<=?
@c snarfed from chars.c:67
@deffn {Scheme Procedure} char<=? x y
Return @code{#t} iff @var{x} is less than or equal to @var{y} in the
ASCII sequence, else @code{#f}.
@end deffn
char>?
@c snarfed from chars.c:79
@deffn {Scheme Procedure} char>? x y
Return @code{#t} iff @var{x} is greater than @var{y} in the ASCII
sequence, else @code{#f}.
@end deffn
char>=?
@c snarfed from chars.c:91
@deffn {Scheme Procedure} char>=? x y
Return @code{#t} iff @var{x} is greater than or equal to @var{y} in the
ASCII sequence, else @code{#f}.
@end deffn
char-ci=?
@c snarfed from chars.c:103
@deffn {Scheme Procedure} char-ci=? x y
Return @code{#t} iff @var{x} is the same character as @var{y} ignoring
case, else @code{#f}.
@end deffn
char-ci<?
@c snarfed from chars.c:115
@deffn {Scheme Procedure} char-ci<? x y
Return @code{#t} iff @var{x} is less than @var{y} in the ASCII sequence
ignoring case, else @code{#f}.
@end deffn
char-ci<=?
@c snarfed from chars.c:127
@deffn {Scheme Procedure} char-ci<=? x y
Return @code{#t} iff @var{x} is less than or equal to @var{y} in the
ASCII sequence ignoring case, else @code{#f}.
@end deffn
char-ci>?
@c snarfed from chars.c:139
@deffn {Scheme Procedure} char-ci>? x y
Return @code{#t} iff @var{x} is greater than @var{y} in the ASCII
sequence ignoring case, else @code{#f}.
@end deffn
char-ci>=?
@c snarfed from chars.c:151
@deffn {Scheme Procedure} char-ci>=? x y
Return @code{#t} iff @var{x} is greater than or equal to @var{y} in the
ASCII sequence ignoring case, else @code{#f}.
@end deffn
char-alphabetic?
@c snarfed from chars.c:163
@deffn {Scheme Procedure} char-alphabetic? chr
@deffnx {C Function} scm_char_alphabetic_p (chr)
Return @code{#t} iff @var{chr} is alphabetic, else @code{#f}.
@end deffn
char-numeric?
@c snarfed from chars.c:172
@deffn {Scheme Procedure} char-numeric? chr
@deffnx {C Function} scm_char_numeric_p (chr)
Return @code{#t} iff @var{chr} is numeric, else @code{#f}.
@end deffn
char-whitespace?
@c snarfed from chars.c:181
@deffn {Scheme Procedure} char-whitespace? chr
@deffnx {C Function} scm_char_whitespace_p (chr)
Return @code{#t} iff @var{chr} is whitespace, else @code{#f}.
@end deffn
char-upper-case?
@c snarfed from chars.c:192
@deffn {Scheme Procedure} char-upper-case? chr
@deffnx {C Function} scm_char_upper_case_p (chr)
Return @code{#t} iff @var{chr} is uppercase, else @code{#f}.
@end deffn
char-lower-case?
@c snarfed from chars.c:202
@deffn {Scheme Procedure} char-lower-case? chr
@deffnx {C Function} scm_char_lower_case_p (chr)
Return @code{#t} iff @var{chr} is lowercase, else @code{#f}.
@end deffn
char-is-both?
@c snarfed from chars.c:213
@deffn {Scheme Procedure} char-is-both? chr
@deffnx {C Function} scm_char_is_both_p (chr)
Return @code{#t} iff @var{chr} is either uppercase or lowercase, else @code{#f}.
@end deffn
char->integer
@c snarfed from chars.c:228
@deffn {Scheme Procedure} char->integer chr
@deffnx {C Function} scm_char_to_integer (chr)
Return the number corresponding to ordinal position of @var{chr} in the
ASCII sequence.
@end deffn
integer->char
@c snarfed from chars.c:240
@deffn {Scheme Procedure} integer->char n
@deffnx {C Function} scm_integer_to_char (n)
Return the character at position @var{n} in the ASCII sequence.
@end deffn
char-upcase
@c snarfed from chars.c:250
@deffn {Scheme Procedure} char-upcase chr
@deffnx {C Function} scm_char_upcase (chr)
Return the uppercase character version of @var{chr}.
@end deffn
char-downcase
@c snarfed from chars.c:261
@deffn {Scheme Procedure} char-downcase chr
@deffnx {C Function} scm_char_downcase (chr)
Return the lowercase character version of @var{chr}.
@end deffn
with-continuation-barrier
@c snarfed from continuations.c:412
@deffn {Scheme Procedure} with-continuation-barrier proc
@deffnx {C Function} scm_with_continuation_barrier (proc)
Call @var{proc} and return its result. Do not allow the invocation of
continuations that would leave or enter the dynamic extent of the call
to @code{with-continuation-barrier}. Such an attempt causes an error
to be signaled.
Throws (such as errors) that are not caught from within @var{proc} are
caught by @code{with-continuation-barrier}. In that case, a short
message is printed to the current error port and @code{#f} is returned.
Thus, @code{with-continuation-barrier} returns exactly once.
@end deffn
debug-options-interface
@c snarfed from debug.c:54
@deffn {Scheme Procedure} debug-options-interface [setting]
@deffnx {C Function} scm_debug_options (setting)
Option interface for the debug options. Instead of using
this procedure directly, use the procedures @code{debug-enable},
@code{debug-disable}, @code{debug-set!} and @code{debug-options}.
@end deffn
with-traps
@c snarfed from debug.c:101
@deffn {Scheme Procedure} with-traps thunk
@deffnx {C Function} scm_with_traps (thunk)
Call @var{thunk} with traps enabled.
@end deffn
memoized?
@c snarfed from debug.c:139
@deffn {Scheme Procedure} memoized? obj
@deffnx {C Function} scm_memoized_p (obj)
Return @code{#t} if @var{obj} is memoized.
@end deffn
unmemoize-expr
@c snarfed from debug.c:271
@deffn {Scheme Procedure} unmemoize-expr m
@deffnx {C Function} scm_i_unmemoize_expr (m)
Unmemoize the memoized expression @var{m},
@end deffn
memoized-environment
@c snarfed from debug.c:281
@deffn {Scheme Procedure} memoized-environment m
@deffnx {C Function} scm_memoized_environment (m)
Return the environment of the memoized expression @var{m}.
@end deffn
procedure-name
@c snarfed from debug.c:291
@deffn {Scheme Procedure} procedure-name proc
@deffnx {C Function} scm_procedure_name (proc)
Return the name of the procedure @var{proc}
@end deffn
procedure-source
@c snarfed from debug.c:317
@deffn {Scheme Procedure} procedure-source proc
@deffnx {C Function} scm_procedure_source (proc)
Return the source of the procedure @var{proc}.
@end deffn
procedure-environment
@c snarfed from debug.c:374
@deffn {Scheme Procedure} procedure-environment proc
@deffnx {C Function} scm_procedure_environment (proc)
Return the environment of the procedure @var{proc}.
@end deffn
local-eval
@c snarfed from debug.c:406
@deffn {Scheme Procedure} local-eval exp [env]
@deffnx {C Function} scm_local_eval (exp, env)
Evaluate @var{exp} in its environment. If @var{env} is supplied,
it is the environment in which to evaluate @var{exp}. Otherwise,
@var{exp} must be a memoized code object (in which case, its environment
is implicit).
@end deffn
debug-object?
@c snarfed from debug.c:493
@deffn {Scheme Procedure} debug-object? obj
@deffnx {C Function} scm_debug_object_p (obj)
Return @code{#t} if @var{obj} is a debug object.
@end deffn
issue-deprecation-warning
@c snarfed from deprecation.c:99
@deffn {Scheme Procedure} issue-deprecation-warning . msgs
@deffnx {C Function} scm_issue_deprecation_warning (msgs)
Output @var{msgs} to @code{(current-error-port)} when this is the first call to @code{issue-deprecation-warning} with this specific @var{msgs}. Do nothing otherwise. The argument @var{msgs} should be a list of strings; they are printed in turn, each one followed by a newline.
@end deffn
include-deprecated-features
@c snarfed from deprecation.c:144
@deffn {Scheme Procedure} include-deprecated-features
@deffnx {C Function} scm_include_deprecated_features ()
Return @code{#t} iff deprecated features should be included in public interfaces.
@end deffn
substring-move-left!
@c snarfed from deprecated.c:73
@deffn {Scheme Procedure} substring-move-left!
implemented by the C function "scm_substring_move_x"
@end deffn
substring-move-right!
@c snarfed from deprecated.c:75
@deffn {Scheme Procedure} substring-move-right!
implemented by the C function "scm_substring_move_x"
@end deffn
c-registered-modules
@c snarfed from deprecated.c:178
@deffn {Scheme Procedure} c-registered-modules
@deffnx {C Function} scm_registered_modules ()
Return a list of the object code modules that have been imported into
the current Guile process. Each element of the list is a pair whose
car is the name of the module, and whose cdr is the function handle
for that module's initializer function. The name is the string that
has been passed to scm_register_module_xxx.
@end deffn
c-clear-registered-modules
@c snarfed from deprecated.c:199
@deffn {Scheme Procedure} c-clear-registered-modules
@deffnx {C Function} scm_clear_registered_modules ()
Destroy the list of modules registered with the current Guile process.
The return value is unspecified. @strong{Warning:} this function does
not actually unlink or deallocate these modules, but only destroys the
records of which modules have been loaded. It should therefore be used
only by module bookkeeping operations.
@end deffn
close-all-ports-except
@c snarfed from deprecated.c:342
@deffn {Scheme Procedure} close-all-ports-except . ports
@deffnx {C Function} scm_close_all_ports_except (ports)
[DEPRECATED] Close all open file ports used by the interpreter
except for those supplied as arguments. This procedure
was intended to be used before an exec call to close file descriptors
which are not needed in the new process. However it has the
undesirable side effect of flushing buffers, so it's deprecated.
Use port-for-each instead.
@end deffn
variable-set-name-hint!
@c snarfed from deprecated.c:359
@deffn {Scheme Procedure} variable-set-name-hint! var hint
@deffnx {C Function} scm_variable_set_name_hint (var, hint)
Do not use this function.
@end deffn
builtin-variable
@c snarfed from deprecated.c:372
@deffn {Scheme Procedure} builtin-variable name
@deffnx {C Function} scm_builtin_variable (name)
Do not use this function.
@end deffn
sloppy-memq
@c snarfed from deprecated.c:446
@deffn {Scheme Procedure} sloppy-memq x lst
@deffnx {C Function} scm_sloppy_memq (x, lst)
This procedure behaves like @code{memq}, but does no type or error checking.
Its use is recommended only in writing Guile internals,
not for high-level Scheme programs.
@end deffn
sloppy-memv
@c snarfed from deprecated.c:466
@deffn {Scheme Procedure} sloppy-memv x lst
@deffnx {C Function} scm_sloppy_memv (x, lst)
This procedure behaves like @code{memv}, but does no type or error checking.
Its use is recommended only in writing Guile internals,
not for high-level Scheme programs.
@end deffn
sloppy-member
@c snarfed from deprecated.c:486
@deffn {Scheme Procedure} sloppy-member x lst
@deffnx {C Function} scm_sloppy_member (x, lst)
This procedure behaves like @code{member}, but does no type or error checking.
Its use is recommended only in writing Guile internals,
not for high-level Scheme programs.
@end deffn
read-and-eval!
@c snarfed from deprecated.c:508
@deffn {Scheme Procedure} read-and-eval! [port]
@deffnx {C Function} scm_read_and_eval_x (port)
Read a form from @var{port} (standard input by default), and evaluate it
(memoizing it in the process) in the top-level environment. If no data
is left to be read from @var{port}, an @code{end-of-file} error is
signalled.
@end deffn
string->obarray-symbol
@c snarfed from deprecated.c:825
@deffn {Scheme Procedure} string->obarray-symbol o s [softp]
@deffnx {C Function} scm_string_to_obarray_symbol (o, s, softp)
Intern a new symbol in @var{obarray}, a symbol table, with name
@var{string}.
If @var{obarray} is @code{#f}, use the default system symbol table. If
@var{obarray} is @code{#t}, the symbol should not be interned in any
symbol table; merely return the pair (@var{symbol}
. @var{#<undefined>}).
The @var{soft?} argument determines whether new symbol table entries
should be created when the specified symbol is not already present in
@var{obarray}. If @var{soft?} is specified and is a true value, then
new entries should not be added for symbols not already present in the
table; instead, simply return @code{#f}.
@end deffn
intern-symbol
@c snarfed from deprecated.c:863
@deffn {Scheme Procedure} intern-symbol o s
@deffnx {C Function} scm_intern_symbol (o, s)
Add a new symbol to @var{obarray} with name @var{string}, bound to an
unspecified initial value. The symbol table is not modified if a symbol
with this name is already present.
@end deffn
unintern-symbol
@c snarfed from deprecated.c:905
@deffn {Scheme Procedure} unintern-symbol o s
@deffnx {C Function} scm_unintern_symbol (o, s)
Remove the symbol with name @var{string} from @var{obarray}. This
function returns @code{#t} if the symbol was present and @code{#f}
otherwise.
@end deffn
symbol-binding
@c snarfed from deprecated.c:950
@deffn {Scheme Procedure} symbol-binding o s
@deffnx {C Function} scm_symbol_binding (o, s)
Look up in @var{obarray} the symbol whose name is @var{string}, and
return the value to which it is bound. If @var{obarray} is @code{#f},
use the global symbol table. If @var{string} is not interned in
@var{obarray}, an error is signalled.
@end deffn
symbol-bound?
@c snarfed from deprecated.c:1003
@deffn {Scheme Procedure} symbol-bound? o s
@deffnx {C Function} scm_symbol_bound_p (o, s)
Return @code{#t} if @var{obarray} contains a symbol with name
@var{string} bound to a defined value. This differs from
@var{symbol-interned?} in that the mere mention of a symbol
usually causes it to be interned; @code{symbol-bound?}
determines whether a symbol has been given any meaningful
value.
@end deffn
symbol-set!
@c snarfed from deprecated.c:1030
@deffn {Scheme Procedure} symbol-set! o s v
@deffnx {C Function} scm_symbol_set_x (o, s, v)
Find the symbol in @var{obarray} whose name is @var{string}, and rebind
it to @var{value}. An error is signalled if @var{string} is not present
in @var{obarray}.
@end deffn
gentemp
@c snarfed from deprecated.c:1063
@deffn {Scheme Procedure} gentemp [prefix [obarray]]
@deffnx {C Function} scm_gentemp (prefix, obarray)
Create a new symbol with a name unique in an obarray.
The name is constructed from an optional string @var{prefix}
and a counter value. The default prefix is @code{t}. The
@var{obarray} is specified as a second optional argument.
Default is the system obarray where all normal symbols are
interned. The counter is increased by 1 at each
call. There is no provision for resetting the counter.
@end deffn
make-keyword-from-dash-symbol
@c snarfed from discouraged.c:161
@deffn {Scheme Procedure} make-keyword-from-dash-symbol symbol
@deffnx {C Function} scm_make_keyword_from_dash_symbol (symbol)
Make a keyword object from a @var{symbol} that starts with a dash.
@end deffn
keyword-dash-symbol
@c snarfed from discouraged.c:183
@deffn {Scheme Procedure} keyword-dash-symbol keyword
@deffnx {C Function} scm_keyword_dash_symbol (keyword)
Return the dash symbol for @var{keyword}.
This is the inverse of @code{make-keyword-from-dash-symbol}.
@end deffn
dynamic-link
@c snarfed from dynl.c:149
@deffn {Scheme Procedure} dynamic-link filename
@deffnx {C Function} scm_dynamic_link (filename)
Find the shared object (shared library) denoted by
@var{filename} and link it into the running Guile
application. The returned
scheme object is a ``handle'' for the library which can
be passed to @code{dynamic-func}, @code{dynamic-call} etc.
Searching for object files is system dependent. Normally,
if @var{filename} does have an explicit directory it will
be searched for in locations
such as @file{/usr/lib} and @file{/usr/local/lib}.
@end deffn
dynamic-object?
@c snarfed from dynl.c:168
@deffn {Scheme Procedure} dynamic-object? obj
@deffnx {C Function} scm_dynamic_object_p (obj)
Return @code{#t} if @var{obj} is a dynamic object handle,
or @code{#f} otherwise.
@end deffn
dynamic-unlink
@c snarfed from dynl.c:182
@deffn {Scheme Procedure} dynamic-unlink dobj
@deffnx {C Function} scm_dynamic_unlink (dobj)
Unlink a dynamic object from the application, if possible. The
object must have been linked by @code{dynamic-link}, with
@var{dobj} the corresponding handle. After this procedure
is called, the handle can no longer be used to access the
object.
@end deffn
dynamic-func
@c snarfed from dynl.c:207
@deffn {Scheme Procedure} dynamic-func name dobj
@deffnx {C Function} scm_dynamic_func (name, dobj)
Return a ``handle'' for the function @var{name} in the
shared object referred to by @var{dobj}. The handle
can be passed to @code{dynamic-call} to actually
call the function.
Regardless whether your C compiler prepends an underscore
@samp{_} to the global names in a program, you should
@strong{not} include this underscore in @var{name}
since it will be added automatically when necessary.
@end deffn
dynamic-call
@c snarfed from dynl.c:253
@deffn {Scheme Procedure} dynamic-call func dobj
@deffnx {C Function} scm_dynamic_call (func, dobj)
Call a C function in a dynamic object. Two styles of
invocation are supported:
@itemize @bullet
@item @var{func} can be a function handle returned by
@code{dynamic-func}. In this case @var{dobj} is
ignored
@item @var{func} can be a string with the name of the
function to call, with @var{dobj} the handle of the
dynamic object in which to find the function.
This is equivalent to
@smallexample
(dynamic-call (dynamic-func @var{func} @var{dobj}) #f)
@end smallexample
@end itemize
In either case, the function is passed no arguments
and its return value is ignored.
@end deffn
dynamic-args-call
@c snarfed from dynl.c:285
@deffn {Scheme Procedure} dynamic-args-call func dobj args
@deffnx {C Function} scm_dynamic_args_call (func, dobj, args)
Call the C function indicated by @var{func} and @var{dobj},
just like @code{dynamic-call}, but pass it some arguments and
return its return value. The C function is expected to take
two arguments and return an @code{int}, just like @code{main}:
@smallexample
int c_func (int argc, char **argv);
@end smallexample
The parameter @var{args} must be a list of strings and is
converted into an array of @code{char *}. The array is passed
in @var{argv} and its size in @var{argc}. The return value is
converted to a Scheme number and returned from the call to
@code{dynamic-args-call}.
@end deffn
dynamic-wind
@c snarfed from dynwind.c:97
@deffn {Scheme Procedure} dynamic-wind in_guard thunk out_guard
@deffnx {C Function} scm_dynamic_wind (in_guard, thunk, out_guard)
All three arguments must be 0-argument procedures.
@var{in_guard} is called, then @var{thunk}, then
@var{out_guard}.
If, any time during the execution of @var{thunk}, the
continuation of the @code{dynamic_wind} expression is escaped
non-locally, @var{out_guard} is called. If the continuation of
the dynamic-wind is re-entered, @var{in_guard} is called. Thus
@var{in_guard} and @var{out_guard} may be called any number of
times.
@lisp
(define x 'normal-binding)
@result{} x
(define a-cont (call-with-current-continuation
(lambda (escape)
(let ((old-x x))
(dynamic-wind
;; in-guard:
;;
(lambda () (set! x 'special-binding))
;; thunk
;;
(lambda () (display x) (newline)
(call-with-current-continuation escape)
(display x) (newline)
x)
;; out-guard:
;;
(lambda () (set! x old-x)))))))
;; Prints:
special-binding
;; Evaluates to:
@result{} a-cont
x
@result{} normal-binding
(a-cont #f)
;; Prints:
special-binding
;; Evaluates to:
@result{} a-cont ;; the value of the (define a-cont...)
x
@result{} normal-binding
a-cont
@result{} special-binding
@end lisp
@end deffn
environment?
@c snarfed from environments.c:106
@deffn {Scheme Procedure} environment? obj
@deffnx {C Function} scm_environment_p (obj)
Return @code{#t} if @var{obj} is an environment, or @code{#f}
otherwise.
@end deffn
environment-bound?
@c snarfed from environments.c:117
@deffn {Scheme Procedure} environment-bound? env sym
@deffnx {C Function} scm_environment_bound_p (env, sym)
Return @code{#t} if @var{sym} is bound in @var{env}, or
@code{#f} otherwise.
@end deffn
environment-ref
@c snarfed from environments.c:132
@deffn {Scheme Procedure} environment-ref env sym
@deffnx {C Function} scm_environment_ref (env, sym)
Return the value of the location bound to @var{sym} in
@var{env}. If @var{sym} is unbound in @var{env}, signal an
@code{environment:unbound} error.
@end deffn
environment-fold
@c snarfed from environments.c:202
@deffn {Scheme Procedure} environment-fold env proc init
@deffnx {C Function} scm_environment_fold (env, proc, init)
Iterate over all the bindings in @var{env}, accumulating some
value.
For each binding in @var{env}, apply @var{proc} to the symbol
bound, its value, and the result from the previous application
of @var{proc}.
Use @var{init} as @var{proc}'s third argument the first time
@var{proc} is applied.
If @var{env} contains no bindings, this function simply returns
@var{init}.
If @var{env} binds the symbol sym1 to the value val1, sym2 to
val2, and so on, then this procedure computes:
@lisp
(proc sym1 val1
(proc sym2 val2
...
(proc symn valn
init)))
@end lisp
Each binding in @var{env} will be processed exactly once.
@code{environment-fold} makes no guarantees about the order in
which the bindings are processed.
Here is a function which, given an environment, constructs an
association list representing that environment's bindings,
using environment-fold:
@lisp
(define (environment->alist env)
(environment-fold env
(lambda (sym val tail)
(cons (cons sym val) tail))
'()))
@end lisp
@end deffn
environment-define
@c snarfed from environments.c:237
@deffn {Scheme Procedure} environment-define env sym val
@deffnx {C Function} scm_environment_define (env, sym, val)
Bind @var{sym} to a new location containing @var{val} in
@var{env}. If @var{sym} is already bound to another location
in @var{env} and the binding is mutable, that binding is
replaced. The new binding and location are both mutable. The
return value is unspecified.
If @var{sym} is already bound in @var{env}, and the binding is
immutable, signal an @code{environment:immutable-binding} error.
@end deffn
environment-undefine
@c snarfed from environments.c:263
@deffn {Scheme Procedure} environment-undefine env sym
@deffnx {C Function} scm_environment_undefine (env, sym)
Remove any binding for @var{sym} from @var{env}. If @var{sym}
is unbound in @var{env}, do nothing. The return value is
unspecified.
If @var{sym} is already bound in @var{env}, and the binding is
immutable, signal an @code{environment:immutable-binding} error.
@end deffn
environment-set!
@c snarfed from environments.c:291
@deffn {Scheme Procedure} environment-set! env sym val
@deffnx {C Function} scm_environment_set_x (env, sym, val)
If @var{env} binds @var{sym} to some location, change that
location's value to @var{val}. The return value is
unspecified.
If @var{sym} is not bound in @var{env}, signal an
@code{environment:unbound} error. If @var{env} binds @var{sym}
to an immutable location, signal an
@code{environment:immutable-location} error.
@end deffn
environment-cell
@c snarfed from environments.c:326
@deffn {Scheme Procedure} environment-cell env sym for_write
@deffnx {C Function} scm_environment_cell (env, sym, for_write)
Return the value cell which @var{env} binds to @var{sym}, or
@code{#f} if the binding does not live in a value cell.
The argument @var{for-write} indicates whether the caller
intends to modify the variable's value by mutating the value
cell. If the variable is immutable, then
@code{environment-cell} signals an
@code{environment:immutable-location} error.
If @var{sym} is unbound in @var{env}, signal an
@code{environment:unbound} error.
If you use this function, you should consider using
@code{environment-observe}, to be notified when @var{sym} gets
re-bound to a new value cell, or becomes undefined.
@end deffn
environment-observe
@c snarfed from environments.c:378
@deffn {Scheme Procedure} environment-observe env proc
@deffnx {C Function} scm_environment_observe (env, proc)
Whenever @var{env}'s bindings change, apply @var{proc} to
@var{env}.
This function returns an object, token, which you can pass to
@code{environment-unobserve} to remove @var{proc} from the set
of procedures observing @var{env}. The type and value of
token is unspecified.
@end deffn
environment-observe-weak
@c snarfed from environments.c:395
@deffn {Scheme Procedure} environment-observe-weak env proc
@deffnx {C Function} scm_environment_observe_weak (env, proc)
This function is the same as environment-observe, except that
the reference @var{env} retains to @var{proc} is a weak
reference. This means that, if there are no other live,
non-weak references to @var{proc}, it will be
garbage-collected, and dropped from @var{env}'s
list of observing procedures.
@end deffn
environment-unobserve
@c snarfed from environments.c:431
@deffn {Scheme Procedure} environment-unobserve token
@deffnx {C Function} scm_environment_unobserve (token)
Cancel the observation request which returned the value
@var{token}. The return value is unspecified.
If a call @code{(environment-observe env proc)} returns
@var{token}, then the call @code{(environment-unobserve token)}
will cause @var{proc} to no longer be called when @var{env}'s
bindings change.
@end deffn
make-leaf-environment
@c snarfed from environments.c:1017
@deffn {Scheme Procedure} make-leaf-environment
@deffnx {C Function} scm_make_leaf_environment ()
Create a new leaf environment, containing no bindings.
All bindings and locations created in the new environment
will be mutable.
@end deffn
leaf-environment?
@c snarfed from environments.c:1040
@deffn {Scheme Procedure} leaf-environment? object
@deffnx {C Function} scm_leaf_environment_p (object)
Return @code{#t} if object is a leaf environment, or @code{#f}
otherwise.
@end deffn
make-eval-environment
@c snarfed from environments.c:1405
@deffn {Scheme Procedure} make-eval-environment local imported
@deffnx {C Function} scm_make_eval_environment (local, imported)
Return a new environment object eval whose bindings are the
union of the bindings in the environments @var{local} and
@var{imported}, with bindings from @var{local} taking
precedence. Definitions made in eval are placed in @var{local}.
Applying @code{environment-define} or
@code{environment-undefine} to eval has the same effect as
applying the procedure to @var{local}.
Note that eval incorporates @var{local} and @var{imported} by
reference:
If, after creating eval, the program changes the bindings of
@var{local} or @var{imported}, those changes will be visible
in eval.
Since most Scheme evaluation takes place in eval environments,
they transparently cache the bindings received from @var{local}
and @var{imported}. Thus, the first time the program looks up
a symbol in eval, eval may make calls to @var{local} or
@var{imported} to find their bindings, but subsequent
references to that symbol will be as fast as references to
bindings in finite environments.
In typical use, @var{local} will be a finite environment, and
@var{imported} will be an import environment
@end deffn
eval-environment?
@c snarfed from environments.c:1442
@deffn {Scheme Procedure} eval-environment? object
@deffnx {C Function} scm_eval_environment_p (object)
Return @code{#t} if object is an eval environment, or @code{#f}
otherwise.
@end deffn
eval-environment-local
@c snarfed from environments.c:1452
@deffn {Scheme Procedure} eval-environment-local env
@deffnx {C Function} scm_eval_environment_local (env)
Return the local environment of eval environment @var{env}.
@end deffn
eval-environment-set-local!
@c snarfed from environments.c:1464
@deffn {Scheme Procedure} eval-environment-set-local! env local
@deffnx {C Function} scm_eval_environment_set_local_x (env, local)
Change @var{env}'s local environment to @var{local}.
@end deffn
eval-environment-imported
@c snarfed from environments.c:1490
@deffn {Scheme Procedure} eval-environment-imported env
@deffnx {C Function} scm_eval_environment_imported (env)
Return the imported environment of eval environment @var{env}.
@end deffn
eval-environment-set-imported!
@c snarfed from environments.c:1502
@deffn {Scheme Procedure} eval-environment-set-imported! env imported
@deffnx {C Function} scm_eval_environment_set_imported_x (env, imported)
Change @var{env}'s imported environment to @var{imported}.
@end deffn
make-import-environment
@c snarfed from environments.c:1825
@deffn {Scheme Procedure} make-import-environment imports conflict_proc
@deffnx {C Function} scm_make_import_environment (imports, conflict_proc)
Return a new environment @var{imp} whose bindings are the union
of the bindings from the environments in @var{imports};
@var{imports} must be a list of environments. That is,
@var{imp} binds a symbol to a location when some element of
@var{imports} does.
If two different elements of @var{imports} have a binding for
the same symbol, the @var{conflict-proc} is called with the
following parameters: the import environment, the symbol and
the list of the imported environments that bind the symbol.
If the @var{conflict-proc} returns an environment @var{env},
the conflict is considered as resolved and the binding from
@var{env} is used. If the @var{conflict-proc} returns some
non-environment object, the conflict is considered unresolved
and the symbol is treated as unspecified in the import
environment.
The checking for conflicts may be performed lazily, i. e. at
the moment when a value or binding for a certain symbol is
requested instead of the moment when the environment is
created or the bindings of the imports change.
All bindings in @var{imp} are immutable. If you apply
@code{environment-define} or @code{environment-undefine} to
@var{imp}, Guile will signal an
@code{environment:immutable-binding} error. However,
notice that the set of bindings in @var{imp} may still change,
if one of its imported environments changes.
@end deffn
import-environment?
@c snarfed from environments.c:1854
@deffn {Scheme Procedure} import-environment? object
@deffnx {C Function} scm_import_environment_p (object)
Return @code{#t} if object is an import environment, or
@code{#f} otherwise.
@end deffn
import-environment-imports
@c snarfed from environments.c:1865
@deffn {Scheme Procedure} import-environment-imports env
@deffnx {C Function} scm_import_environment_imports (env)
Return the list of environments imported by the import
environment @var{env}.
@end deffn
import-environment-set-imports!
@c snarfed from environments.c:1878
@deffn {Scheme Procedure} import-environment-set-imports! env imports
@deffnx {C Function} scm_import_environment_set_imports_x (env, imports)
Change @var{env}'s list of imported environments to
@var{imports}, and check for conflicts.
@end deffn
make-export-environment
@c snarfed from environments.c:2145
@deffn {Scheme Procedure} make-export-environment private signature
@deffnx {C Function} scm_make_export_environment (private, signature)
Return a new environment @var{exp} containing only those
bindings in private whose symbols are present in
@var{signature}. The @var{private} argument must be an
environment.
The environment @var{exp} binds symbol to location when
@var{env} does, and symbol is exported by @var{signature}.
@var{signature} is a list specifying which of the bindings in
@var{private} should be visible in @var{exp}. Each element of
@var{signature} should be a list of the form:
(symbol attribute ...)
where each attribute is one of the following:
@table @asis
@item the symbol @code{mutable-location}
@var{exp} should treat the
location bound to symbol as mutable. That is, @var{exp}
will pass calls to @code{environment-set!} or
@code{environment-cell} directly through to private.
@item the symbol @code{immutable-location}
@var{exp} should treat
the location bound to symbol as immutable. If the program
applies @code{environment-set!} to @var{exp} and symbol, or
calls @code{environment-cell} to obtain a writable value
cell, @code{environment-set!} will signal an
@code{environment:immutable-location} error. Note that, even
if an export environment treats a location as immutable, the
underlying environment may treat it as mutable, so its
value may change.
@end table
It is an error for an element of signature to specify both
@code{mutable-location} and @code{immutable-location}. If
neither is specified, @code{immutable-location} is assumed.
As a special case, if an element of signature is a lone
symbol @var{sym}, it is equivalent to an element of the form
@code{(sym)}.
All bindings in @var{exp} are immutable. If you apply
@code{environment-define} or @code{environment-undefine} to
@var{exp}, Guile will signal an
@code{environment:immutable-binding} error. However,
notice that the set of bindings in @var{exp} may still change,
if the bindings in private change.
@end deffn
export-environment?
@c snarfed from environments.c:2180
@deffn {Scheme Procedure} export-environment? object
@deffnx {C Function} scm_export_environment_p (object)
Return @code{#t} if object is an export environment, or
@code{#f} otherwise.
@end deffn
export-environment-private
@c snarfed from environments.c:2190
@deffn {Scheme Procedure} export-environment-private env
@deffnx {C Function} scm_export_environment_private (env)
Return the private environment of export environment @var{env}.
@end deffn
export-environment-set-private!
@c snarfed from environments.c:2202
@deffn {Scheme Procedure} export-environment-set-private! env private
@deffnx {C Function} scm_export_environment_set_private_x (env, private)
Change the private environment of export environment @var{env}.
@end deffn
export-environment-signature
@c snarfed from environments.c:2224
@deffn {Scheme Procedure} export-environment-signature env
@deffnx {C Function} scm_export_environment_signature (env)
Return the signature of export environment @var{env}.
@end deffn
export-environment-set-signature!
@c snarfed from environments.c:2298
@deffn {Scheme Procedure} export-environment-set-signature! env signature
@deffnx {C Function} scm_export_environment_set_signature_x (env, signature)
Change the signature of export environment @var{env}.
@end deffn
eq?
@c snarfed from eq.c:81
@deffn {Scheme Procedure} eq? x y
Return @code{#t} if @var{x} and @var{y} are the same object,
except for numbers and characters. For example,
@example
(define x (vector 1 2 3))
(define y (vector 1 2 3))
(eq? x x) @result{} #t
(eq? x y) @result{} #f
@end example
Numbers and characters are not equal to any other object, but
the problem is they're not necessarily @code{eq?} to themselves
either. This is even so when the number comes directly from a
variable,
@example
(let ((n (+ 2 3)))
(eq? n n)) @result{} *unspecified*
@end example
Generally @code{eqv?} should be used when comparing numbers or
characters. @code{=} or @code{char=?} can be used too.
It's worth noting that end-of-list @code{()}, @code{#t},
@code{#f}, a symbol of a given name, and a keyword of a given
name, are unique objects. There's just one of each, so for
instance no matter how @code{()} arises in a program, it's the
same object and can be compared with @code{eq?},
@example
(define x (cdr '(123)))
(define y (cdr '(456)))
(eq? x y) @result{} #t
(define x (string->symbol "foo"))
(eq? x 'foo) @result{} #t
@end example
@end deffn
eqv?
@c snarfed from eq.c:116
@deffn {Scheme Procedure} eqv? x y
Return @code{#t} if @var{x} and @var{y} are the same object, or
for characters and numbers the same value.
On objects except characters and numbers, @code{eqv?} is the
same as @code{eq?}, it's true if @var{x} and @var{y} are the
same object.
If @var{x} and @var{y} are numbers or characters, @code{eqv?}
compares their type and value. An exact number is not
@code{eqv?} to an inexact number (even if their value is the
same).
@example
(eqv? 3 (+ 1 2)) @result{} #t
(eqv? 1 1.0) @result{} #f
@end example
@end deffn
equal?
@c snarfed from eq.c:212
@deffn {Scheme Procedure} equal? x y
Return @code{#t} if @var{x} and @var{y} are the same type, and
their contents or value are equal.
For a pair, string, vector or array, @code{equal?} compares the
contents, and does so using using the same @code{equal?}
recursively, so a deep structure can be traversed.
@example
(equal? (list 1 2 3) (list 1 2 3)) @result{} #t
(equal? (list 1 2 3) (vector 1 2 3)) @result{} #f
@end example
For other objects, @code{equal?} compares as per @code{eqv?},
which means characters and numbers are compared by type and
value (and like @code{eqv?}, exact and inexact numbers are not
@code{equal?}, even if their value is the same).
@example
(equal? 3 (+ 1 2)) @result{} #t
(equal? 1 1.0) @result{} #f
@end example
Hash tables are currently only compared as per @code{eq?}, so
two different tables are not @code{equal?}, even if their
contents are the same.
@code{equal?} does not support circular data structures, it may
go into an infinite loop if asked to compare two circular lists
or similar.
New application-defined object types (Smobs) have an
@code{equalp} handler which is called by @code{equal?}. This
lets an application traverse the contents or control what is
considered @code{equal?} for two such objects. If there's no
handler, the default is to just compare as per @code{eq?}.
@end deffn
scm-error
@c snarfed from error.c:82
@deffn {Scheme Procedure} scm-error key subr message args data
@deffnx {C Function} scm_error_scm (key, subr, message, args, data)
Raise an error with key @var{key}. @var{subr} can be a string
naming the procedure associated with the error, or @code{#f}.
@var{message} is the error message string, possibly containing
@code{~S} and @code{~A} escapes. When an error is reported,
these are replaced by formatting the corresponding members of
@var{args}: @code{~A} (was @code{%s} in older versions of
Guile) formats using @code{display} and @code{~S} (was
@code{%S}) formats using @code{write}. @var{data} is a list or
@code{#f} depending on @var{key}: if @var{key} is
@code{system-error} then it should be a list containing the
Unix @code{errno} value; If @var{key} is @code{signal} then it
should be a list containing the Unix signal number; If
@var{key} is @code{out-of-range} or @code{wrong-type-arg},
it is a list containing the bad value; otherwise
it will usually be @code{#f}.
@end deffn
strerror
@c snarfed from error.c:129
@deffn {Scheme Procedure} strerror err
@deffnx {C Function} scm_strerror (err)
Return the Unix error message corresponding to @var{err}, which
must be an integer value.
@end deffn
apply:nconc2last
@c snarfed from eval.c:4686
@deffn {Scheme Procedure} apply:nconc2last lst
@deffnx {C Function} scm_nconc2last (lst)
Given a list (@var{arg1} @dots{} @var{args}), this function
conses the @var{arg1} @dots{} arguments onto the front of
@var{args}, and returns the resulting list. Note that
@var{args} is a list; thus, the argument to this function is
a list whose last element is a list.
Note: Rather than do new consing, @code{apply:nconc2last}
destroys its argument, so use with care.
@end deffn
force
@c snarfed from eval.c:5598
@deffn {Scheme Procedure} force promise
@deffnx {C Function} scm_force (promise)
If the promise @var{x} has not been computed yet, compute and
return @var{x}, otherwise just return the previously computed
value.
@end deffn
promise?
@c snarfed from eval.c:5621
@deffn {Scheme Procedure} promise? obj
@deffnx {C Function} scm_promise_p (obj)
Return true if @var{obj} is a promise, i.e. a delayed computation
(@pxref{Delayed evaluation,,,r5rs.info,The Revised^5 Report on Scheme}).
@end deffn
cons-source
@c snarfed from eval.c:5633
@deffn {Scheme Procedure} cons-source xorig x y
@deffnx {C Function} scm_cons_source (xorig, x, y)
Create and return a new pair whose car and cdr are @var{x} and @var{y}.
Any source properties associated with @var{xorig} are also associated
with the new pair.
@end deffn
copy-tree
@c snarfed from eval.c:5790
@deffn {Scheme Procedure} copy-tree obj
@deffnx {C Function} scm_copy_tree (obj)
Recursively copy the data tree that is bound to @var{obj}, and return a
the new data structure. @code{copy-tree} recurses down the
contents of both pairs and vectors (since both cons cells and vector
cells may point to arbitrary objects), and stops recursing when it hits
any other object.
@end deffn
primitive-eval
@c snarfed from eval.c:5878
@deffn {Scheme Procedure} primitive-eval exp
@deffnx {C Function} scm_primitive_eval (exp)
Evaluate @var{exp} in the top-level environment specified by
the current module.
@end deffn
eval
@c snarfed from eval.c:5922
@deffn {Scheme Procedure} eval exp module_or_state
@deffnx {C Function} scm_eval (exp, module_or_state)
Evaluate @var{exp}, a list representing a Scheme expression,
in the top-level environment specified by
@var{module_or_state}.
While @var{exp} is evaluated (using @code{primitive-eval}),
@var{module_or_state} is made the current module when
it is a module, or the current dynamic state when it is
a dynamic state.Example: (eval '(+ 1 2) (interaction-environment))
@end deffn
eval-options-interface
@c snarfed from eval.c:3086
@deffn {Scheme Procedure} eval-options-interface [setting]
@deffnx {C Function} scm_eval_options_interface (setting)
Option interface for the evaluation options. Instead of using
this procedure directly, use the procedures @code{eval-enable},
@code{eval-disable}, @code{eval-set!} and @code{eval-options}.
@end deffn
evaluator-traps-interface
@c snarfed from eval.c:3104
@deffn {Scheme Procedure} evaluator-traps-interface [setting]
@deffnx {C Function} scm_evaluator_traps (setting)
Option interface for the evaluator trap options.
@end deffn
defined?
@c snarfed from evalext.c:34
@deffn {Scheme Procedure} defined? sym [env]
@deffnx {C Function} scm_defined_p (sym, env)
Return @code{#t} if @var{sym} is defined in the lexical environment @var{env}. When @var{env} is not specified, look in the top-level environment as defined by the current module.
@end deffn
map-in-order
@c snarfed from evalext.c:80
@deffn {Scheme Procedure} map-in-order
implemented by the C function "scm_map"
@end deffn
self-evaluating?
@c snarfed from evalext.c:85
@deffn {Scheme Procedure} self-evaluating? obj
@deffnx {C Function} scm_self_evaluating_p (obj)
Return #t for objects which Guile considers self-evaluating
@end deffn
load-extension
@c snarfed from extensions.c:143
@deffn {Scheme Procedure} load-extension lib init
@deffnx {C Function} scm_load_extension (lib, init)
Load and initialize the extension designated by LIB and INIT.
When there is no pre-registered function for LIB/INIT, this is
equivalent to
@lisp
(dynamic-call INIT (dynamic-link LIB))
@end lisp
When there is a pre-registered function, that function is called
instead.
Normally, there is no pre-registered function. This option exists
only for situations where dynamic linking is unavailable or unwanted.
In that case, you would statically link your program with the desired
library, and register its init function right after Guile has been
initialized.
LIB should be a string denoting a shared library without any file type
suffix such as ".so". The suffix is provided automatically. It
should also not contain any directory components. Libraries that
implement Guile Extensions should be put into the normal locations for
shared libraries. We recommend to use the naming convention
libguile-bla-blum for a extension related to a module `(bla blum)'.
The normal way for a extension to be used is to write a small Scheme
file that defines a module, and to load the extension into this
module. When the module is auto-loaded, the extension is loaded as
well. For example,
@lisp
(define-module (bla blum))
(load-extension "libguile-bla-blum" "bla_init_blum")
@end lisp
@end deffn
program-arguments
@c snarfed from feature.c:57
@deffn {Scheme Procedure} program-arguments
@deffnx {Scheme Procedure} command-line
@deffnx {C Function} scm_program_arguments ()
Return the list of command line arguments passed to Guile, as a list of
strings. The list includes the invoked program name, which is usually
@code{"guile"}, but excludes switches and parameters for command line
options like @code{-e} and @code{-l}.
@end deffn
make-fluid
@c snarfed from fluids.c:260
@deffn {Scheme Procedure} make-fluid
@deffnx {C Function} scm_make_fluid ()
Return a newly created fluid.
Fluids are objects that can hold one
value per dynamic state. That is, modifications to this value are
only visible to code that executes with the same dynamic state as
the modifying code. When a new dynamic state is constructed, it
inherits the values from its parent. Because each thread normally executes
with its own dynamic state, you can use fluids for thread local storage.
@end deffn
fluid?
@c snarfed from fluids.c:283
@deffn {Scheme Procedure} fluid? obj
@deffnx {C Function} scm_fluid_p (obj)
Return @code{#t} iff @var{obj} is a fluid; otherwise, return
@code{#f}.
@end deffn
fluid-ref
@c snarfed from fluids.c:306
@deffn {Scheme Procedure} fluid-ref fluid
@deffnx {C Function} scm_fluid_ref (fluid)
Return the value associated with @var{fluid} in the current
dynamic root. If @var{fluid} has not been set, then return
@code{#f}.
@end deffn
fluid-set!
@c snarfed from fluids.c:325
@deffn {Scheme Procedure} fluid-set! fluid value
@deffnx {C Function} scm_fluid_set_x (fluid, value)
Set the value associated with @var{fluid} in the current dynamic root.
@end deffn
with-fluids*
@c snarfed from fluids.c:395
@deffn {Scheme Procedure} with-fluids* fluids values thunk
@deffnx {C Function} scm_with_fluids (fluids, values, thunk)
Set @var{fluids} to @var{values} temporary, and call @var{thunk}.
@var{fluids} must be a list of fluids and @var{values} must be the same
number of their values to be applied. Each substitution is done
one after another. @var{thunk} must be a procedure with no argument.
@end deffn
with-fluid*
@c snarfed from fluids.c:434
@deffn {Scheme Procedure} with-fluid* fluid value thunk
@deffnx {C Function} scm_with_fluid (fluid, value, thunk)
Set @var{fluid} to @var{value} temporarily, and call @var{thunk}.
@var{thunk} must be a procedure with no argument.
@end deffn
make-dynamic-state
@c snarfed from fluids.c:487
@deffn {Scheme Procedure} make-dynamic-state [parent]
@deffnx {C Function} scm_make_dynamic_state (parent)
Return a copy of the dynamic state object @var{parent}
or of the current dynamic state when @var{parent} is omitted.
@end deffn
dynamic-state?
@c snarfed from fluids.c:515
@deffn {Scheme Procedure} dynamic-state? obj
@deffnx {C Function} scm_dynamic_state_p (obj)
Return @code{#t} if @var{obj} is a dynamic state object;
return @code{#f} otherwise
@end deffn
current-dynamic-state
@c snarfed from fluids.c:530
@deffn {Scheme Procedure} current-dynamic-state
@deffnx {C Function} scm_current_dynamic_state ()
Return the current dynamic state object.
@end deffn
set-current-dynamic-state
@c snarfed from fluids.c:540
@deffn {Scheme Procedure} set-current-dynamic-state state
@deffnx {C Function} scm_set_current_dynamic_state (state)
Set the current dynamic state object to @var{state}
and return the previous current dynamic state object.
@end deffn
with-dynamic-state
@c snarfed from fluids.c:582
@deffn {Scheme Procedure} with-dynamic-state state proc
@deffnx {C Function} scm_with_dynamic_state (state, proc)
Call @var{proc} while @var{state} is the current dynamic
state object.
@end deffn
setvbuf
@c snarfed from fports.c:137
@deffn {Scheme Procedure} setvbuf port mode [size]
@deffnx {C Function} scm_setvbuf (port, mode, size)
Set the buffering mode for @var{port}. @var{mode} can be:
@table @code
@item _IONBF
non-buffered
@item _IOLBF
line buffered
@item _IOFBF
block buffered, using a newly allocated buffer of @var{size} bytes.
If @var{size} is omitted, a default size will be used.
@end table
@end deffn
file-port?
@c snarfed from fports.c:230
@deffn {Scheme Procedure} file-port? obj
@deffnx {C Function} scm_file_port_p (obj)
Determine whether @var{obj} is a port that is related to a file.
@end deffn
open-file
@c snarfed from fports.c:284
@deffn {Scheme Procedure} open-file filename mode
@deffnx {C Function} scm_open_file (filename, mode)
Open the file whose name is @var{filename}, and return a port
representing that file. The attributes of the port are
determined by the @var{mode} string. The way in which this is
interpreted is similar to C stdio. The first character must be
one of the following:
@table @samp
@item r
Open an existing file for input.
@item w
Open a file for output, creating it if it doesn't already exist
or removing its contents if it does.
@item a
Open a file for output, creating it if it doesn't already
exist. All writes to the port will go to the end of the file.
The "append mode" can be turned off while the port is in use
@pxref{Ports and File Descriptors, fcntl}
@end table
The following additional characters can be appended:
@table @samp
@item +
Open the port for both input and output. E.g., @code{r+}: open
an existing file for both input and output.
@item 0
Create an "unbuffered" port. In this case input and output
operations are passed directly to the underlying port
implementation without additional buffering. This is likely to
slow down I/O operations. The buffering mode can be changed
while a port is in use @pxref{Ports and File Descriptors,
setvbuf}
@item l
Add line-buffering to the port. The port output buffer will be
automatically flushed whenever a newline character is written.
@end table
In theory we could create read/write ports which were buffered
in one direction only. However this isn't included in the
current interfaces. If a file cannot be opened with the access
requested, @code{open-file} throws an exception.
@end deffn
gc-live-object-stats
@c snarfed from gc.c:276
@deffn {Scheme Procedure} gc-live-object-stats
@deffnx {C Function} scm_gc_live_object_stats ()
Return an alist of statistics of the current live objects.
@end deffn
gc-stats
@c snarfed from gc.c:293
@deffn {Scheme Procedure} gc-stats
@deffnx {C Function} scm_gc_stats ()
Return an association list of statistics about Guile's current
use of storage.
@end deffn
object-address
@c snarfed from gc.c:429
@deffn {Scheme Procedure} object-address obj
@deffnx {C Function} scm_object_address (obj)
Return an integer that for the lifetime of @var{obj} is uniquely
returned by this function for @var{obj}
@end deffn
gc
@c snarfed from gc.c:440
@deffn {Scheme Procedure} gc
@deffnx {C Function} scm_gc ()
Scans all of SCM objects and reclaims for further use those that are
no longer accessible.
@end deffn
class-of
@c snarfed from goops.c:166
@deffn {Scheme Procedure} class-of x
@deffnx {C Function} scm_class_of (x)
Return the class of @var{x}.
@end deffn
%compute-slots
@c snarfed from goops.c:407
@deffn {Scheme Procedure} %compute-slots class
@deffnx {C Function} scm_sys_compute_slots (class)
Return a list consisting of the names of all slots belonging to
class @var{class}, i. e. the slots of @var{class} and of all of
its superclasses.
@end deffn
get-keyword
@c snarfed from goops.c:498
@deffn {Scheme Procedure} get-keyword key l default_value
@deffnx {C Function} scm_get_keyword (key, l, default_value)
Determine an associated value for the keyword @var{key} from
the list @var{l}. The list @var{l} has to consist of an even
number of elements, where, starting with the first, every
second element is a keyword, followed by its associated value.
If @var{l} does not hold a value for @var{key}, the value
@var{default_value} is returned.
@end deffn
%initialize-object
@c snarfed from goops.c:521
@deffn {Scheme Procedure} %initialize-object obj initargs
@deffnx {C Function} scm_sys_initialize_object (obj, initargs)
Initialize the object @var{obj} with the given arguments
@var{initargs}.
@end deffn
%prep-layout!
@c snarfed from goops.c:619
@deffn {Scheme Procedure} %prep-layout! class
@deffnx {C Function} scm_sys_prep_layout_x (class)
@end deffn
%inherit-magic!
@c snarfed from goops.c:718
@deffn {Scheme Procedure} %inherit-magic! class dsupers
@deffnx {C Function} scm_sys_inherit_magic_x (class, dsupers)
@end deffn
instance?
@c snarfed from goops.c:958
@deffn {Scheme Procedure} instance? obj
@deffnx {C Function} scm_instance_p (obj)
Return @code{#t} if @var{obj} is an instance.
@end deffn
class-name
@c snarfed from goops.c:973
@deffn {Scheme Procedure} class-name obj
@deffnx {C Function} scm_class_name (obj)
Return the class name of @var{obj}.
@end deffn
class-direct-supers
@c snarfed from goops.c:983
@deffn {Scheme Procedure} class-direct-supers obj
@deffnx {C Function} scm_class_direct_supers (obj)
Return the direct superclasses of the class @var{obj}.
@end deffn
class-direct-slots
@c snarfed from goops.c:993
@deffn {Scheme Procedure} class-direct-slots obj
@deffnx {C Function} scm_class_direct_slots (obj)
Return the direct slots of the class @var{obj}.
@end deffn
class-direct-subclasses
@c snarfed from goops.c:1003
@deffn {Scheme Procedure} class-direct-subclasses obj
@deffnx {C Function} scm_class_direct_subclasses (obj)
Return the direct subclasses of the class @var{obj}.
@end deffn
class-direct-methods
@c snarfed from goops.c:1013
@deffn {Scheme Procedure} class-direct-methods obj
@deffnx {C Function} scm_class_direct_methods (obj)
Return the direct methods of the class @var{obj}
@end deffn
class-precedence-list
@c snarfed from goops.c:1023
@deffn {Scheme Procedure} class-precedence-list obj
@deffnx {C Function} scm_class_precedence_list (obj)
Return the class precedence list of the class @var{obj}.
@end deffn
class-slots
@c snarfed from goops.c:1033
@deffn {Scheme Procedure} class-slots obj
@deffnx {C Function} scm_class_slots (obj)
Return the slot list of the class @var{obj}.
@end deffn
class-environment
@c snarfed from goops.c:1043
@deffn {Scheme Procedure} class-environment obj
@deffnx {C Function} scm_class_environment (obj)
Return the environment of the class @var{obj}.
@end deffn
generic-function-name
@c snarfed from goops.c:1054
@deffn {Scheme Procedure} generic-function-name obj
@deffnx {C Function} scm_generic_function_name (obj)
Return the name of the generic function @var{obj}.
@end deffn
generic-function-methods
@c snarfed from goops.c:1099
@deffn {Scheme Procedure} generic-function-methods obj
@deffnx {C Function} scm_generic_function_methods (obj)
Return the methods of the generic function @var{obj}.
@end deffn
method-generic-function
@c snarfed from goops.c:1112
@deffn {Scheme Procedure} method-generic-function obj
@deffnx {C Function} scm_method_generic_function (obj)
Return the generic function for the method @var{obj}.
@end deffn
method-specializers
@c snarfed from goops.c:1122
@deffn {Scheme Procedure} method-specializers obj
@deffnx {C Function} scm_method_specializers (obj)
Return specializers of the method @var{obj}.
@end deffn
method-procedure
@c snarfed from goops.c:1132
@deffn {Scheme Procedure} method-procedure obj
@deffnx {C Function} scm_method_procedure (obj)
Return the procedure of the method @var{obj}.
@end deffn
accessor-method-slot-definition
@c snarfed from goops.c:1142
@deffn {Scheme Procedure} accessor-method-slot-definition obj
@deffnx {C Function} scm_accessor_method_slot_definition (obj)
Return the slot definition of the accessor @var{obj}.
@end deffn
%tag-body
@c snarfed from goops.c:1152
@deffn {Scheme Procedure} %tag-body body
@deffnx {C Function} scm_sys_tag_body (body)
Internal GOOPS magic---don't use this function!
@end deffn
make-unbound
@c snarfed from goops.c:1167
@deffn {Scheme Procedure} make-unbound
@deffnx {C Function} scm_make_unbound ()
Return the unbound value.
@end deffn
unbound?
@c snarfed from goops.c:1176
@deffn {Scheme Procedure} unbound? obj
@deffnx {C Function} scm_unbound_p (obj)
Return @code{#t} if @var{obj} is unbound.
@end deffn
assert-bound
@c snarfed from goops.c:1186
@deffn {Scheme Procedure} assert-bound value obj
@deffnx {C Function} scm_assert_bound (value, obj)
Return @var{value} if it is bound, and invoke the
@var{slot-unbound} method of @var{obj} if it is not.
@end deffn
@@assert-bound-ref
@c snarfed from goops.c:1198
@deffn {Scheme Procedure} @@assert-bound-ref obj index
@deffnx {C Function} scm_at_assert_bound_ref (obj, index)
Like @code{assert-bound}, but use @var{index} for accessing
the value from @var{obj}.
@end deffn
%fast-slot-ref
@c snarfed from goops.c:1210
@deffn {Scheme Procedure} %fast-slot-ref obj index
@deffnx {C Function} scm_sys_fast_slot_ref (obj, index)
Return the slot value with index @var{index} from @var{obj}.
@end deffn
%fast-slot-set!
@c snarfed from goops.c:1224
@deffn {Scheme Procedure} %fast-slot-set! obj index value
@deffnx {C Function} scm_sys_fast_slot_set_x (obj, index, value)
Set the slot with index @var{index} in @var{obj} to
@var{value}.
@end deffn
slot-ref-using-class
@c snarfed from goops.c:1361
@deffn {Scheme Procedure} slot-ref-using-class class obj slot_name
@deffnx {C Function} scm_slot_ref_using_class (class, obj, slot_name)
@end deffn
slot-set-using-class!
@c snarfed from goops.c:1380
@deffn {Scheme Procedure} slot-set-using-class! class obj slot_name value
@deffnx {C Function} scm_slot_set_using_class_x (class, obj, slot_name, value)
@end deffn
slot-bound-using-class?
@c snarfed from goops.c:1394
@deffn {Scheme Procedure} slot-bound-using-class? class obj slot_name
@deffnx {C Function} scm_slot_bound_using_class_p (class, obj, slot_name)
@end deffn
slot-exists-using-class?
@c snarfed from goops.c:1409
@deffn {Scheme Procedure} slot-exists-using-class? class obj slot_name
@deffnx {C Function} scm_slot_exists_using_class_p (class, obj, slot_name)
@end deffn
slot-ref
@c snarfed from goops.c:1425
@deffn {Scheme Procedure} slot-ref obj slot_name
@deffnx {C Function} scm_slot_ref (obj, slot_name)
Return the value from @var{obj}'s slot with the name
@var{slot_name}.
@end deffn
slot-set!
@c snarfed from goops.c:1442
@deffn {Scheme Procedure} slot-set! obj slot_name value
@deffnx {C Function} scm_slot_set_x (obj, slot_name, value)
Set the slot named @var{slot_name} of @var{obj} to @var{value}.
@end deffn
slot-bound?
@c snarfed from goops.c:1459
@deffn {Scheme Procedure} slot-bound? obj slot_name
@deffnx {C Function} scm_slot_bound_p (obj, slot_name)
Return @code{#t} if the slot named @var{slot_name} of @var{obj}
is bound.
@end deffn
slot-exists?
@c snarfed from goops.c:1477
@deffn {Scheme Procedure} slot-exists? obj slot_name
@deffnx {C Function} scm_slot_exists_p (obj, slot_name)
Return @code{#t} if @var{obj} has a slot named @var{slot_name}.
@end deffn
%allocate-instance
@c snarfed from goops.c:1516
@deffn {Scheme Procedure} %allocate-instance class initargs
@deffnx {C Function} scm_sys_allocate_instance (class, initargs)
Create a new instance of class @var{class} and initialize it
from the arguments @var{initargs}.
@end deffn
%set-object-setter!
@c snarfed from goops.c:1586
@deffn {Scheme Procedure} %set-object-setter! obj setter
@deffnx {C Function} scm_sys_set_object_setter_x (obj, setter)
@end deffn
%modify-instance
@c snarfed from goops.c:1611
@deffn {Scheme Procedure} %modify-instance old new
@deffnx {C Function} scm_sys_modify_instance (old, new)
@end deffn
%modify-class
@c snarfed from goops.c:1637
@deffn {Scheme Procedure} %modify-class old new
@deffnx {C Function} scm_sys_modify_class (old, new)
@end deffn
%invalidate-class
@c snarfed from goops.c:1661
@deffn {Scheme Procedure} %invalidate-class class
@deffnx {C Function} scm_sys_invalidate_class (class)
@end deffn
%invalidate-method-cache!
@c snarfed from goops.c:1783
@deffn {Scheme Procedure} %invalidate-method-cache! gf
@deffnx {C Function} scm_sys_invalidate_method_cache_x (gf)
@end deffn
generic-capability?
@c snarfed from goops.c:1809
@deffn {Scheme Procedure} generic-capability? proc
@deffnx {C Function} scm_generic_capability_p (proc)
@end deffn
enable-primitive-generic!
@c snarfed from goops.c:1822
@deffn {Scheme Procedure} enable-primitive-generic! . subrs
@deffnx {C Function} scm_enable_primitive_generic_x (subrs)
@end deffn
primitive-generic-generic
@c snarfed from goops.c:1843
@deffn {Scheme Procedure} primitive-generic-generic subr
@deffnx {C Function} scm_primitive_generic_generic (subr)
@end deffn
make
@c snarfed from goops.c:2209
@deffn {Scheme Procedure} make . args
@deffnx {C Function} scm_make (args)
Make a new object. @var{args} must contain the class and
all necessary initialization information.
@end deffn
find-method
@c snarfed from goops.c:2298
@deffn {Scheme Procedure} find-method . l
@deffnx {C Function} scm_find_method (l)
@end deffn
%method-more-specific?
@c snarfed from goops.c:2318
@deffn {Scheme Procedure} %method-more-specific? m1 m2 targs
@deffnx {C Function} scm_sys_method_more_specific_p (m1, m2, targs)
Return true if method @var{m1} is more specific than @var{m2} given the argument types (classes) listed in @var{targs}.
@end deffn
%goops-loaded
@c snarfed from goops.c:2944
@deffn {Scheme Procedure} %goops-loaded
@deffnx {C Function} scm_sys_goops_loaded ()
Announce that GOOPS is loaded and perform initialization
on the C level which depends on the loaded GOOPS modules.
@end deffn
make-guardian
@c snarfed from guardians.c:307
@deffn {Scheme Procedure} make-guardian [greedy_p]
@deffnx {C Function} scm_make_guardian (greedy_p)
Create a new guardian.
A guardian protects a set of objects from garbage collection,
allowing a program to apply cleanup or other actions.
@code{make-guardian} returns a procedure representing the guardian.
Calling the guardian procedure with an argument adds the
argument to the guardian's set of protected objects.
Calling the guardian procedure without an argument returns
one of the protected objects which are ready for garbage
collection, or @code{#f} if no such object is available.
Objects which are returned in this way are removed from
the guardian.
@code{make-guardian} takes one optional argument that says whether the
new guardian should be greedy or sharing. If there is any chance
that any object protected by the guardian may be resurrected,
then you should make the guardian greedy (this is the default).
See R. Kent Dybvig, Carl Bruggeman, and David Eby (1993)
"Guardians in a Generation-Based Garbage Collector".
ACM SIGPLAN Conference on Programming Language Design
and Implementation, June 1993.
(the semantics are slightly different at this point, but the
paper still (mostly) accurately describes the interface).
@end deffn
guardian-destroyed?
@c snarfed from guardians.c:335
@deffn {Scheme Procedure} guardian-destroyed? guardian
@deffnx {C Function} scm_guardian_destroyed_p (guardian)
Return @code{#t} if @var{guardian} has been destroyed, otherwise @code{#f}.
@end deffn
guardian-greedy?
@c snarfed from guardians.c:353
@deffn {Scheme Procedure} guardian-greedy? guardian
@deffnx {C Function} scm_guardian_greedy_p (guardian)
Return @code{#t} if @var{guardian} is a greedy guardian, otherwise @code{#f}.
@end deffn
destroy-guardian!
@c snarfed from guardians.c:364
@deffn {Scheme Procedure} destroy-guardian! guardian
@deffnx {C Function} scm_destroy_guardian_x (guardian)
Destroys @var{guardian}, by making it impossible to put any more
objects in it or get any objects from it. It also unguards any
objects guarded by @var{guardian}.
@end deffn
hashq
@c snarfed from hash.c:183
@deffn {Scheme Procedure} hashq key size
@deffnx {C Function} scm_hashq (key, size)
Determine a hash value for @var{key} that is suitable for
lookups in a hashtable of size @var{size}, where @code{eq?} is
used as the equality predicate. The function returns an
integer in the range 0 to @var{size} - 1. Note that
@code{hashq} may use internal addresses. Thus two calls to
hashq where the keys are @code{eq?} are not guaranteed to
deliver the same value if the key object gets garbage collected
in between. This can happen, for example with symbols:
@code{(hashq 'foo n) (gc) (hashq 'foo n)} may produce two
different values, since @code{foo} will be garbage collected.
@end deffn
hashv
@c snarfed from hash.c:219
@deffn {Scheme Procedure} hashv key size
@deffnx {C Function} scm_hashv (key, size)
Determine a hash value for @var{key} that is suitable for
lookups in a hashtable of size @var{size}, where @code{eqv?} is
used as the equality predicate. The function returns an
integer in the range 0 to @var{size} - 1. Note that
@code{(hashv key)} may use internal addresses. Thus two calls
to hashv where the keys are @code{eqv?} are not guaranteed to
deliver the same value if the key object gets garbage collected
in between. This can happen, for example with symbols:
@code{(hashv 'foo n) (gc) (hashv 'foo n)} may produce two
different values, since @code{foo} will be garbage collected.
@end deffn
hash
@c snarfed from hash.c:242
@deffn {Scheme Procedure} hash key size
@deffnx {C Function} scm_hash (key, size)
Determine a hash value for @var{key} that is suitable for
lookups in a hashtable of size @var{size}, where @code{equal?}
is used as the equality predicate. The function returns an
integer in the range 0 to @var{size} - 1.
@end deffn
make-hash-table
@c snarfed from hashtab.c:332
@deffn {Scheme Procedure} make-hash-table [n]
@deffnx {C Function} scm_make_hash_table (n)
Make a new abstract hash table object with minimum number of buckets @var{n}
@end deffn
make-weak-key-hash-table
@c snarfed from hashtab.c:349
@deffn {Scheme Procedure} make-weak-key-hash-table [n]
@deffnx {Scheme Procedure} make-weak-value-hash-table size
@deffnx {Scheme Procedure} make-doubly-weak-hash-table size
@deffnx {C Function} scm_make_weak_key_hash_table (n)
Return a weak hash table with @var{size} buckets.
You can modify weak hash tables in exactly the same way you
would modify regular hash tables. (@pxref{Hash Tables})
@end deffn
make-weak-value-hash-table
@c snarfed from hashtab.c:364
@deffn {Scheme Procedure} make-weak-value-hash-table [n]
@deffnx {C Function} scm_make_weak_value_hash_table (n)
Return a hash table with weak values with @var{size} buckets.
(@pxref{Hash Tables})
@end deffn
make-doubly-weak-hash-table
@c snarfed from hashtab.c:381
@deffn {Scheme Procedure} make-doubly-weak-hash-table n
@deffnx {C Function} scm_make_doubly_weak_hash_table (n)
Return a hash table with weak keys and values with @var{size}
buckets. (@pxref{Hash Tables})
@end deffn
hash-table?
@c snarfed from hashtab.c:400
@deffn {Scheme Procedure} hash-table? obj
@deffnx {C Function} scm_hash_table_p (obj)
Return @code{#t} if @var{obj} is an abstract hash table object.
@end deffn
weak-key-hash-table?
@c snarfed from hashtab.c:414
@deffn {Scheme Procedure} weak-key-hash-table? obj
@deffnx {Scheme Procedure} weak-value-hash-table? obj
@deffnx {Scheme Procedure} doubly-weak-hash-table? obj
@deffnx {C Function} scm_weak_key_hash_table_p (obj)
Return @code{#t} if @var{obj} is the specified weak hash
table. Note that a doubly weak hash table is neither a weak key
nor a weak value hash table.
@end deffn
weak-value-hash-table?
@c snarfed from hashtab.c:424
@deffn {Scheme Procedure} weak-value-hash-table? obj
@deffnx {C Function} scm_weak_value_hash_table_p (obj)
Return @code{#t} if @var{obj} is a weak value hash table.
@end deffn
doubly-weak-hash-table?
@c snarfed from hashtab.c:434
@deffn {Scheme Procedure} doubly-weak-hash-table? obj
@deffnx {C Function} scm_doubly_weak_hash_table_p (obj)
Return @code{#t} if @var{obj} is a doubly weak hash table.
@end deffn
hash-clear!
@c snarfed from hashtab.c:586
@deffn {Scheme Procedure} hash-clear! table
@deffnx {C Function} scm_hash_clear_x (table)
Remove all items from @var{table} (without triggering a resize).
@end deffn
hashq-get-handle
@c snarfed from hashtab.c:607
@deffn {Scheme Procedure} hashq-get-handle table key
@deffnx {C Function} scm_hashq_get_handle (table, key)
This procedure returns the @code{(key . value)} pair from the
hash table @var{table}. If @var{table} does not hold an
associated value for @var{key}, @code{#f} is returned.
Uses @code{eq?} for equality testing.
@end deffn
hashq-create-handle!
@c snarfed from hashtab.c:619
@deffn {Scheme Procedure} hashq-create-handle! table key init
@deffnx {C Function} scm_hashq_create_handle_x (table, key, init)
This function looks up @var{key} in @var{table} and returns its handle.
If @var{key} is not already present, a new handle is created which
associates @var{key} with @var{init}.
@end deffn
hashq-ref
@c snarfed from hashtab.c:632
@deffn {Scheme Procedure} hashq-ref table key [dflt]
@deffnx {C Function} scm_hashq_ref (table, key, dflt)
Look up @var{key} in the hash table @var{table}, and return the
value (if any) associated with it. If @var{key} is not found,
return @var{default} (or @code{#f} if no @var{default} argument
is supplied). Uses @code{eq?} for equality testing.
@end deffn
hashq-set!
@c snarfed from hashtab.c:646
@deffn {Scheme Procedure} hashq-set! table key val
@deffnx {C Function} scm_hashq_set_x (table, key, val)
Find the entry in @var{table} associated with @var{key}, and
store @var{value} there. Uses @code{eq?} for equality testing.
@end deffn
hashq-remove!
@c snarfed from hashtab.c:658
@deffn {Scheme Procedure} hashq-remove! table key
@deffnx {C Function} scm_hashq_remove_x (table, key)
Remove @var{key} (and any value associated with it) from
@var{table}. Uses @code{eq?} for equality tests.
@end deffn
hashv-get-handle
@c snarfed from hashtab.c:673
@deffn {Scheme Procedure} hashv-get-handle table key
@deffnx {C Function} scm_hashv_get_handle (table, key)
This procedure returns the @code{(key . value)} pair from the
hash table @var{table}. If @var{table} does not hold an
associated value for @var{key}, @code{#f} is returned.
Uses @code{eqv?} for equality testing.
@end deffn
hashv-create-handle!
@c snarfed from hashtab.c:685
@deffn {Scheme Procedure} hashv-create-handle! table key init
@deffnx {C Function} scm_hashv_create_handle_x (table, key, init)
This function looks up @var{key} in @var{table} and returns its handle.
If @var{key} is not already present, a new handle is created which
associates @var{key} with @var{init}.
@end deffn
hashv-ref
@c snarfed from hashtab.c:699
@deffn {Scheme Procedure} hashv-ref table key [dflt]
@deffnx {C Function} scm_hashv_ref (table, key, dflt)
Look up @var{key} in the hash table @var{table}, and return the
value (if any) associated with it. If @var{key} is not found,
return @var{default} (or @code{#f} if no @var{default} argument
is supplied). Uses @code{eqv?} for equality testing.
@end deffn
hashv-set!
@c snarfed from hashtab.c:713
@deffn {Scheme Procedure} hashv-set! table key val
@deffnx {C Function} scm_hashv_set_x (table, key, val)
Find the entry in @var{table} associated with @var{key}, and
store @var{value} there. Uses @code{eqv?} for equality testing.
@end deffn
hashv-remove!
@c snarfed from hashtab.c:724
@deffn {Scheme Procedure} hashv-remove! table key
@deffnx {C Function} scm_hashv_remove_x (table, key)
Remove @var{key} (and any value associated with it) from
@var{table}. Uses @code{eqv?} for equality tests.
@end deffn
hash-get-handle
@c snarfed from hashtab.c:738
@deffn {Scheme Procedure} hash-get-handle table key
@deffnx {C Function} scm_hash_get_handle (table, key)
This procedure returns the @code{(key . value)} pair from the
hash table @var{table}. If @var{table} does not hold an
associated value for @var{key}, @code{#f} is returned.
Uses @code{equal?} for equality testing.
@end deffn
hash-create-handle!
@c snarfed from hashtab.c:750
@deffn {Scheme Procedure} hash-create-handle! table key init
@deffnx {C Function} scm_hash_create_handle_x (table, key, init)
This function looks up @var{key} in @var{table} and returns its handle.
If @var{key} is not already present, a new handle is created which
associates @var{key} with @var{init}.
@end deffn
hash-ref
@c snarfed from hashtab.c:763
@deffn {Scheme Procedure} hash-ref table key [dflt]
@deffnx {C Function} scm_hash_ref (table, key, dflt)
Look up @var{key} in the hash table @var{table}, and return the
value (if any) associated with it. If @var{key} is not found,
return @var{default} (or @code{#f} if no @var{default} argument
is supplied). Uses @code{equal?} for equality testing.
@end deffn
hash-set!
@c snarfed from hashtab.c:778
@deffn {Scheme Procedure} hash-set! table key val
@deffnx {C Function} scm_hash_set_x (table, key, val)
Find the entry in @var{table} associated with @var{key}, and
store @var{value} there. Uses @code{equal?} for equality
testing.
@end deffn
hash-remove!
@c snarfed from hashtab.c:790
@deffn {Scheme Procedure} hash-remove! table key
@deffnx {C Function} scm_hash_remove_x (table, key)
Remove @var{key} (and any value associated with it) from
@var{table}. Uses @code{equal?} for equality tests.
@end deffn
hashx-get-handle
@c snarfed from hashtab.c:831
@deffn {Scheme Procedure} hashx-get-handle hash assoc table key
@deffnx {C Function} scm_hashx_get_handle (hash, assoc, table, key)
This behaves the same way as the corresponding
@code{-get-handle} function, but uses @var{hash} as a hash
function and @var{assoc} to compare keys. @code{hash} must be
a function that takes two arguments, a key to be hashed and a
table size. @code{assoc} must be an associator function, like
@code{assoc}, @code{assq} or @code{assv}.
@end deffn
hashx-create-handle!
@c snarfed from hashtab.c:850
@deffn {Scheme Procedure} hashx-create-handle! hash assoc table key init
@deffnx {C Function} scm_hashx_create_handle_x (hash, assoc, table, key, init)
This behaves the same way as the corresponding
@code{-create-handle} function, but uses @var{hash} as a hash
function and @var{assoc} to compare keys. @code{hash} must be
a function that takes two arguments, a key to be hashed and a
table size. @code{assoc} must be an associator function, like
@code{assoc}, @code{assq} or @code{assv}.
@end deffn
hashx-ref
@c snarfed from hashtab.c:873
@deffn {Scheme Procedure} hashx-ref hash assoc table key [dflt]
@deffnx {C Function} scm_hashx_ref (hash, assoc, table, key, dflt)
This behaves the same way as the corresponding @code{ref}
function, but uses @var{hash} as a hash function and
@var{assoc} to compare keys. @code{hash} must be a function
that takes two arguments, a key to be hashed and a table size.
@code{assoc} must be an associator function, like @code{assoc},
@code{assq} or @code{assv}.
By way of illustration, @code{hashq-ref table key} is
equivalent to @code{hashx-ref hashq assq table key}.
@end deffn
hashx-set!
@c snarfed from hashtab.c:899
@deffn {Scheme Procedure} hashx-set! hash assoc table key val
@deffnx {C Function} scm_hashx_set_x (hash, assoc, table, key, val)
This behaves the same way as the corresponding @code{set!}
function, but uses @var{hash} as a hash function and
@var{assoc} to compare keys. @code{hash} must be a function
that takes two arguments, a key to be hashed and a table size.
@code{assoc} must be an associator function, like @code{assoc},
@code{assq} or @code{assv}.
By way of illustration, @code{hashq-set! table key} is
equivalent to @code{hashx-set! hashq assq table key}.
@end deffn
hashx-remove!
@c snarfed from hashtab.c:920
@deffn {Scheme Procedure} hashx-remove! hash assoc table obj
@deffnx {C Function} scm_hashx_remove_x (hash, assoc, table, obj)
This behaves the same way as the corresponding @code{remove!}
function, but uses @var{hash} as a hash function and
@var{assoc} to compare keys. @code{hash} must be a function
that takes two arguments, a key to be hashed and a table size.
@code{assoc} must be an associator function, like @code{assoc},
@code{assq} or @code{assv}.
By way of illustration, @code{hashq-remove! table key} is
equivalent to @code{hashx-remove! hashq assq #f table key}.
@end deffn
hash-fold
@c snarfed from hashtab.c:1009
@deffn {Scheme Procedure} hash-fold proc init table
@deffnx {C Function} scm_hash_fold (proc, init, table)
An iterator over hash-table elements.
Accumulates and returns a result by applying PROC successively.
The arguments to PROC are "(key value prior-result)" where key
and value are successive pairs from the hash table TABLE, and
prior-result is either INIT (for the first application of PROC)
or the return value of the previous application of PROC.
For example, @code{(hash-fold acons '() tab)} will convert a hash
table into an a-list of key-value pairs.
@end deffn
hash-for-each
@c snarfed from hashtab.c:1030
@deffn {Scheme Procedure} hash-for-each proc table
@deffnx {C Function} scm_hash_for_each (proc, table)
An iterator over hash-table elements.
Applies PROC successively on all hash table items.
The arguments to PROC are "(key value)" where key
and value are successive pairs from the hash table TABLE.
@end deffn
hash-for-each-handle
@c snarfed from hashtab.c:1047
@deffn {Scheme Procedure} hash-for-each-handle proc table
@deffnx {C Function} scm_hash_for_each_handle (proc, table)
An iterator over hash-table elements.
Applies PROC successively on all hash table handles.
@end deffn
hash-map->list
@c snarfed from hashtab.c:1073
@deffn {Scheme Procedure} hash-map->list proc table
@deffnx {C Function} scm_hash_map_to_list (proc, table)
An iterator over hash-table elements.
Accumulates and returns as a list the results of applying PROC successively.
The arguments to PROC are "(key value)" where key
and value are successive pairs from the hash table TABLE.
@end deffn
make-hook
@c snarfed from hooks.c:154
@deffn {Scheme Procedure} make-hook [n_args]
@deffnx {C Function} scm_make_hook (n_args)
Create a hook for storing procedure of arity @var{n_args}.
@var{n_args} defaults to zero. The returned value is a hook
object to be used with the other hook procedures.
@end deffn
hook?
@c snarfed from hooks.c:171
@deffn {Scheme Procedure} hook? x
@deffnx {C Function} scm_hook_p (x)
Return @code{#t} if @var{x} is a hook, @code{#f} otherwise.
@end deffn
hook-empty?
@c snarfed from hooks.c:182
@deffn {Scheme Procedure} hook-empty? hook
@deffnx {C Function} scm_hook_empty_p (hook)
Return @code{#t} if @var{hook} is an empty hook, @code{#f}
otherwise.
@end deffn
add-hook!
@c snarfed from hooks.c:196
@deffn {Scheme Procedure} add-hook! hook proc [append_p]
@deffnx {C Function} scm_add_hook_x (hook, proc, append_p)
Add the procedure @var{proc} to the hook @var{hook}. The
procedure is added to the end if @var{append_p} is true,
otherwise it is added to the front. The return value of this
procedure is not specified.
@end deffn
remove-hook!
@c snarfed from hooks.c:223
@deffn {Scheme Procedure} remove-hook! hook proc
@deffnx {C Function} scm_remove_hook_x (hook, proc)
Remove the procedure @var{proc} from the hook @var{hook}. The
return value of this procedure is not specified.
@end deffn
reset-hook!
@c snarfed from hooks.c:237
@deffn {Scheme Procedure} reset-hook! hook
@deffnx {C Function} scm_reset_hook_x (hook)
Remove all procedures from the hook @var{hook}. The return
value of this procedure is not specified.
@end deffn
run-hook
@c snarfed from hooks.c:251
@deffn {Scheme Procedure} run-hook hook . args
@deffnx {C Function} scm_run_hook (hook, args)
Apply all procedures from the hook @var{hook} to the arguments
@var{args}. The order of the procedure application is first to
last. The return value of this procedure is not specified.
@end deffn
hook->list
@c snarfed from hooks.c:278
@deffn {Scheme Procedure} hook->list hook
@deffnx {C Function} scm_hook_to_list (hook)
Convert the procedure list of @var{hook} to a list.
@end deffn
gettext
@c snarfed from i18n.c:90
@deffn {Scheme Procedure} gettext msgid [domain [category]]
@deffnx {C Function} scm_gettext (msgid, domain, category)
Return the translation of @var{msgid} in the message domain @var{domain}. @var{domain} is optional and defaults to the domain set through (textdomain). @var{category} is optional and defaults to LC_MESSAGES.
@end deffn
ngettext
@c snarfed from i18n.c:146
@deffn {Scheme Procedure} ngettext msgid msgid_plural n [domain [category]]
@deffnx {C Function} scm_ngettext (msgid, msgid_plural, n, domain, category)
Return the translation of @var{msgid}/@var{msgid_plural} in the message domain @var{domain}, with the plural form being chosen appropriately for the number @var{n}. @var{domain} is optional and defaults to the domain set through (textdomain). @var{category} is optional and defaults to LC_MESSAGES.
@end deffn
textdomain
@c snarfed from i18n.c:209
@deffn {Scheme Procedure} textdomain [domainname]
@deffnx {C Function} scm_textdomain (domainname)
If optional parameter @var{domainname} is supplied, set the textdomain. Return the textdomain.
@end deffn
bindtextdomain
@c snarfed from i18n.c:241
@deffn {Scheme Procedure} bindtextdomain domainname [directory]
@deffnx {C Function} scm_bindtextdomain (domainname, directory)
If optional parameter @var{directory} is supplied, set message catalogs to directory @var{directory}. Return the directory bound to @var{domainname}.
@end deffn
bind-textdomain-codeset
@c snarfed from i18n.c:280
@deffn {Scheme Procedure} bind-textdomain-codeset domainname [encoding]
@deffnx {C Function} scm_bind_textdomain_codeset (domainname, encoding)
If optional parameter @var{encoding} is supplied, set encoding for message catalogs of @var{domainname}. Return the encoding of @var{domainname}.
@end deffn
ftell
@c snarfed from ioext.c:54
@deffn {Scheme Procedure} ftell fd_port
@deffnx {C Function} scm_ftell (fd_port)
Return an integer representing the current position of
@var{fd/port}, measured from the beginning. Equivalent to:
@lisp
(seek port 0 SEEK_CUR)
@end lisp
@end deffn
redirect-port
@c snarfed from ioext.c:72
@deffn {Scheme Procedure} redirect-port old new
@deffnx {C Function} scm_redirect_port (old, new)
This procedure takes two ports and duplicates the underlying file
descriptor from @var{old-port} into @var{new-port}. The
current file descriptor in @var{new-port} will be closed.
After the redirection the two ports will share a file position
and file status flags.
The return value is unspecified.
Unexpected behaviour can result if both ports are subsequently used
and the original and/or duplicate ports are buffered.
This procedure does not have any side effects on other ports or
revealed counts.
@end deffn
dup->fdes
@c snarfed from ioext.c:111
@deffn {Scheme Procedure} dup->fdes fd_or_port [fd]
@deffnx {C Function} scm_dup_to_fdes (fd_or_port, fd)
Return a new integer file descriptor referring to the open file
designated by @var{fd_or_port}, which must be either an open
file port or a file descriptor.
@end deffn
dup2
@c snarfed from ioext.c:158
@deffn {Scheme Procedure} dup2 oldfd newfd
@deffnx {C Function} scm_dup2 (oldfd, newfd)
A simple wrapper for the @code{dup2} system call.
Copies the file descriptor @var{oldfd} to descriptor
number @var{newfd}, replacing the previous meaning
of @var{newfd}. Both @var{oldfd} and @var{newfd} must
be integers.
Unlike for dup->fdes or primitive-move->fdes, no attempt
is made to move away ports which are using @var{newfd}.
The return value is unspecified.
@end deffn
fileno
@c snarfed from ioext.c:177
@deffn {Scheme Procedure} fileno port
@deffnx {C Function} scm_fileno (port)
Return the integer file descriptor underlying @var{port}. Does
not change its revealed count.
@end deffn
isatty?
@c snarfed from ioext.c:197
@deffn {Scheme Procedure} isatty? port
@deffnx {C Function} scm_isatty_p (port)
Return @code{#t} if @var{port} is using a serial non--file
device, otherwise @code{#f}.
@end deffn
fdopen
@c snarfed from ioext.c:219
@deffn {Scheme Procedure} fdopen fdes modes
@deffnx {C Function} scm_fdopen (fdes, modes)
Return a new port based on the file descriptor @var{fdes}.
Modes are given by the string @var{modes}. The revealed count
of the port is initialized to zero. The modes string is the
same as that accepted by @ref{File Ports, open-file}.
@end deffn
primitive-move->fdes
@c snarfed from ioext.c:241
@deffn {Scheme Procedure} primitive-move->fdes port fd
@deffnx {C Function} scm_primitive_move_to_fdes (port, fd)
Moves the underlying file descriptor for @var{port} to the integer
value @var{fdes} without changing the revealed count of @var{port}.
Any other ports already using this descriptor will be automatically
shifted to new descriptors and their revealed counts reset to zero.
The return value is @code{#f} if the file descriptor already had the
required value or @code{#t} if it was moved.
@end deffn
fdes->ports
@c snarfed from ioext.c:274
@deffn {Scheme Procedure} fdes->ports fd
@deffnx {C Function} scm_fdes_to_ports (fd)
Return a list of existing ports which have @var{fdes} as an
underlying file descriptor, without changing their revealed
counts.
@end deffn
keyword?
@c snarfed from keywords.c:52
@deffn {Scheme Procedure} keyword? obj
@deffnx {C Function} scm_keyword_p (obj)
Return @code{#t} if the argument @var{obj} is a keyword, else
@code{#f}.
@end deffn
symbol->keyword
@c snarfed from keywords.c:61
@deffn {Scheme Procedure} symbol->keyword symbol
@deffnx {C Function} scm_symbol_to_keyword (symbol)
Return the keyword with the same name as @var{symbol}.
@end deffn
keyword->symbol
@c snarfed from keywords.c:82
@deffn {Scheme Procedure} keyword->symbol keyword
@deffnx {C Function} scm_keyword_to_symbol (keyword)
Return the symbol with the same name as @var{keyword}.
@end deffn
list
@c snarfed from list.c:104
@deffn {Scheme Procedure} list . objs
@deffnx {C Function} scm_list (objs)
Return a list containing @var{objs}, the arguments to
@code{list}.
@end deffn
cons*
@c snarfed from list.c:119
@deffn {Scheme Procedure} cons* arg . rest
@deffnx {C Function} scm_cons_star (arg, rest)
Like @code{list}, but the last arg provides the tail of the
constructed list, returning @code{(cons @var{arg1} (cons
@var{arg2} (cons @dots{} @var{argn})))}. Requires at least one
argument. If given one argument, that argument is returned as
result. This function is called @code{list*} in some other
Schemes and in Common LISP.
@end deffn
null?
@c snarfed from list.c:143
@deffn {Scheme Procedure} null? x
@deffnx {C Function} scm_null_p (x)
Return @code{#t} iff @var{x} is the empty list, else @code{#f}.
@end deffn
list?
@c snarfed from list.c:153
@deffn {Scheme Procedure} list? x
@deffnx {C Function} scm_list_p (x)
Return @code{#t} iff @var{x} is a proper list, else @code{#f}.
@end deffn
length
@c snarfed from list.c:194
@deffn {Scheme Procedure} length lst
@deffnx {C Function} scm_length (lst)
Return the number of elements in list @var{lst}.
@end deffn
append
@c snarfed from list.c:223
@deffn {Scheme Procedure} append . args
@deffnx {C Function} scm_append (args)
Return a list consisting of the elements the lists passed as
arguments.
@lisp
(append '(x) '(y)) @result{} (x y)
(append '(a) '(b c d)) @result{} (a b c d)
(append '(a (b)) '((c))) @result{} (a (b) (c))
@end lisp
The resulting list is always newly allocated, except that it
shares structure with the last list argument. The last
argument may actually be any object; an improper list results
if the last argument is not a proper list.
@lisp
(append '(a b) '(c . d)) @result{} (a b c . d)
(append '() 'a) @result{} a
@end lisp
@end deffn
append!
@c snarfed from list.c:259
@deffn {Scheme Procedure} append! . lists
@deffnx {C Function} scm_append_x (lists)
A destructive version of @code{append} (@pxref{Pairs and
Lists,,,r5rs, The Revised^5 Report on Scheme}). The cdr field
of each list's final pair is changed to point to the head of
the next list, so no consing is performed. Return
the mutated list.
@end deffn
last-pair
@c snarfed from list.c:291
@deffn {Scheme Procedure} last-pair lst
@deffnx {C Function} scm_last_pair (lst)
Return the last pair in @var{lst}, signalling an error if
@var{lst} is circular.
@end deffn
reverse
@c snarfed from list.c:321
@deffn {Scheme Procedure} reverse lst
@deffnx {C Function} scm_reverse (lst)
Return a new list that contains the elements of @var{lst} but
in reverse order.
@end deffn
reverse!
@c snarfed from list.c:355
@deffn {Scheme Procedure} reverse! lst [new_tail]
@deffnx {C Function} scm_reverse_x (lst, new_tail)
A destructive version of @code{reverse} (@pxref{Pairs and Lists,,,r5rs,
The Revised^5 Report on Scheme}). The cdr of each cell in @var{lst} is
modified to point to the previous list element. Return the
reversed list.
Caveat: because the list is modified in place, the tail of the original
list now becomes its head, and the head of the original list now becomes
the tail. Therefore, the @var{lst} symbol to which the head of the
original list was bound now points to the tail. To ensure that the head
of the modified list is not lost, it is wise to save the return value of
@code{reverse!}
@end deffn
list-ref
@c snarfed from list.c:381
@deffn {Scheme Procedure} list-ref list k
@deffnx {C Function} scm_list_ref (list, k)
Return the @var{k}th element from @var{list}.
@end deffn
list-set!
@c snarfed from list.c:405
@deffn {Scheme Procedure} list-set! list k val
@deffnx {C Function} scm_list_set_x (list, k, val)
Set the @var{k}th element of @var{list} to @var{val}.
@end deffn
list-cdr-ref
@c snarfed from list.c:427
@deffn {Scheme Procedure} list-cdr-ref
implemented by the C function "scm_list_tail"
@end deffn
list-tail
@c snarfed from list.c:436
@deffn {Scheme Procedure} list-tail lst k
@deffnx {Scheme Procedure} list-cdr-ref lst k
@deffnx {C Function} scm_list_tail (lst, k)
Return the "tail" of @var{lst} beginning with its @var{k}th element.
The first element of the list is considered to be element 0.
@code{list-tail} and @code{list-cdr-ref} are identical. It may help to
think of @code{list-cdr-ref} as accessing the @var{k}th cdr of the list,
or returning the results of cdring @var{k} times down @var{lst}.
@end deffn
list-cdr-set!
@c snarfed from list.c:451
@deffn {Scheme Procedure} list-cdr-set! list k val
@deffnx {C Function} scm_list_cdr_set_x (list, k, val)
Set the @var{k}th cdr of @var{list} to @var{val}.
@end deffn
list-head
@c snarfed from list.c:479
@deffn {Scheme Procedure} list-head lst k
@deffnx {C Function} scm_list_head (lst, k)
Copy the first @var{k} elements from @var{lst} into a new list, and
return it.
@end deffn
list-copy
@c snarfed from list.c:530
@deffn {Scheme Procedure} list-copy lst
@deffnx {C Function} scm_list_copy (lst)
Return a (newly-created) copy of @var{lst}.
@end deffn
memq
@c snarfed from list.c:584
@deffn {Scheme Procedure} memq x lst
@deffnx {C Function} scm_memq (x, lst)
Return the first sublist of @var{lst} whose car is @code{eq?}
to @var{x} where the sublists of @var{lst} are the non-empty
lists returned by @code{(list-tail @var{lst} @var{k})} for
@var{k} less than the length of @var{lst}. If @var{x} does not
occur in @var{lst}, then @code{#f} (not the empty list) is
returned.
@end deffn
memv
@c snarfed from list.c:600
@deffn {Scheme Procedure} memv x lst
@deffnx {C Function} scm_memv (x, lst)
Return the first sublist of @var{lst} whose car is @code{eqv?}
to @var{x} where the sublists of @var{lst} are the non-empty
lists returned by @code{(list-tail @var{lst} @var{k})} for
@var{k} less than the length of @var{lst}. If @var{x} does not
occur in @var{lst}, then @code{#f} (not the empty list) is
returned.
@end deffn
member
@c snarfed from list.c:621
@deffn {Scheme Procedure} member x lst
@deffnx {C Function} scm_member (x, lst)
Return the first sublist of @var{lst} whose car is
@code{equal?} to @var{x} where the sublists of @var{lst} are
the non-empty lists returned by @code{(list-tail @var{lst}
@var{k})} for @var{k} less than the length of @var{lst}. If
@var{x} does not occur in @var{lst}, then @code{#f} (not the
empty list) is returned.
@end deffn
delq!
@c snarfed from list.c:646
@deffn {Scheme Procedure} delq! item lst
@deffnx {Scheme Procedure} delv! item lst
@deffnx {Scheme Procedure} delete! item lst
@deffnx {C Function} scm_delq_x (item, lst)
These procedures are destructive versions of @code{delq}, @code{delv}
and @code{delete}: they modify the existing @var{lst}
rather than creating a new list. Caveat evaluator: Like other
destructive list functions, these functions cannot modify the binding of
@var{lst}, and so cannot be used to delete the first element of
@var{lst} destructively.
@end deffn
delv!
@c snarfed from list.c:670
@deffn {Scheme Procedure} delv! item lst
@deffnx {C Function} scm_delv_x (item, lst)
Destructively remove all elements from @var{lst} that are
@code{eqv?} to @var{item}.
@end deffn
delete!
@c snarfed from list.c:695
@deffn {Scheme Procedure} delete! item lst
@deffnx {C Function} scm_delete_x (item, lst)
Destructively remove all elements from @var{lst} that are
@code{equal?} to @var{item}.
@end deffn
delq
@c snarfed from list.c:724
@deffn {Scheme Procedure} delq item lst
@deffnx {C Function} scm_delq (item, lst)
Return a newly-created copy of @var{lst} with elements
@code{eq?} to @var{item} removed. This procedure mirrors
@code{memq}: @code{delq} compares elements of @var{lst} against
@var{item} with @code{eq?}.
@end deffn
delv
@c snarfed from list.c:737
@deffn {Scheme Procedure} delv item lst
@deffnx {C Function} scm_delv (item, lst)
Return a newly-created copy of @var{lst} with elements
@code{eqv?} to @var{item} removed. This procedure mirrors
@code{memv}: @code{delv} compares elements of @var{lst} against
@var{item} with @code{eqv?}.
@end deffn
delete
@c snarfed from list.c:750
@deffn {Scheme Procedure} delete item lst
@deffnx {C Function} scm_delete (item, lst)
Return a newly-created copy of @var{lst} with elements
@code{equal?} to @var{item} removed. This procedure mirrors
@code{member}: @code{delete} compares elements of @var{lst}
against @var{item} with @code{equal?}.
@end deffn
delq1!
@c snarfed from list.c:763
@deffn {Scheme Procedure} delq1! item lst
@deffnx {C Function} scm_delq1_x (item, lst)
Like @code{delq!}, but only deletes the first occurrence of
@var{item} from @var{lst}. Tests for equality using
@code{eq?}. See also @code{delv1!} and @code{delete1!}.
@end deffn
delv1!
@c snarfed from list.c:791
@deffn {Scheme Procedure} delv1! item lst
@deffnx {C Function} scm_delv1_x (item, lst)
Like @code{delv!}, but only deletes the first occurrence of
@var{item} from @var{lst}. Tests for equality using
@code{eqv?}. See also @code{delq1!} and @code{delete1!}.
@end deffn
delete1!
@c snarfed from list.c:819
@deffn {Scheme Procedure} delete1! item lst
@deffnx {C Function} scm_delete1_x (item, lst)
Like @code{delete!}, but only deletes the first occurrence of
@var{item} from @var{lst}. Tests for equality using
@code{equal?}. See also @code{delq1!} and @code{delv1!}.
@end deffn
filter
@c snarfed from list.c:851
@deffn {Scheme Procedure} filter pred list
@deffnx {C Function} scm_filter (pred, list)
Return all the elements of 2nd arg @var{list} that satisfy predicate @var{pred}.
The list is not disordered -- elements that appear in the result list occur
in the same order as they occur in the argument list. The returned list may
share a common tail with the argument list. The dynamic order in which the
various applications of pred are made is not specified.
@lisp
(filter even? '(0 7 8 8 43 -4)) => (0 8 8 -4)
@end lisp
@end deffn
filter!
@c snarfed from list.c:878
@deffn {Scheme Procedure} filter! pred list
@deffnx {C Function} scm_filter_x (pred, list)
Linear-update variant of @code{filter}.
@end deffn
primitive-load
@c snarfed from load.c:72
@deffn {Scheme Procedure} primitive-load filename
@deffnx {C Function} scm_primitive_load (filename)
Load the file named @var{filename} and evaluate its contents in
the top-level environment. The load paths are not searched;
@var{filename} must either be a full pathname or be a pathname
relative to the current directory. If the variable
@code{%load-hook} is defined, it should be bound to a procedure
that will be called before any code is loaded. See the
documentation for @code{%load-hook} later in this section.
@end deffn
%package-data-dir
@c snarfed from load.c:117
@deffn {Scheme Procedure} %package-data-dir
@deffnx {C Function} scm_sys_package_data_dir ()
Return the name of the directory where Scheme packages, modules and
libraries are kept. On most Unix systems, this will be
@samp{/usr/local/share/guile}.
@end deffn
%library-dir
@c snarfed from load.c:129
@deffn {Scheme Procedure} %library-dir
@deffnx {C Function} scm_sys_library_dir ()
Return the directory where the Guile Scheme library files are installed.
E.g., may return "/usr/share/guile/1.3.5".
@end deffn
%site-dir
@c snarfed from load.c:141
@deffn {Scheme Procedure} %site-dir
@deffnx {C Function} scm_sys_site_dir ()
Return the directory where the Guile site files are installed.
E.g., may return "/usr/share/guile/site".
@end deffn
parse-path
@c snarfed from load.c:166
@deffn {Scheme Procedure} parse-path path [tail]
@deffnx {C Function} scm_parse_path (path, tail)
Parse @var{path}, which is expected to be a colon-separated
string, into a list and return the resulting list with
@var{tail} appended. If @var{path} is @code{#f}, @var{tail}
is returned.
@end deffn
search-path
@c snarfed from load.c:293
@deffn {Scheme Procedure} search-path path filename [extensions]
@deffnx {C Function} scm_search_path (path, filename, extensions)
Search @var{path} for a directory containing a file named
@var{filename}. The file must be readable, and not a directory.
If we find one, return its full filename; otherwise, return
@code{#f}. If @var{filename} is absolute, return it unchanged.
If given, @var{extensions} is a list of strings; for each
directory in @var{path}, we search for @var{filename}
concatenated with each @var{extension}.
@end deffn
%search-load-path
@c snarfed from load.c:430
@deffn {Scheme Procedure} %search-load-path filename
@deffnx {C Function} scm_sys_search_load_path (filename)
Search @var{%load-path} for the file named @var{filename},
which must be readable by the current user. If @var{filename}
is found in the list of paths to search or is an absolute
pathname, return its full pathname. Otherwise, return
@code{#f}. Filenames may have any of the optional extensions
in the @code{%load-extensions} list; @code{%search-load-path}
will try each extension automatically.
@end deffn
primitive-load-path
@c snarfed from load.c:451
@deffn {Scheme Procedure} primitive-load-path filename
@deffnx {C Function} scm_primitive_load_path (filename)
Search @var{%load-path} for the file named @var{filename} and
load it into the top-level environment. If @var{filename} is a
relative pathname and is not found in the list of search paths,
an error is signalled.
@end deffn
procedure->memoizing-macro
@c snarfed from macros.c:109
@deffn {Scheme Procedure} procedure->memoizing-macro code
@deffnx {C Function} scm_makmmacro (code)
Return a @dfn{macro} which, when a symbol defined to this value
appears as the first symbol in an expression, evaluates the
result of applying @var{code} to the expression and the
environment.
@code{procedure->memoizing-macro} is the same as
@code{procedure->macro}, except that the expression returned by
@var{code} replaces the original macro expression in the memoized
form of the containing code.
@end deffn
procedure->syntax
@c snarfed from macros.c:123
@deffn {Scheme Procedure} procedure->syntax code
@deffnx {C Function} scm_makacro (code)
Return a @dfn{macro} which, when a symbol defined to this value
appears as the first symbol in an expression, returns the
result of applying @var{code} to the expression and the
environment.
@end deffn
procedure->macro
@c snarfed from macros.c:146
@deffn {Scheme Procedure} procedure->macro code
@deffnx {C Function} scm_makmacro (code)
Return a @dfn{macro} which, when a symbol defined to this value
appears as the first symbol in an expression, evaluates the
result of applying @var{code} to the expression and the
environment. For example:
@lisp
(define trace
(procedure->macro
(lambda (x env) `(set! ,(cadr x) (tracef ,(cadr x) ',(cadr x))))))
(trace @i{foo}) @equiv{} (set! @i{foo} (tracef @i{foo} '@i{foo})).
@end lisp
@end deffn
macro?
@c snarfed from macros.c:165
@deffn {Scheme Procedure} macro? obj
@deffnx {C Function} scm_macro_p (obj)
Return @code{#t} if @var{obj} is a regular macro, a memoizing macro, a
syntax transformer, or a syntax-case macro.
@end deffn
macro-type
@c snarfed from macros.c:186
@deffn {Scheme Procedure} macro-type m
@deffnx {C Function} scm_macro_type (m)
Return one of the symbols @code{syntax}, @code{macro},
@code{macro!}, or @code{syntax-case}, depending on whether
@var{m} is a syntax transformer, a regular macro, a memoizing
macro, or a syntax-case macro, respectively. If @var{m} is
not a macro, @code{#f} is returned.
@end deffn
macro-name
@c snarfed from macros.c:207
@deffn {Scheme Procedure} macro-name m
@deffnx {C Function} scm_macro_name (m)
Return the name of the macro @var{m}.
@end deffn
macro-transformer
@c snarfed from macros.c:218
@deffn {Scheme Procedure} macro-transformer m
@deffnx {C Function} scm_macro_transformer (m)
Return the transformer of the macro @var{m}.
@end deffn
current-module
@c snarfed from modules.c:45
@deffn {Scheme Procedure} current-module
@deffnx {C Function} scm_current_module ()
Return the current module.
@end deffn
set-current-module
@c snarfed from modules.c:57
@deffn {Scheme Procedure} set-current-module module
@deffnx {C Function} scm_set_current_module (module)
Set the current module to @var{module} and return
the previous current module.
@end deffn
interaction-environment
@c snarfed from modules.c:80
@deffn {Scheme Procedure} interaction-environment
@deffnx {C Function} scm_interaction_environment ()
Return a specifier for the environment that contains
implementation--defined bindings, typically a superset of those
listed in the report. The intent is that this procedure will
return the environment in which the implementation would
evaluate expressions dynamically typed by the user.
@end deffn
env-module
@c snarfed from modules.c:266
@deffn {Scheme Procedure} env-module env
@deffnx {C Function} scm_env_module (env)
Return the module of @var{ENV}, a lexical environment.
@end deffn
standard-eval-closure
@c snarfed from modules.c:342
@deffn {Scheme Procedure} standard-eval-closure module
@deffnx {C Function} scm_standard_eval_closure (module)
Return an eval closure for the module @var{module}.
@end deffn
standard-interface-eval-closure
@c snarfed from modules.c:353
@deffn {Scheme Procedure} standard-interface-eval-closure module
@deffnx {C Function} scm_standard_interface_eval_closure (module)
Return a interface eval closure for the module @var{module}. Such a closure does not allow new bindings to be added.
@end deffn
module-import-interface
@c snarfed from modules.c:399
@deffn {Scheme Procedure} module-import-interface module sym
@deffnx {C Function} scm_module_import_interface (module, sym)
Return the module or interface from which @var{sym} is imported in @var{module}. If @var{sym} is not imported (i.e., it is not defined in @var{module} or it is a module-local binding instead of an imported one), then @code{#f} is returned.
@end deffn
%get-pre-modules-obarray
@c snarfed from modules.c:616
@deffn {Scheme Procedure} %get-pre-modules-obarray
@deffnx {C Function} scm_get_pre_modules_obarray ()
Return the obarray that is used for all new bindings before the module system is booted. The first call to @code{set-current-module} will boot the module system.
@end deffn
exact?
@c snarfed from numbers.c:460
@deffn {Scheme Procedure} exact? x
@deffnx {C Function} scm_exact_p (x)
Return @code{#t} if @var{x} is an exact number, @code{#f}
otherwise.
@end deffn
odd?
@c snarfed from numbers.c:479
@deffn {Scheme Procedure} odd? n
@deffnx {C Function} scm_odd_p (n)
Return @code{#t} if @var{n} is an odd number, @code{#f}
otherwise.
@end deffn
even?
@c snarfed from numbers.c:514
@deffn {Scheme Procedure} even? n
@deffnx {C Function} scm_even_p (n)
Return @code{#t} if @var{n} is an even number, @code{#f}
otherwise.
@end deffn
inf?
@c snarfed from numbers.c:548
@deffn {Scheme Procedure} inf? x
@deffnx {C Function} scm_inf_p (x)
Return @code{#t} if @var{x} is either @samp{+inf.0}
or @samp{-inf.0}, @code{#f} otherwise.
@end deffn
nan?
@c snarfed from numbers.c:564
@deffn {Scheme Procedure} nan? n
@deffnx {C Function} scm_nan_p (n)
Return @code{#t} if @var{n} is a NaN, @code{#f}
otherwise.
@end deffn
inf
@c snarfed from numbers.c:634
@deffn {Scheme Procedure} inf
@deffnx {C Function} scm_inf ()
Return Inf.
@end deffn
nan
@c snarfed from numbers.c:649
@deffn {Scheme Procedure} nan
@deffnx {C Function} scm_nan ()
Return NaN.
@end deffn
abs
@c snarfed from numbers.c:665
@deffn {Scheme Procedure} abs x
@deffnx {C Function} scm_abs (x)
Return the absolute value of @var{x}.
@end deffn
logand
@c snarfed from numbers.c:1201
@deffn {Scheme Procedure} logand n1 n2
Return the bitwise AND of the integer arguments.
@lisp
(logand) @result{} -1
(logand 7) @result{} 7
(logand #b111 #b011 #b001) @result{} 1
@end lisp
@end deffn
logior
@c snarfed from numbers.c:1277
@deffn {Scheme Procedure} logior n1 n2
Return the bitwise OR of the integer arguments.
@lisp
(logior) @result{} 0
(logior 7) @result{} 7
(logior #b000 #b001 #b011) @result{} 3
@end lisp
@end deffn
logxor
@c snarfed from numbers.c:1353
@deffn {Scheme Procedure} logxor n1 n2
Return the bitwise XOR of the integer arguments. A bit is
set in the result if it is set in an odd number of arguments.
@lisp
(logxor) @result{} 0
(logxor 7) @result{} 7
(logxor #b000 #b001 #b011) @result{} 2
(logxor #b000 #b001 #b011 #b011) @result{} 1
@end lisp
@end deffn
logtest
@c snarfed from numbers.c:1428
@deffn {Scheme Procedure} logtest j k
@deffnx {C Function} scm_logtest (j, k)
Test whether @var{j} and @var{k} have any 1 bits in common.
This is equivalent to @code{(not (zero? (logand j k)))}, but
without actually calculating the @code{logand}, just testing
for non-zero.
@lisp
(logtest #b0100 #b1011) @result{} #f
(logtest #b0100 #b0111) @result{} #t
@end lisp
@end deffn
logbit?
@c snarfed from numbers.c:1501
@deffn {Scheme Procedure} logbit? index j
@deffnx {C Function} scm_logbit_p (index, j)
Test whether bit number @var{index} in @var{j} is set.
@var{index} starts from 0 for the least significant bit.
@lisp
(logbit? 0 #b1101) @result{} #t
(logbit? 1 #b1101) @result{} #f
(logbit? 2 #b1101) @result{} #t
(logbit? 3 #b1101) @result{} #t
(logbit? 4 #b1101) @result{} #f
@end lisp
@end deffn
lognot
@c snarfed from numbers.c:1535
@deffn {Scheme Procedure} lognot n
@deffnx {C Function} scm_lognot (n)
Return the integer which is the ones-complement of the integer
argument.
@lisp
(number->string (lognot #b10000000) 2)
@result{} "-10000001"
(number->string (lognot #b0) 2)
@result{} "-1"
@end lisp
@end deffn
modulo-expt
@c snarfed from numbers.c:1580
@deffn {Scheme Procedure} modulo-expt n k m
@deffnx {C Function} scm_modulo_expt (n, k, m)
Return @var{n} raised to the integer exponent
@var{k}, modulo @var{m}.
@lisp
(modulo-expt 2 3 5)
@result{} 3
@end lisp
@end deffn
integer-expt
@c snarfed from numbers.c:1689
@deffn {Scheme Procedure} integer-expt n k
@deffnx {C Function} scm_integer_expt (n, k)
Return @var{n} raised to the power @var{k}. @var{k} must be an
exact integer, @var{n} can be any number.
Negative @var{k} is supported, and results in @math{1/n^abs(k)}
in the usual way. @math{@var{n}^0} is 1, as usual, and that
includes @math{0^0} is 1.
@lisp
(integer-expt 2 5) @result{} 32
(integer-expt -3 3) @result{} -27
(integer-expt 5 -3) @result{} 1/125
(integer-expt 0 0) @result{} 1
@end lisp
@end deffn
ash
@c snarfed from numbers.c:1779
@deffn {Scheme Procedure} ash n cnt
@deffnx {C Function} scm_ash (n, cnt)
Return @var{n} shifted left by @var{cnt} bits, or shifted right
if @var{cnt} is negative. This is an ``arithmetic'' shift.
This is effectively a multiplication by 2^@var{cnt}, and when
@var{cnt} is negative it's a division, rounded towards negative
infinity. (Note that this is not the same rounding as
@code{quotient} does.)
With @var{n} viewed as an infinite precision twos complement,
@code{ash} means a left shift introducing zero bits, or a right
shift dropping bits.
@lisp
(number->string (ash #b1 3) 2) @result{} "1000"
(number->string (ash #b1010 -1) 2) @result{} "101"
;; -23 is bits ...11101001, -6 is bits ...111010
(ash -23 -2) @result{} -6
@end lisp
@end deffn
bit-extract
@c snarfed from numbers.c:1870
@deffn {Scheme Procedure} bit-extract n start end
@deffnx {C Function} scm_bit_extract (n, start, end)
Return the integer composed of the @var{start} (inclusive)
through @var{end} (exclusive) bits of @var{n}. The
@var{start}th bit becomes the 0-th bit in the result.
@lisp
(number->string (bit-extract #b1101101010 0 4) 2)
@result{} "1010"
(number->string (bit-extract #b1101101010 4 9) 2)
@result{} "10110"
@end lisp
@end deffn
logcount
@c snarfed from numbers.c:1949
@deffn {Scheme Procedure} logcount n
@deffnx {C Function} scm_logcount (n)
Return the number of bits in integer @var{n}. If integer is
positive, the 1-bits in its binary representation are counted.
If negative, the 0-bits in its two's-complement binary
representation are counted. If 0, 0 is returned.
@lisp
(logcount #b10101010)
@result{} 4
(logcount 0)
@result{} 0
(logcount -2)
@result{} 1
@end lisp
@end deffn
integer-length
@c snarfed from numbers.c:1997
@deffn {Scheme Procedure} integer-length n
@deffnx {C Function} scm_integer_length (n)
Return the number of bits necessary to represent @var{n}.
@lisp
(integer-length #b10101010)
@result{} 8
(integer-length 0)
@result{} 0
(integer-length #b1111)
@result{} 4
@end lisp
@end deffn
number->string
@c snarfed from numbers.c:2337
@deffn {Scheme Procedure} number->string n [radix]
@deffnx {C Function} scm_number_to_string (n, radix)
Return a string holding the external representation of the
number @var{n} in the given @var{radix}. If @var{n} is
inexact, a radix of 10 will be used.
@end deffn
string->number
@c snarfed from numbers.c:3034
@deffn {Scheme Procedure} string->number string [radix]
@deffnx {C Function} scm_string_to_number (string, radix)
Return a number of the maximally precise representation
expressed by the given @var{string}. @var{radix} must be an
exact integer, either 2, 8, 10, or 16. If supplied, @var{radix}
is a default radix that may be overridden by an explicit radix
prefix in @var{string} (e.g. "#o177"). If @var{radix} is not
supplied, then the default radix is 10. If string is not a
syntactically valid notation for a number, then
@code{string->number} returns @code{#f}.
@end deffn
number?
@c snarfed from numbers.c:3097
@deffn {Scheme Procedure} number? x
@deffnx {C Function} scm_number_p (x)
Return @code{#t} if @var{x} is a number, @code{#f}
otherwise.
@end deffn
complex?
@c snarfed from numbers.c:3110
@deffn {Scheme Procedure} complex? x
@deffnx {C Function} scm_complex_p (x)
Return @code{#t} if @var{x} is a complex number, @code{#f}
otherwise. Note that the sets of real, rational and integer
values form subsets of the set of complex numbers, i. e. the
predicate will also be fulfilled if @var{x} is a real,
rational or integer number.
@end deffn
real?
@c snarfed from numbers.c:3123
@deffn {Scheme Procedure} real? x
@deffnx {C Function} scm_real_p (x)
Return @code{#t} if @var{x} is a real number, @code{#f}
otherwise. Note that the set of integer values forms a subset of
the set of real numbers, i. e. the predicate will also be
fulfilled if @var{x} is an integer number.
@end deffn
rational?
@c snarfed from numbers.c:3136
@deffn {Scheme Procedure} rational? x
@deffnx {C Function} scm_rational_p (x)
Return @code{#t} if @var{x} is a rational number, @code{#f}
otherwise. Note that the set of integer values forms a subset of
the set of rational numbers, i. e. the predicate will also be
fulfilled if @var{x} is an integer number.
@end deffn
integer?
@c snarfed from numbers.c:3159
@deffn {Scheme Procedure} integer? x
@deffnx {C Function} scm_integer_p (x)
Return @code{#t} if @var{x} is an integer number, @code{#f}
else.
@end deffn
inexact?
@c snarfed from numbers.c:3185
@deffn {Scheme Procedure} inexact? x
@deffnx {C Function} scm_inexact_p (x)
Return @code{#t} if @var{x} is an inexact number, @code{#f}
else.
@end deffn
truncate
@c snarfed from numbers.c:5060
@deffn {Scheme Procedure} truncate x
@deffnx {C Function} scm_truncate_number (x)
Round the number @var{x} towards zero.
@end deffn
round
@c snarfed from numbers.c:5076
@deffn {Scheme Procedure} round x
@deffnx {C Function} scm_round_number (x)
Round the number @var{x} towards the nearest integer. When it is exactly halfway between two integers, round towards the even one.
@end deffn
floor
@c snarfed from numbers.c:5102
@deffn {Scheme Procedure} floor x
@deffnx {C Function} scm_floor (x)
Round the number @var{x} towards minus infinity.
@end deffn
ceiling
@c snarfed from numbers.c:5133
@deffn {Scheme Procedure} ceiling x
@deffnx {C Function} scm_ceiling (x)
Round the number @var{x} towards infinity.
@end deffn
$expt
@c snarfed from numbers.c:5242
@deffn {Scheme Procedure} $expt x y
@deffnx {C Function} scm_sys_expt (x, y)
Return @var{x} raised to the power of @var{y}. This
procedure does not accept complex arguments.
@end deffn
$atan2
@c snarfed from numbers.c:5258
@deffn {Scheme Procedure} $atan2 x y
@deffnx {C Function} scm_sys_atan2 (x, y)
Return the arc tangent of the two arguments @var{x} and
@var{y}. This is similar to calculating the arc tangent of
@var{x} / @var{y}, except that the signs of both arguments
are used to determine the quadrant of the result. This
procedure does not accept complex arguments.
@end deffn
make-rectangular
@c snarfed from numbers.c:5286
@deffn {Scheme Procedure} make-rectangular real_part imaginary_part
@deffnx {C Function} scm_make_rectangular (real_part, imaginary_part)
Return a complex number constructed of the given @var{real-part} and @var{imaginary-part} parts.
@end deffn
make-polar
@c snarfed from numbers.c:5310
@deffn {Scheme Procedure} make-polar x y
@deffnx {C Function} scm_make_polar (x, y)
Return the complex number @var{x} * e^(i * @var{y}).
@end deffn
inexact->exact
@c snarfed from numbers.c:5513
@deffn {Scheme Procedure} inexact->exact z
@deffnx {C Function} scm_inexact_to_exact (z)
Return an exact number that is numerically closest to @var{z}.
@end deffn
rationalize
@c snarfed from numbers.c:5550
@deffn {Scheme Procedure} rationalize x err
@deffnx {C Function} scm_rationalize (x, err)
Return an exact number that is within @var{err} of @var{x}.
@end deffn
entity?
@c snarfed from objects.c:192
@deffn {Scheme Procedure} entity? obj
@deffnx {C Function} scm_entity_p (obj)
Return @code{#t} if @var{obj} is an entity.
@end deffn
operator?
@c snarfed from objects.c:201
@deffn {Scheme Procedure} operator? obj
@deffnx {C Function} scm_operator_p (obj)
Return @code{#t} if @var{obj} is an operator.
@end deffn
valid-object-procedure?
@c snarfed from objects.c:217
@deffn {Scheme Procedure} valid-object-procedure? proc
@deffnx {C Function} scm_valid_object_procedure_p (proc)
Return @code{#t} iff @var{proc} is a procedure that can be used with @code{set-object-procedure}. It is always valid to use a closure constructed by @code{lambda}.
@end deffn
set-object-procedure!
@c snarfed from objects.c:239
@deffn {Scheme Procedure} set-object-procedure! obj proc
@deffnx {C Function} scm_set_object_procedure_x (obj, proc)
Set the object procedure of @var{obj} to @var{proc}.
@var{obj} must be either an entity or an operator.
@end deffn
make-class-object
@c snarfed from objects.c:299
@deffn {Scheme Procedure} make-class-object metaclass layout
@deffnx {C Function} scm_make_class_object (metaclass, layout)
Create a new class object of class @var{metaclass}, with the
slot layout specified by @var{layout}.
@end deffn
make-subclass-object
@c snarfed from objects.c:314
@deffn {Scheme Procedure} make-subclass-object class layout
@deffnx {C Function} scm_make_subclass_object (class, layout)
Create a subclass object of @var{class}, with the slot layout
specified by @var{layout}.
@end deffn
object-properties
@c snarfed from objprop.c:36
@deffn {Scheme Procedure} object-properties obj
@deffnx {C Function} scm_object_properties (obj)
Return @var{obj}'s property list.
@end deffn
set-object-properties!
@c snarfed from objprop.c:46
@deffn {Scheme Procedure} set-object-properties! obj alist
@deffnx {C Function} scm_set_object_properties_x (obj, alist)
Set @var{obj}'s property list to @var{alist}.
@end deffn
object-property
@c snarfed from objprop.c:57
@deffn {Scheme Procedure} object-property obj key
@deffnx {C Function} scm_object_property (obj, key)
Return the property of @var{obj} with name @var{key}.
@end deffn
set-object-property!
@c snarfed from objprop.c:69
@deffn {Scheme Procedure} set-object-property! obj key value
@deffnx {C Function} scm_set_object_property_x (obj, key, value)
In @var{obj}'s property list, set the property named @var{key}
to @var{value}.
@end deffn
cons
@c snarfed from pairs.c:56
@deffn {Scheme Procedure} cons x y
@deffnx {C Function} scm_cons (x, y)
Return a newly allocated pair whose car is @var{x} and whose
cdr is @var{y}. The pair is guaranteed to be different (in the
sense of @code{eq?}) from every previously existing object.
@end deffn
pair?
@c snarfed from pairs.c:74
@deffn {Scheme Procedure} pair? x
@deffnx {C Function} scm_pair_p (x)
Return @code{#t} if @var{x} is a pair; otherwise return
@code{#f}.
@end deffn
set-car!
@c snarfed from pairs.c:120
@deffn {Scheme Procedure} set-car! pair value
@deffnx {C Function} scm_set_car_x (pair, value)
Stores @var{value} in the car field of @var{pair}. The value returned
by @code{set-car!} is unspecified.
@end deffn
set-cdr!
@c snarfed from pairs.c:133
@deffn {Scheme Procedure} set-cdr! pair value
@deffnx {C Function} scm_set_cdr_x (pair, value)
Stores @var{value} in the cdr field of @var{pair}. The value returned
by @code{set-cdr!} is unspecified.
@end deffn
char-ready?
@c snarfed from ports.c:245
@deffn {Scheme Procedure} char-ready? [port]
@deffnx {C Function} scm_char_ready_p (port)
Return @code{#t} if a character is ready on input @var{port}
and return @code{#f} otherwise. If @code{char-ready?} returns
@code{#t} then the next @code{read-char} operation on
@var{port} is guaranteed not to hang. If @var{port} is a file
port at end of file then @code{char-ready?} returns @code{#t}.
@code{char-ready?} exists to make it possible for a
program to accept characters from interactive ports without
getting stuck waiting for input. Any input editors associated
with such ports must make sure that characters whose existence
has been asserted by @code{char-ready?} cannot be rubbed out.
If @code{char-ready?} were to return @code{#f} at end of file,
a port at end of file would be indistinguishable from an
interactive port that has no ready characters.
@end deffn
drain-input
@c snarfed from ports.c:322
@deffn {Scheme Procedure} drain-input port
@deffnx {C Function} scm_drain_input (port)
This procedure clears a port's input buffers, similar
to the way that force-output clears the output buffer. The
contents of the buffers are returned as a single string, e.g.,
@lisp
(define p (open-input-file ...))
(drain-input p) => empty string, nothing buffered yet.
(unread-char (read-char p) p)
(drain-input p) => initial chars from p, up to the buffer size.
@end lisp
Draining the buffers may be useful for cleanly finishing
buffered I/O so that the file descriptor can be used directly
for further input.
@end deffn
current-input-port
@c snarfed from ports.c:355
@deffn {Scheme Procedure} current-input-port
@deffnx {C Function} scm_current_input_port ()
Return the current input port. This is the default port used
by many input procedures. Initially, @code{current-input-port}
returns the @dfn{standard input} in Unix and C terminology.
@end deffn
current-output-port
@c snarfed from ports.c:367
@deffn {Scheme Procedure} current-output-port
@deffnx {C Function} scm_current_output_port ()
Return the current output port. This is the default port used
by many output procedures. Initially,
@code{current-output-port} returns the @dfn{standard output} in
Unix and C terminology.
@end deffn
current-error-port
@c snarfed from ports.c:377
@deffn {Scheme Procedure} current-error-port
@deffnx {C Function} scm_current_error_port ()
Return the port to which errors and warnings should be sent (the
@dfn{standard error} in Unix and C terminology).
@end deffn
current-load-port
@c snarfed from ports.c:387
@deffn {Scheme Procedure} current-load-port
@deffnx {C Function} scm_current_load_port ()
Return the current-load-port.
The load port is used internally by @code{primitive-load}.
@end deffn
set-current-input-port
@c snarfed from ports.c:400
@deffn {Scheme Procedure} set-current-input-port port
@deffnx {Scheme Procedure} set-current-output-port port
@deffnx {Scheme Procedure} set-current-error-port port
@deffnx {C Function} scm_set_current_input_port (port)
Change the ports returned by @code{current-input-port},
@code{current-output-port} and @code{current-error-port}, respectively,
so that they use the supplied @var{port} for input or output.
@end deffn
set-current-output-port
@c snarfed from ports.c:413
@deffn {Scheme Procedure} set-current-output-port port
@deffnx {C Function} scm_set_current_output_port (port)
Set the current default output port to @var{port}.
@end deffn
set-current-error-port
@c snarfed from ports.c:427
@deffn {Scheme Procedure} set-current-error-port port
@deffnx {C Function} scm_set_current_error_port (port)
Set the current default error port to @var{port}.
@end deffn
port-revealed
@c snarfed from ports.c:625
@deffn {Scheme Procedure} port-revealed port
@deffnx {C Function} scm_port_revealed (port)
Return the revealed count for @var{port}.
@end deffn
set-port-revealed!
@c snarfed from ports.c:638
@deffn {Scheme Procedure} set-port-revealed! port rcount
@deffnx {C Function} scm_set_port_revealed_x (port, rcount)
Sets the revealed count for a port to a given value.
The return value is unspecified.
@end deffn
port-mode
@c snarfed from ports.c:699
@deffn {Scheme Procedure} port-mode port
@deffnx {C Function} scm_port_mode (port)
Return the port modes associated with the open port @var{port}.
These will not necessarily be identical to the modes used when
the port was opened, since modes such as "append" which are
used only during port creation are not retained.
@end deffn
close-port
@c snarfed from ports.c:736
@deffn {Scheme Procedure} close-port port
@deffnx {C Function} scm_close_port (port)
Close the specified port object. Return @code{#t} if it
successfully closes a port or @code{#f} if it was already
closed. An exception may be raised if an error occurs, for
example when flushing buffered output. See also @ref{Ports and
File Descriptors, close}, for a procedure which can close file
descriptors.
@end deffn
close-input-port
@c snarfed from ports.c:766
@deffn {Scheme Procedure} close-input-port port
@deffnx {C Function} scm_close_input_port (port)
Close the specified input port object. The routine has no effect if
the file has already been closed. An exception may be raised if an
error occurs. The value returned is unspecified.
See also @ref{Ports and File Descriptors, close}, for a procedure
which can close file descriptors.
@end deffn
close-output-port
@c snarfed from ports.c:781
@deffn {Scheme Procedure} close-output-port port
@deffnx {C Function} scm_close_output_port (port)
Close the specified output port object. The routine has no effect if
the file has already been closed. An exception may be raised if an
error occurs. The value returned is unspecified.
See also @ref{Ports and File Descriptors, close}, for a procedure
which can close file descriptors.
@end deffn
port-for-each
@c snarfed from ports.c:827
@deffn {Scheme Procedure} port-for-each proc
@deffnx {C Function} scm_port_for_each (proc)
Apply @var{proc} to each port in the Guile port table
in turn. The return value is unspecified. More specifically,
@var{proc} is applied exactly once to every port that exists
in the system at the time @var{port-for-each} is invoked.
Changes to the port table while @var{port-for-each} is running
have no effect as far as @var{port-for-each} is concerned.
@end deffn
input-port?
@c snarfed from ports.c:845
@deffn {Scheme Procedure} input-port? x
@deffnx {C Function} scm_input_port_p (x)
Return @code{#t} if @var{x} is an input port, otherwise return
@code{#f}. Any object satisfying this predicate also satisfies
@code{port?}.
@end deffn
output-port?
@c snarfed from ports.c:856
@deffn {Scheme Procedure} output-port? x
@deffnx {C Function} scm_output_port_p (x)
Return @code{#t} if @var{x} is an output port, otherwise return
@code{#f}. Any object satisfying this predicate also satisfies
@code{port?}.
@end deffn
port?
@c snarfed from ports.c:868
@deffn {Scheme Procedure} port? x
@deffnx {C Function} scm_port_p (x)
Return a boolean indicating whether @var{x} is a port.
Equivalent to @code{(or (input-port? @var{x}) (output-port?
@var{x}))}.
@end deffn
port-closed?
@c snarfed from ports.c:878
@deffn {Scheme Procedure} port-closed? port
@deffnx {C Function} scm_port_closed_p (port)
Return @code{#t} if @var{port} is closed or @code{#f} if it is
open.
@end deffn
eof-object?
@c snarfed from ports.c:889
@deffn {Scheme Procedure} eof-object? x
@deffnx {C Function} scm_eof_object_p (x)
Return @code{#t} if @var{x} is an end-of-file object; otherwise
return @code{#f}.
@end deffn
force-output
@c snarfed from ports.c:903
@deffn {Scheme Procedure} force-output [port]
@deffnx {C Function} scm_force_output (port)
Flush the specified output port, or the current output port if @var{port}
is omitted. The current output buffer contents are passed to the
underlying port implementation (e.g., in the case of fports, the
data will be written to the file and the output buffer will be cleared.)
It has no effect on an unbuffered port.
The return value is unspecified.
@end deffn
flush-all-ports
@c snarfed from ports.c:921
@deffn {Scheme Procedure} flush-all-ports
@deffnx {C Function} scm_flush_all_ports ()
Equivalent to calling @code{force-output} on
all open output ports. The return value is unspecified.
@end deffn
read-char
@c snarfed from ports.c:941
@deffn {Scheme Procedure} read-char [port]
@deffnx {C Function} scm_read_char (port)
Return the next character available from @var{port}, updating
@var{port} to point to the following character. If no more
characters are available, the end-of-file object is returned.
@end deffn
peek-char
@c snarfed from ports.c:1283
@deffn {Scheme Procedure} peek-char [port]
@deffnx {C Function} scm_peek_char (port)
Return the next character available from @var{port},
@emph{without} updating @var{port} to point to the following
character. If no more characters are available, the
end-of-file object is returned.
The value returned by
a call to @code{peek-char} is the same as the value that would
have been returned by a call to @code{read-char} on the same
port. The only difference is that the very next call to
@code{read-char} or @code{peek-char} on that @var{port} will
return the value returned by the preceding call to
@code{peek-char}. In particular, a call to @code{peek-char} on
an interactive port will hang waiting for input whenever a call
to @code{read-char} would have hung.
@end deffn
unread-char
@c snarfed from ports.c:1306
@deffn {Scheme Procedure} unread-char cobj [port]
@deffnx {C Function} scm_unread_char (cobj, port)
Place @var{char} in @var{port} so that it will be read by the
next read operation. If called multiple times, the unread characters
will be read again in last-in first-out order. If @var{port} is
not supplied, the current input port is used.
@end deffn
unread-string
@c snarfed from ports.c:1329
@deffn {Scheme Procedure} unread-string str port
@deffnx {C Function} scm_unread_string (str, port)
Place the string @var{str} in @var{port} so that its characters will be
read in subsequent read operations. If called multiple times, the
unread characters will be read again in last-in first-out order. If
@var{port} is not supplied, the current-input-port is used.
@end deffn
seek
@c snarfed from ports.c:1368
@deffn {Scheme Procedure} seek fd_port offset whence
@deffnx {C Function} scm_seek (fd_port, offset, whence)
Sets the current position of @var{fd/port} to the integer
@var{offset}, which is interpreted according to the value of
@var{whence}.
One of the following variables should be supplied for
@var{whence}:
@defvar SEEK_SET
Seek from the beginning of the file.
@end defvar
@defvar SEEK_CUR
Seek from the current position.
@end defvar
@defvar SEEK_END
Seek from the end of the file.
@end defvar
If @var{fd/port} is a file descriptor, the underlying system
call is @code{lseek}. @var{port} may be a string port.
The value returned is the new position in the file. This means
that the current position of a port can be obtained using:
@lisp
(seek port 0 SEEK_CUR)
@end lisp
@end deffn
truncate-file
@c snarfed from ports.c:1426
@deffn {Scheme Procedure} truncate-file object [length]
@deffnx {C Function} scm_truncate_file (object, length)
Truncates the object referred to by @var{object} to at most
@var{length} bytes. @var{object} can be a string containing a
file name or an integer file descriptor or a port.
@var{length} may be omitted if @var{object} is not a file name,
in which case the truncation occurs at the current port
position. The return value is unspecified.
@end deffn
port-line
@c snarfed from ports.c:1486
@deffn {Scheme Procedure} port-line port
@deffnx {C Function} scm_port_line (port)
Return the current line number for @var{port}.
The first line of a file is 0. But you might want to add 1
when printing line numbers, since starting from 1 is
traditional in error messages, and likely to be more natural to
non-programmers.
@end deffn
set-port-line!
@c snarfed from ports.c:1498
@deffn {Scheme Procedure} set-port-line! port line
@deffnx {C Function} scm_set_port_line_x (port, line)
Set the current line number for @var{port} to @var{line}. The
first line of a file is 0.
@end deffn
port-column
@c snarfed from ports.c:1517
@deffn {Scheme Procedure} port-column port
@deffnx {C Function} scm_port_column (port)
Return the current column number of @var{port}.
If the number is
unknown, the result is #f. Otherwise, the result is a 0-origin integer
- i.e. the first character of the first line is line 0, column 0.
(However, when you display a file position, for example in an error
message, we recommend you add 1 to get 1-origin integers. This is
because lines and column numbers traditionally start with 1, and that is
what non-programmers will find most natural.)
@end deffn
set-port-column!
@c snarfed from ports.c:1529
@deffn {Scheme Procedure} set-port-column! port column
@deffnx {C Function} scm_set_port_column_x (port, column)
Set the current column of @var{port}. Before reading the first
character on a line the column should be 0.
@end deffn
port-filename
@c snarfed from ports.c:1543
@deffn {Scheme Procedure} port-filename port
@deffnx {C Function} scm_port_filename (port)
Return the filename associated with @var{port}. This function returns
the strings "standard input", "standard output" and "standard error"
when called on the current input, output and error ports respectively.
@end deffn
set-port-filename!
@c snarfed from ports.c:1557
@deffn {Scheme Procedure} set-port-filename! port filename
@deffnx {C Function} scm_set_port_filename_x (port, filename)
Change the filename associated with @var{port}, using the current input
port if none is specified. Note that this does not change the port's
source of data, but only the value that is returned by
@code{port-filename} and reported in diagnostic output.
@end deffn
%make-void-port
@c snarfed from ports.c:1651
@deffn {Scheme Procedure} %make-void-port mode
@deffnx {C Function} scm_sys_make_void_port (mode)
Create and return a new void port. A void port acts like
@file{/dev/null}. The @var{mode} argument
specifies the input/output modes for this port: see the
documentation for @code{open-file} in @ref{File Ports}.
@end deffn
print-options-interface
@c snarfed from print.c:87
@deffn {Scheme Procedure} print-options-interface [setting]
@deffnx {C Function} scm_print_options (setting)
Option interface for the print options. Instead of using
this procedure directly, use the procedures
@code{print-enable}, @code{print-disable}, @code{print-set!}
and @code{print-options}.
@end deffn
simple-format
@c snarfed from print.c:929
@deffn {Scheme Procedure} simple-format destination message . args
@deffnx {C Function} scm_simple_format (destination, message, args)
Write @var{message} to @var{destination}, defaulting to
the current output port.
@var{message} can contain @code{~A} (was @code{%s}) and
@code{~S} (was @code{%S}) escapes. When printed,
the escapes are replaced with corresponding members of
@var{ARGS}:
@code{~A} formats using @code{display} and @code{~S} formats
using @code{write}.
If @var{destination} is @code{#t}, then use the current output
port, if @var{destination} is @code{#f}, then return a string
containing the formatted text. Does not add a trailing newline.
@end deffn
newline
@c snarfed from print.c:1019
@deffn {Scheme Procedure} newline [port]
@deffnx {C Function} scm_newline (port)
Send a newline to @var{port}.
If @var{port} is omitted, send to the current output port.
@end deffn
write-char
@c snarfed from print.c:1034
@deffn {Scheme Procedure} write-char chr [port]
@deffnx {C Function} scm_write_char (chr, port)
Send character @var{chr} to @var{port}.
@end deffn
port-with-print-state
@c snarfed from print.c:1088
@deffn {Scheme Procedure} port-with-print-state port [pstate]
@deffnx {C Function} scm_port_with_print_state (port, pstate)
Create a new port which behaves like @var{port}, but with an
included print state @var{pstate}. @var{pstate} is optional.
If @var{pstate} isn't supplied and @var{port} already has
a print state, the old print state is reused.
@end deffn
get-print-state
@c snarfed from print.c:1101
@deffn {Scheme Procedure} get-print-state port
@deffnx {C Function} scm_get_print_state (port)
Return the print state of the port @var{port}. If @var{port}
has no associated print state, @code{#f} is returned.
@end deffn
procedure-properties
@c snarfed from procprop.c:160
@deffn {Scheme Procedure} procedure-properties proc
@deffnx {C Function} scm_procedure_properties (proc)
Return @var{obj}'s property list.
@end deffn
set-procedure-properties!
@c snarfed from procprop.c:173
@deffn {Scheme Procedure} set-procedure-properties! proc new_val
@deffnx {C Function} scm_set_procedure_properties_x (proc, new_val)
Set @var{obj}'s property list to @var{alist}.
@end deffn
procedure-property
@c snarfed from procprop.c:186
@deffn {Scheme Procedure} procedure-property p k
@deffnx {C Function} scm_procedure_property (p, k)
Return the property of @var{obj} with name @var{key}.
@end deffn
set-procedure-property!
@c snarfed from procprop.c:209
@deffn {Scheme Procedure} set-procedure-property! p k v
@deffnx {C Function} scm_set_procedure_property_x (p, k, v)
In @var{obj}'s property list, set the property named @var{key} to
@var{value}.
@end deffn
procedure?
@c snarfed from procs.c:162
@deffn {Scheme Procedure} procedure? obj
@deffnx {C Function} scm_procedure_p (obj)
Return @code{#t} if @var{obj} is a procedure.
@end deffn
closure?
@c snarfed from procs.c:189
@deffn {Scheme Procedure} closure? obj
@deffnx {C Function} scm_closure_p (obj)
Return @code{#t} if @var{obj} is a closure.
@end deffn
thunk?
@c snarfed from procs.c:198
@deffn {Scheme Procedure} thunk? obj
@deffnx {C Function} scm_thunk_p (obj)
Return @code{#t} if @var{obj} is a thunk.
@end deffn
procedure-documentation
@c snarfed from procs.c:248
@deffn {Scheme Procedure} procedure-documentation proc
@deffnx {C Function} scm_procedure_documentation (proc)
Return the documentation string associated with @code{proc}. By
convention, if a procedure contains more than one expression and the
first expression is a string constant, that string is assumed to contain
documentation for that procedure.
@end deffn
procedure-with-setter?
@c snarfed from procs.c:284
@deffn {Scheme Procedure} procedure-with-setter? obj
@deffnx {C Function} scm_procedure_with_setter_p (obj)
Return @code{#t} if @var{obj} is a procedure with an
associated setter procedure.
@end deffn
make-procedure-with-setter
@c snarfed from procs.c:294
@deffn {Scheme Procedure} make-procedure-with-setter procedure setter
@deffnx {C Function} scm_make_procedure_with_setter (procedure, setter)
Create a new procedure which behaves like @var{procedure}, but
with the associated setter @var{setter}.
@end deffn
procedure
@c snarfed from procs.c:308
@deffn {Scheme Procedure} procedure proc
@deffnx {C Function} scm_procedure (proc)
Return the procedure of @var{proc}, which must be an
applicable struct.
@end deffn
primitive-make-property
@c snarfed from properties.c:40
@deffn {Scheme Procedure} primitive-make-property not_found_proc
@deffnx {C Function} scm_primitive_make_property (not_found_proc)
Create a @dfn{property token} that can be used with
@code{primitive-property-ref} and @code{primitive-property-set!}.
See @code{primitive-property-ref} for the significance of
@var{not_found_proc}.
@end deffn
primitive-property-ref
@c snarfed from properties.c:59
@deffn {Scheme Procedure} primitive-property-ref prop obj
@deffnx {C Function} scm_primitive_property_ref (prop, obj)
Return the property @var{prop} of @var{obj}.
When no value has yet been associated with @var{prop} and
@var{obj}, the @var{not-found-proc} from @var{prop} is used. A
call @code{(@var{not-found-proc} @var{prop} @var{obj})} is made
and the result set as the property value. If
@var{not-found-proc} is @code{#f} then @code{#f} is the
property value.
@end deffn
primitive-property-set!
@c snarfed from properties.c:90
@deffn {Scheme Procedure} primitive-property-set! prop obj val
@deffnx {C Function} scm_primitive_property_set_x (prop, obj, val)
Set the property @var{prop} of @var{obj} to @var{val}.
@end deffn
primitive-property-del!
@c snarfed from properties.c:111
@deffn {Scheme Procedure} primitive-property-del! prop obj
@deffnx {C Function} scm_primitive_property_del_x (prop, obj)
Remove any value associated with @var{prop} and @var{obj}.
@end deffn
random
@c snarfed from random.c:347
@deffn {Scheme Procedure} random n [state]
@deffnx {C Function} scm_random (n, state)
Return a number in [0, N).
Accepts a positive integer or real n and returns a
number of the same type between zero (inclusive) and
N (exclusive). The values returned have a uniform
distribution.
The optional argument @var{state} must be of the type produced
by @code{seed->random-state}. It defaults to the value of the
variable @var{*random-state*}. This object is used to maintain
the state of the pseudo-random-number generator and is altered
as a side effect of the random operation.
@end deffn
copy-random-state
@c snarfed from random.c:372
@deffn {Scheme Procedure} copy-random-state [state]
@deffnx {C Function} scm_copy_random_state (state)
Return a copy of the random state @var{state}.
@end deffn
seed->random-state
@c snarfed from random.c:384
@deffn {Scheme Procedure} seed->random-state seed
@deffnx {C Function} scm_seed_to_random_state (seed)
Return a new random state using @var{seed}.
@end deffn
random:uniform
@c snarfed from random.c:402
@deffn {Scheme Procedure} random:uniform [state]
@deffnx {C Function} scm_random_uniform (state)
Return a uniformly distributed inexact real random number in
[0,1).
@end deffn
random:normal
@c snarfed from random.c:417
@deffn {Scheme Procedure} random:normal [state]
@deffnx {C Function} scm_random_normal (state)
Return an inexact real in a normal distribution. The
distribution used has mean 0 and standard deviation 1. For a
normal distribution with mean m and standard deviation d use
@code{(+ m (* d (random:normal)))}.
@end deffn
random:solid-sphere!
@c snarfed from random.c:500
@deffn {Scheme Procedure} random:solid-sphere! v [state]
@deffnx {C Function} scm_random_solid_sphere_x (v, state)
Fills @var{vect} with inexact real random numbers the sum of
whose squares is less than 1.0. Thinking of @var{vect} as
coordinates in space of dimension @var{n} @math{=}
@code{(vector-length @var{vect})}, the coordinates are
uniformly distributed within the unit @var{n}-sphere.
@end deffn
random:hollow-sphere!
@c snarfed from random.c:522
@deffn {Scheme Procedure} random:hollow-sphere! v [state]
@deffnx {C Function} scm_random_hollow_sphere_x (v, state)
Fills vect with inexact real random numbers
the sum of whose squares is equal to 1.0.
Thinking of vect as coordinates in space of
dimension n = (vector-length vect), the coordinates
are uniformly distributed over the surface of the
unit n-sphere.
@end deffn
random:normal-vector!
@c snarfed from random.c:539
@deffn {Scheme Procedure} random:normal-vector! v [state]
@deffnx {C Function} scm_random_normal_vector_x (v, state)
Fills vect with inexact real random numbers that are
independent and standard normally distributed
(i.e., with mean 0 and variance 1).
@end deffn
random:exp
@c snarfed from random.c:577
@deffn {Scheme Procedure} random:exp [state]
@deffnx {C Function} scm_random_exp (state)
Return an inexact real in an exponential distribution with mean
1. For an exponential distribution with mean u use (* u
(random:exp)).
@end deffn
%read-delimited!
@c snarfed from rdelim.c:55
@deffn {Scheme Procedure} %read-delimited! delims str gobble [port [start [end]]]
@deffnx {C Function} scm_read_delimited_x (delims, str, gobble, port, start, end)
Read characters from @var{port} into @var{str} until one of the
characters in the @var{delims} string is encountered. If
@var{gobble} is true, discard the delimiter character;
otherwise, leave it in the input stream for the next read. If
@var{port} is not specified, use the value of
@code{(current-input-port)}. If @var{start} or @var{end} are
specified, store data only into the substring of @var{str}
bounded by @var{start} and @var{end} (which default to the
beginning and end of the string, respectively).
Return a pair consisting of the delimiter that terminated the
string and the number of characters read. If reading stopped
at the end of file, the delimiter returned is the
@var{eof-object}; if the string was filled without encountering
a delimiter, this value is @code{#f}.
@end deffn
%read-line
@c snarfed from rdelim.c:202
@deffn {Scheme Procedure} %read-line [port]
@deffnx {C Function} scm_read_line (port)
Read a newline-terminated line from @var{port}, allocating storage as
necessary. The newline terminator (if any) is removed from the string,
and a pair consisting of the line and its delimiter is returned. The
delimiter may be either a newline or the @var{eof-object}; if
@code{%read-line} is called at the end of file, it returns the pair
@code{(#<eof> . #<eof>)}.
@end deffn
write-line
@c snarfed from rdelim.c:255
@deffn {Scheme Procedure} write-line obj [port]
@deffnx {C Function} scm_write_line (obj, port)
Display @var{obj} and a newline character to @var{port}. If
@var{port} is not specified, @code{(current-output-port)} is
used. This function is equivalent to:
@lisp
(display obj [port])
(newline [port])
@end lisp
@end deffn
read-options-interface
@c snarfed from read.c:110
@deffn {Scheme Procedure} read-options-interface [setting]
@deffnx {C Function} scm_read_options (setting)
Option interface for the read options. Instead of using
this procedure directly, use the procedures @code{read-enable},
@code{read-disable}, @code{read-set!} and @code{read-options}.
@end deffn
read
@c snarfed from read.c:130
@deffn {Scheme Procedure} read [port]
@deffnx {C Function} scm_read (port)
Read an s-expression from the input port @var{port}, or from
the current input port if @var{port} is not specified.
Any whitespace before the next token is discarded.
@end deffn
read-hash-extend
@c snarfed from read.c:898
@deffn {Scheme Procedure} read-hash-extend chr proc
@deffnx {C Function} scm_read_hash_extend (chr, proc)
Install the procedure @var{proc} for reading expressions
starting with the character sequence @code{#} and @var{chr}.
@var{proc} will be called with two arguments: the character
@var{chr} and the port to read further data from. The object
returned will be the return value of @code{read}.
Passing @code{#f} for @var{proc} will remove a previous setting.
@end deffn
call-with-dynamic-root
@c snarfed from root.c:160
@deffn {Scheme Procedure} call-with-dynamic-root thunk handler
@deffnx {C Function} scm_call_with_dynamic_root (thunk, handler)
Call @var{thunk} with a new dynamic state and withina continuation barrier. The @var{handler} catches allotherwise uncaught throws and executes within the samedynamic context as @var{thunk}.
@end deffn
dynamic-root
@c snarfed from root.c:171
@deffn {Scheme Procedure} dynamic-root
@deffnx {C Function} scm_dynamic_root ()
Return an object representing the current dynamic root.
These objects are only useful for comparison using @code{eq?}.
@end deffn
read-string!/partial
@c snarfed from rw.c:101
@deffn {Scheme Procedure} read-string!/partial str [port_or_fdes [start [end]]]
@deffnx {C Function} scm_read_string_x_partial (str, port_or_fdes, start, end)
Read characters from a port or file descriptor into a
string @var{str}. A port must have an underlying file
descriptor --- a so-called fport. This procedure is
scsh-compatible and can efficiently read large strings.
It will:
@itemize
@item
attempt to fill the entire string, unless the @var{start}
and/or @var{end} arguments are supplied. i.e., @var{start}
defaults to 0 and @var{end} defaults to
@code{(string-length str)}
@item
use the current input port if @var{port_or_fdes} is not
supplied.
@item
return fewer than the requested number of characters in some
cases, e.g., on end of file, if interrupted by a signal, or if
not all the characters are immediately available.
@item
wait indefinitely for some input if no characters are
currently available,
unless the port is in non-blocking mode.
@item
read characters from the port's input buffers if available,
instead from the underlying file descriptor.
@item
return @code{#f} if end-of-file is encountered before reading
any characters, otherwise return the number of characters
read.
@item
return 0 if the port is in non-blocking mode and no characters
are immediately available.
@item
return 0 if the request is for 0 bytes, with no
end-of-file check.
@end itemize
@end deffn
write-string/partial
@c snarfed from rw.c:205
@deffn {Scheme Procedure} write-string/partial str [port_or_fdes [start [end]]]
@deffnx {C Function} scm_write_string_partial (str, port_or_fdes, start, end)
Write characters from a string @var{str} to a port or file
descriptor. A port must have an underlying file descriptor
--- a so-called fport. This procedure is
scsh-compatible and can efficiently write large strings.
It will:
@itemize
@item
attempt to write the entire string, unless the @var{start}
and/or @var{end} arguments are supplied. i.e., @var{start}
defaults to 0 and @var{end} defaults to
@code{(string-length str)}
@item
use the current output port if @var{port_of_fdes} is not
supplied.
@item
in the case of a buffered port, store the characters in the
port's output buffer, if all will fit. If they will not fit
then any existing buffered characters will be flushed
before attempting
to write the new characters directly to the underlying file
descriptor. If the port is in non-blocking mode and
buffered characters can not be flushed immediately, then an
@code{EAGAIN} system-error exception will be raised (Note:
scsh does not support the use of non-blocking buffered ports.)
@item
write fewer than the requested number of
characters in some cases, e.g., if interrupted by a signal or
if not all of the output can be accepted immediately.
@item
wait indefinitely for at least one character
from @var{str} to be accepted by the port, unless the port is
in non-blocking mode.
@item
return the number of characters accepted by the port.
@item
return 0 if the port is in non-blocking mode and can not accept
at least one character from @var{str} immediately
@item
return 0 immediately if the request size is 0 bytes.
@end itemize
@end deffn
sigaction
@c snarfed from scmsigs.c:253
@deffn {Scheme Procedure} sigaction signum [handler [flags [thread]]]
@deffnx {C Function} scm_sigaction_for_thread (signum, handler, flags, thread)
Install or report the signal handler for a specified signal.
@var{signum} is the signal number, which can be specified using the value
of variables such as @code{SIGINT}.
If @var{handler} is omitted, @code{sigaction} returns a pair: the
CAR is the current
signal hander, which will be either an integer with the value @code{SIG_DFL}
(default action) or @code{SIG_IGN} (ignore), or the Scheme procedure which
handles the signal, or @code{#f} if a non-Scheme procedure handles the
signal. The CDR contains the current @code{sigaction} flags for the handler.
If @var{handler} is provided, it is installed as the new handler for
@var{signum}. @var{handler} can be a Scheme procedure taking one
argument, or the value of @code{SIG_DFL} (default action) or
@code{SIG_IGN} (ignore), or @code{#f} to restore whatever signal handler
was installed before @code{sigaction} was first used. When
a scheme procedure has been specified, that procedure will run
in the given @var{thread}. When no thread has been given, the
thread that made this call to @code{sigaction} is used.
Flags can optionally be specified for the new handler (@code{SA_RESTART} will
always be added if it's available and the system is using restartable
system calls.) The return value is a pair with information about the
old handler as described above.
This interface does not provide access to the "signal blocking"
facility. Maybe this is not needed, since the thread support may
provide solutions to the problem of consistent access to data
structures.
@end deffn
restore-signals
@c snarfed from scmsigs.c:427
@deffn {Scheme Procedure} restore-signals
@deffnx {C Function} scm_restore_signals ()
Return all signal handlers to the values they had before any call to
@code{sigaction} was made. The return value is unspecified.
@end deffn
alarm
@c snarfed from scmsigs.c:464
@deffn {Scheme Procedure} alarm i
@deffnx {C Function} scm_alarm (i)
Set a timer to raise a @code{SIGALRM} signal after the specified
number of seconds (an integer). It's advisable to install a signal
handler for
@code{SIGALRM} beforehand, since the default action is to terminate
the process.
The return value indicates the time remaining for the previous alarm,
if any. The new value replaces the previous alarm. If there was
no previous alarm, the return value is zero.
@end deffn
setitimer
@c snarfed from scmsigs.c:491
@deffn {Scheme Procedure} setitimer which_timer interval_seconds interval_microseconds value_seconds value_microseconds
@deffnx {C Function} scm_setitimer (which_timer, interval_seconds, interval_microseconds, value_seconds, value_microseconds)
Set the timer specified by @var{which_timer} according to the given
@var{interval_seconds}, @var{interval_microseconds},
@var{value_seconds}, and @var{value_microseconds} values.
Return information about the timer's previous setting.
Errors are handled as described in the guile info pages under ``POSIX
Interface Conventions''.
The timers available are: @code{ITIMER_REAL}, @code{ITIMER_VIRTUAL},
and @code{ITIMER_PROF}.
The return value will be a list of two cons pairs representing the
current state of the given timer. The first pair is the seconds and
microseconds of the timer @code{it_interval}, and the second pair is
the seconds and microseconds of the timer @code{it_value}.
@end deffn
getitimer
@c snarfed from scmsigs.c:532
@deffn {Scheme Procedure} getitimer which_timer
@deffnx {C Function} scm_getitimer (which_timer)
Return information about the timer specified by @var{which_timer}
Errors are handled as described in the guile info pages under ``POSIX
Interface Conventions''.
The timers available are: @code{ITIMER_REAL}, @code{ITIMER_VIRTUAL},
and @code{ITIMER_PROF}.
The return value will be a list of two cons pairs representing the
current state of the given timer. The first pair is the seconds and
microseconds of the timer @code{it_interval}, and the second pair is
the seconds and microseconds of the timer @code{it_value}.
@end deffn
pause
@c snarfed from scmsigs.c:559
@deffn {Scheme Procedure} pause
@deffnx {C Function} scm_pause ()
Pause the current process (thread?) until a signal arrives whose
action is to either terminate the current process or invoke a
handler procedure. The return value is unspecified.
@end deffn
sleep
@c snarfed from scmsigs.c:572
@deffn {Scheme Procedure} sleep i
@deffnx {C Function} scm_sleep (i)
Wait for the given number of seconds (an integer) or until a signal
arrives. The return value is zero if the time elapses or the number
of seconds remaining otherwise.
@end deffn
usleep
@c snarfed from scmsigs.c:581
@deffn {Scheme Procedure} usleep i
@deffnx {C Function} scm_usleep (i)
Sleep for @var{i} microseconds.
@end deffn
raise
@c snarfed from scmsigs.c:591
@deffn {Scheme Procedure} raise sig
@deffnx {C Function} scm_raise (sig)
Sends a specified signal @var{sig} to the current process, where
@var{sig} is as described for the kill procedure.
@end deffn
system
@c snarfed from simpos.c:64
@deffn {Scheme Procedure} system [cmd]
@deffnx {C Function} scm_system (cmd)
Execute @var{cmd} using the operating system's "command
processor". Under Unix this is usually the default shell
@code{sh}. The value returned is @var{cmd}'s exit status as
returned by @code{waitpid}, which can be interpreted using
@code{status:exit-val} and friends.
If @code{system} is called without arguments, return a boolean
indicating whether the command processor is available.
@end deffn
system*
@c snarfed from simpos.c:114
@deffn {Scheme Procedure} system* . args
@deffnx {C Function} scm_system_star (args)
Execute the command indicated by @var{args}. The first element must
be a string indicating the command to be executed, and the remaining
items must be strings representing each of the arguments to that
command.
This function returns the exit status of the command as provided by
@code{waitpid}. This value can be handled with @code{status:exit-val}
and the related functions.
@code{system*} is similar to @code{system}, but accepts only one
string per-argument, and performs no shell interpretation. The
command is executed using fork and execlp. Accordingly this function
may be safer than @code{system} in situations where shell
interpretation is not required.
Example: (system* "echo" "foo" "bar")
@end deffn
getenv
@c snarfed from simpos.c:184
@deffn {Scheme Procedure} getenv nam
@deffnx {C Function} scm_getenv (nam)
Looks up the string @var{name} in the current environment. The return
value is @code{#f} unless a string of the form @code{NAME=VALUE} is
found, in which case the string @code{VALUE} is returned.
@end deffn
primitive-exit
@c snarfed from simpos.c:200
@deffn {Scheme Procedure} primitive-exit [status]
@deffnx {C Function} scm_primitive_exit (status)
Terminate the current process without unwinding the Scheme stack.
This is would typically be useful after a fork. The exit status
is @var{status} if supplied, otherwise zero.
@end deffn
restricted-vector-sort!
@c snarfed from sort.c:78
@deffn {Scheme Procedure} restricted-vector-sort! vec less startpos endpos
@deffnx {C Function} scm_restricted_vector_sort_x (vec, less, startpos, endpos)
Sort the vector @var{vec}, using @var{less} for comparing
the vector elements. @var{startpos} (inclusively) and
@var{endpos} (exclusively) delimit
the range of the vector which gets sorted. The return value
is not specified.
@end deffn
sorted?
@c snarfed from sort.c:111
@deffn {Scheme Procedure} sorted? items less
@deffnx {C Function} scm_sorted_p (items, less)
Return @code{#t} iff @var{items} is a list or a vector such that
for all 1 <= i <= m, the predicate @var{less} returns true when
applied to all elements i - 1 and i
@end deffn
merge
@c snarfed from sort.c:186
@deffn {Scheme Procedure} merge alist blist less
@deffnx {C Function} scm_merge (alist, blist, less)
Merge two already sorted lists into one.
Given two lists @var{alist} and @var{blist}, such that
@code{(sorted? alist less?)} and @code{(sorted? blist less?)},
return a new list in which the elements of @var{alist} and
@var{blist} have been stably interleaved so that
@code{(sorted? (merge alist blist less?) less?)}.
Note: this does _not_ accept vectors.
@end deffn
merge!
@c snarfed from sort.c:303
@deffn {Scheme Procedure} merge! alist blist less
@deffnx {C Function} scm_merge_x (alist, blist, less)
Takes two lists @var{alist} and @var{blist} such that
@code{(sorted? alist less?)} and @code{(sorted? blist less?)} and
returns a new list in which the elements of @var{alist} and
@var{blist} have been stably interleaved so that
@code{(sorted? (merge alist blist less?) less?)}.
This is the destructive variant of @code{merge}
Note: this does _not_ accept vectors.
@end deffn
sort!
@c snarfed from sort.c:373
@deffn {Scheme Procedure} sort! items less
@deffnx {C Function} scm_sort_x (items, less)
Sort the sequence @var{items}, which may be a list or a
vector. @var{less} is used for comparing the sequence
elements. The sorting is destructive, that means that the
input sequence is modified to produce the sorted result.
This is not a stable sort.
@end deffn
sort
@c snarfed from sort.c:404
@deffn {Scheme Procedure} sort items less
@deffnx {C Function} scm_sort (items, less)
Sort the sequence @var{items}, which may be a list or a
vector. @var{less} is used for comparing the sequence
elements. This is not a stable sort.
@end deffn
stable-sort!
@c snarfed from sort.c:487
@deffn {Scheme Procedure} stable-sort! items less
@deffnx {C Function} scm_stable_sort_x (items, less)
Sort the sequence @var{items}, which may be a list or a
vector. @var{less} is used for comparing the sequence elements.
The sorting is destructive, that means that the input sequence
is modified to produce the sorted result.
This is a stable sort.
@end deffn
stable-sort
@c snarfed from sort.c:531
@deffn {Scheme Procedure} stable-sort items less
@deffnx {C Function} scm_stable_sort (items, less)
Sort the sequence @var{items}, which may be a list or a
vector. @var{less} is used for comparing the sequence elements.
This is a stable sort.
@end deffn
sort-list!
@c snarfed from sort.c:549
@deffn {Scheme Procedure} sort-list! items less
@deffnx {C Function} scm_sort_list_x (items, less)
Sort the list @var{items}, using @var{less} for comparing the
list elements. The sorting is destructive, that means that the
input list is modified to produce the sorted result.
This is a stable sort.
@end deffn
sort-list
@c snarfed from sort.c:564
@deffn {Scheme Procedure} sort-list items less
@deffnx {C Function} scm_sort_list (items, less)
Sort the list @var{items}, using @var{less} for comparing the
list elements. This is a stable sort.
@end deffn
source-properties
@c snarfed from srcprop.c:153
@deffn {Scheme Procedure} source-properties obj
@deffnx {C Function} scm_source_properties (obj)
Return the source property association list of @var{obj}.
@end deffn
set-source-properties!
@c snarfed from srcprop.c:176
@deffn {Scheme Procedure} set-source-properties! obj plist
@deffnx {C Function} scm_set_source_properties_x (obj, plist)
Install the association list @var{plist} as the source property
list for @var{obj}.
@end deffn
source-property
@c snarfed from srcprop.c:194
@deffn {Scheme Procedure} source-property obj key
@deffnx {C Function} scm_source_property (obj, key)
Return the source property specified by @var{key} from
@var{obj}'s source property list.
@end deffn
set-source-property!
@c snarfed from srcprop.c:225
@deffn {Scheme Procedure} set-source-property! obj key datum
@deffnx {C Function} scm_set_source_property_x (obj, key, datum)
Set the source property of object @var{obj}, which is specified by
@var{key} to @var{datum}. Normally, the key will be a symbol.
@end deffn
stack?
@c snarfed from stacks.c:391
@deffn {Scheme Procedure} stack? obj
@deffnx {C Function} scm_stack_p (obj)
Return @code{#t} if @var{obj} is a calling stack.
@end deffn
make-stack
@c snarfed from stacks.c:422
@deffn {Scheme Procedure} make-stack obj . args
@deffnx {C Function} scm_make_stack (obj, args)
Create a new stack. If @var{obj} is @code{#t}, the current
evaluation stack is used for creating the stack frames,
otherwise the frames are taken from @var{obj} (which must be
either a debug object or a continuation).
@var{args} should be a list containing any combination of
integer, procedure and @code{#t} values.
These values specify various ways of cutting away uninteresting
stack frames from the top and bottom of the stack that
@code{make-stack} returns. They come in pairs like this:
@code{(@var{inner_cut_1} @var{outer_cut_1} @var{inner_cut_2}
@var{outer_cut_2} @dots{})}.
Each @var{inner_cut_N} can be @code{#t}, an integer, or a
procedure. @code{#t} means to cut away all frames up to but
excluding the first user module frame. An integer means to cut
away exactly that number of frames. A procedure means to cut
away all frames up to but excluding the application frame whose
procedure matches the specified one.
Each @var{outer_cut_N} can be an integer or a procedure. An
integer means to cut away that number of frames. A procedure
means to cut away frames down to but excluding the application
frame whose procedure matches the specified one.
If the @var{outer_cut_N} of the last pair is missing, it is
taken as 0.
@end deffn
stack-id
@c snarfed from stacks.c:511
@deffn {Scheme Procedure} stack-id stack
@deffnx {C Function} scm_stack_id (stack)
Return the identifier given to @var{stack} by @code{start-stack}.
@end deffn
stack-ref
@c snarfed from stacks.c:549
@deffn {Scheme Procedure} stack-ref stack index
@deffnx {C Function} scm_stack_ref (stack, index)
Return the @var{index}'th frame from @var{stack}.
@end deffn
stack-length
@c snarfed from stacks.c:562
@deffn {Scheme Procedure} stack-length stack
@deffnx {C Function} scm_stack_length (stack)
Return the length of @var{stack}.
@end deffn
frame?
@c snarfed from stacks.c:575
@deffn {Scheme Procedure} frame? obj
@deffnx {C Function} scm_frame_p (obj)
Return @code{#t} if @var{obj} is a stack frame.
@end deffn
last-stack-frame
@c snarfed from stacks.c:586
@deffn {Scheme Procedure} last-stack-frame obj
@deffnx {C Function} scm_last_stack_frame (obj)
Return a stack which consists of a single frame, which is the
last stack frame for @var{obj}. @var{obj} must be either a
debug object or a continuation.
@end deffn
frame-number
@c snarfed from stacks.c:625
@deffn {Scheme Procedure} frame-number frame
@deffnx {C Function} scm_frame_number (frame)
Return the frame number of @var{frame}.
@end deffn
frame-source
@c snarfed from stacks.c:635
@deffn {Scheme Procedure} frame-source frame
@deffnx {C Function} scm_frame_source (frame)
Return the source of @var{frame}.
@end deffn
frame-procedure
@c snarfed from stacks.c:646
@deffn {Scheme Procedure} frame-procedure frame
@deffnx {C Function} scm_frame_procedure (frame)
Return the procedure for @var{frame}, or @code{#f} if no
procedure is associated with @var{frame}.
@end deffn
frame-arguments
@c snarfed from stacks.c:658
@deffn {Scheme Procedure} frame-arguments frame
@deffnx {C Function} scm_frame_arguments (frame)
Return the arguments of @var{frame}.
@end deffn
frame-previous
@c snarfed from stacks.c:669
@deffn {Scheme Procedure} frame-previous frame
@deffnx {C Function} scm_frame_previous (frame)
Return the previous frame of @var{frame}, or @code{#f} if
@var{frame} is the first frame in its stack.
@end deffn
frame-next
@c snarfed from stacks.c:685
@deffn {Scheme Procedure} frame-next frame
@deffnx {C Function} scm_frame_next (frame)
Return the next frame of @var{frame}, or @code{#f} if
@var{frame} is the last frame in its stack.
@end deffn
frame-real?
@c snarfed from stacks.c:700
@deffn {Scheme Procedure} frame-real? frame
@deffnx {C Function} scm_frame_real_p (frame)
Return @code{#t} if @var{frame} is a real frame.
@end deffn
frame-procedure?
@c snarfed from stacks.c:710
@deffn {Scheme Procedure} frame-procedure? frame
@deffnx {C Function} scm_frame_procedure_p (frame)
Return @code{#t} if a procedure is associated with @var{frame}.
@end deffn
frame-evaluating-args?
@c snarfed from stacks.c:720
@deffn {Scheme Procedure} frame-evaluating-args? frame
@deffnx {C Function} scm_frame_evaluating_args_p (frame)
Return @code{#t} if @var{frame} contains evaluated arguments.
@end deffn
frame-overflow?
@c snarfed from stacks.c:730
@deffn {Scheme Procedure} frame-overflow? frame
@deffnx {C Function} scm_frame_overflow_p (frame)
Return @code{#t} if @var{frame} is an overflow frame.
@end deffn
get-internal-real-time
@c snarfed from stime.c:133
@deffn {Scheme Procedure} get-internal-real-time
@deffnx {C Function} scm_get_internal_real_time ()
Return the number of time units since the interpreter was
started.
@end deffn
times
@c snarfed from stime.c:180
@deffn {Scheme Procedure} times
@deffnx {C Function} scm_times ()
Return an object with information about real and processor
time. The following procedures accept such an object as an
argument and return a selected component:
@table @code
@item tms:clock
The current real time, expressed as time units relative to an
arbitrary base.
@item tms:utime
The CPU time units used by the calling process.
@item tms:stime
The CPU time units used by the system on behalf of the calling
process.
@item tms:cutime
The CPU time units used by terminated child processes of the
calling process, whose status has been collected (e.g., using
@code{waitpid}).
@item tms:cstime
Similarly, the CPU times units used by the system on behalf of
terminated child processes.
@end table
@end deffn
get-internal-run-time
@c snarfed from stime.c:212
@deffn {Scheme Procedure} get-internal-run-time
@deffnx {C Function} scm_get_internal_run_time ()
Return the number of time units of processor time used by the
interpreter. Both @emph{system} and @emph{user} time are
included but subprocesses are not.
@end deffn
current-time
@c snarfed from stime.c:229
@deffn {Scheme Procedure} current-time
@deffnx {C Function} scm_current_time ()
Return the number of seconds since 1970-01-01 00:00:00 UTC,
excluding leap seconds.
@end deffn
gettimeofday
@c snarfed from stime.c:248
@deffn {Scheme Procedure} gettimeofday
@deffnx {C Function} scm_gettimeofday ()
Return a pair containing the number of seconds and microseconds
since 1970-01-01 00:00:00 UTC, excluding leap seconds. Note:
whether true microsecond resolution is available depends on the
operating system.
@end deffn
localtime
@c snarfed from stime.c:364
@deffn {Scheme Procedure} localtime time [zone]
@deffnx {C Function} scm_localtime (time, zone)
Return an object representing the broken down components of
@var{time}, an integer like the one returned by
@code{current-time}. The time zone for the calculation is
optionally specified by @var{zone} (a string), otherwise the
@code{TZ} environment variable or the system default is used.
@end deffn
gmtime
@c snarfed from stime.c:449
@deffn {Scheme Procedure} gmtime time
@deffnx {C Function} scm_gmtime (time)
Return an object representing the broken down components of
@var{time}, an integer like the one returned by
@code{current-time}. The values are calculated for UTC.
@end deffn
mktime
@c snarfed from stime.c:517
@deffn {Scheme Procedure} mktime sbd_time [zone]
@deffnx {C Function} scm_mktime (sbd_time, zone)
@var{bd-time} is an object representing broken down time and @code{zone}
is an optional time zone specifier (otherwise the TZ environment variable
or the system default is used).
Returns a pair: the car is a corresponding
integer time value like that returned
by @code{current-time}; the cdr is a broken down time object, similar to
as @var{bd-time} but with normalized values.
@end deffn
tzset
@c snarfed from stime.c:603
@deffn {Scheme Procedure} tzset
@deffnx {C Function} scm_tzset ()
Initialize the timezone from the TZ environment variable
or the system default. It's not usually necessary to call this procedure
since it's done automatically by other procedures that depend on the
timezone.
@end deffn
strftime
@c snarfed from stime.c:620
@deffn {Scheme Procedure} strftime format stime
@deffnx {C Function} scm_strftime (format, stime)
Formats a time specification @var{time} using @var{template}. @var{time}
is an object with time components in the form returned by @code{localtime}
or @code{gmtime}. @var{template} is a string which can include formatting
specifications introduced by a @code{%} character. The formatting of
month and day names is dependent on the current locale. The value returned
is the formatted string.
@xref{Formatting Date and Time, , , libc, The GNU C Library Reference Manual}.)
@end deffn
strptime
@c snarfed from stime.c:721
@deffn {Scheme Procedure} strptime format string
@deffnx {C Function} scm_strptime (format, string)
Performs the reverse action to @code{strftime}, parsing
@var{string} according to the specification supplied in
@var{template}. The interpretation of month and day names is
dependent on the current locale. The value returned is a pair.
The car has an object with time components
in the form returned by @code{localtime} or @code{gmtime},
but the time zone components
are not usefully set.
The cdr reports the number of characters from @var{string}
which were used for the conversion.
@end deffn
string?
@c snarfed from strings.c:526
@deffn {Scheme Procedure} string? obj
@deffnx {C Function} scm_string_p (obj)
Return @code{#t} if @var{obj} is a string, else @code{#f}.
@end deffn
list->string
@c snarfed from strings.c:534
@deffn {Scheme Procedure} list->string
implemented by the C function "scm_string"
@end deffn
string
@c snarfed from strings.c:540
@deffn {Scheme Procedure} string . chrs
@deffnx {Scheme Procedure} list->string chrs
@deffnx {C Function} scm_string (chrs)
Return a newly allocated string composed of the arguments,
@var{chrs}.
@end deffn
make-string
@c snarfed from strings.c:578
@deffn {Scheme Procedure} make-string k [chr]
@deffnx {C Function} scm_make_string (k, chr)
Return a newly allocated string of
length @var{k}. If @var{chr} is given, then all elements of
the string are initialized to @var{chr}, otherwise the contents
of the @var{string} are unspecified.
@end deffn
string-length
@c snarfed from strings.c:604
@deffn {Scheme Procedure} string-length string
@deffnx {C Function} scm_string_length (string)
Return the number of characters in @var{string}.
@end deffn
string-ref
@c snarfed from strings.c:623
@deffn {Scheme Procedure} string-ref str k
@deffnx {C Function} scm_string_ref (str, k)
Return character @var{k} of @var{str} using zero-origin
indexing. @var{k} must be a valid index of @var{str}.
@end deffn
string-set!
@c snarfed from strings.c:646
@deffn {Scheme Procedure} string-set! str k chr
@deffnx {C Function} scm_string_set_x (str, k, chr)
Store @var{chr} in element @var{k} of @var{str} and return
an unspecified value. @var{k} must be a valid index of
@var{str}.
@end deffn
substring
@c snarfed from strings.c:682
@deffn {Scheme Procedure} substring str start [end]
@deffnx {C Function} scm_substring (str, start, end)
Return a newly allocated string formed from the characters
of @var{str} beginning with index @var{start} (inclusive) and
ending with index @var{end} (exclusive).
@var{str} must be a string, @var{start} and @var{end} must be
exact integers satisfying:
0 <= @var{start} <= @var{end} <= (string-length @var{str}).
@end deffn
substring/read-only
@c snarfed from strings.c:708
@deffn {Scheme Procedure} substring/read-only str start [end]
@deffnx {C Function} scm_substring_read_only (str, start, end)
Return a newly allocated string formed from the characters
of @var{str} beginning with index @var{start} (inclusive) and
ending with index @var{end} (exclusive).
@var{str} must be a string, @var{start} and @var{end} must be
exact integers satisfying:
0 <= @var{start} <= @var{end} <= (string-length @var{str}).
The returned string is read-only.
@end deffn
substring/copy
@c snarfed from strings.c:731
@deffn {Scheme Procedure} substring/copy str start [end]
@deffnx {C Function} scm_substring_copy (str, start, end)
Return a newly allocated string formed from the characters
of @var{str} beginning with index @var{start} (inclusive) and
ending with index @var{end} (exclusive).
@var{str} must be a string, @var{start} and @var{end} must be
exact integers satisfying:
0 <= @var{start} <= @var{end} <= (string-length @var{str}).
@end deffn
substring/shared
@c snarfed from strings.c:755
@deffn {Scheme Procedure} substring/shared str start [end]
@deffnx {C Function} scm_substring_shared (str, start, end)
Return string that indirectly refers to the characters
of @var{str} beginning with index @var{start} (inclusive) and
ending with index @var{end} (exclusive).
@var{str} must be a string, @var{start} and @var{end} must be
exact integers satisfying:
0 <= @var{start} <= @var{end} <= (string-length @var{str}).
@end deffn
string-append
@c snarfed from strings.c:774
@deffn {Scheme Procedure} string-append . args
@deffnx {C Function} scm_string_append (args)
Return a newly allocated string whose characters form the
concatenation of the given strings, @var{args}.
@end deffn
uniform-vector?
@c snarfed from srfi-4.c:651
@deffn {Scheme Procedure} uniform-vector? obj
@deffnx {C Function} scm_uniform_vector_p (obj)
Return @code{#t} if @var{obj} is a uniform vector.
@end deffn
uniform-vector-ref
@c snarfed from srfi-4.c:677
@deffn {Scheme Procedure} uniform-vector-ref v idx
@deffnx {C Function} scm_uniform_vector_ref (v, idx)
Return the element at index @var{idx} of the
homogenous numeric vector @var{v}.
@end deffn
uniform-vector-set!
@c snarfed from srfi-4.c:714
@deffn {Scheme Procedure} uniform-vector-set! v idx val
@deffnx {C Function} scm_uniform_vector_set_x (v, idx, val)
Set the element at index @var{idx} of the
homogenous numeric vector @var{v} to @var{val}.
@end deffn
uniform-vector->list
@c snarfed from srfi-4.c:737
@deffn {Scheme Procedure} uniform-vector->list uvec
@deffnx {C Function} scm_uniform_vector_to_list (uvec)
Convert the uniform numeric vector @var{uvec} to a list.
@end deffn
uniform-vector-length
@c snarfed from srfi-4.c:820
@deffn {Scheme Procedure} uniform-vector-length v
@deffnx {C Function} scm_uniform_vector_length (v)
Return the number of elements in the uniform vector @var{v}.
@end deffn
uniform-vector-read!
@c snarfed from srfi-4.c:845
@deffn {Scheme Procedure} uniform-array-read! ura [port_or_fd [start [end]]]
@deffnx {Scheme Procedure} uniform-vector-read! uve [port-or-fdes] [start] [end]
@deffnx {C Function} scm_uniform_array_read_x (ura, port_or_fd, start, end)
Attempt to read all elements of @var{ura}, in lexicographic order, as
binary objects from @var{port-or-fdes}.
If an end of file is encountered,
the objects up to that point are put into @var{ura}
(starting at the beginning) and the remainder of the array is
unchanged.
The optional arguments @var{start} and @var{end} allow
a specified region of a vector (or linearized array) to be read,
leaving the remainder of the vector unchanged.
@code{uniform-array-read!} returns the number of objects read.
@var{port-or-fdes} may be omitted, in which case it defaults to the value
returned by @code{(current-input-port)}.
@end deffn
uniform-vector-write
@c snarfed from srfi-4.c:958
@deffn {Scheme Procedure} uniform-vector-write uvec [port_or_fd [start [end]]]
@deffnx {C Function} scm_uniform_vector_write (uvec, port_or_fd, start, end)
Write the elements of @var{uvec} as raw bytes to
@var{port-or-fdes}, in the host byte order.
The optional arguments @var{start} (inclusive)
and @var{end} (exclusive) allow
a specified region to be written.
When @var{port-or-fdes} is a port, all specified elements
of @var{uvec} are attempted to be written, potentially blocking
while waiting for more room.
When @var{port-or-fd} is an integer, a single call to
write(2) is made.
An error is signalled when the last element has only
been partially written in the single call to write(2).
The number of objects actually written is returned.
@var{port-or-fdes} may be
omitted, in which case it defaults to the value returned by
@code{(current-output-port)}.
@end deffn
u8vector?
@c snarfed from ../libguile/srfi-4.i.c:41
@deffn {Scheme Procedure} u8vector? obj
@deffnx {C Function} scm_u8vector_p (obj)
Return @code{#t} if @var{obj} is a vector of type u8,
@code{#f} otherwise.
@end deffn
make-u8vector
@c snarfed from ../libguile/srfi-4.i.c:53
@deffn {Scheme Procedure} make-u8vector len [fill]
@deffnx {C Function} scm_make_u8vector (len, fill)
Return a newly allocated uniform numeric vector which can
hold @var{len} elements. If @var{fill} is given, it is used to
initialize the elements, otherwise the contents of the vector
is unspecified.
@end deffn
u8vector
@c snarfed from ../libguile/srfi-4.i.c:63
@deffn {Scheme Procedure} u8vector . l
@deffnx {C Function} scm_u8vector (l)
Return a newly allocated uniform numeric vector containing
all argument values.
@end deffn
u8vector-length
@c snarfed from ../libguile/srfi-4.i.c:74
@deffn {Scheme Procedure} u8vector-length uvec
@deffnx {C Function} scm_u8vector_length (uvec)
Return the number of elements in the uniform numeric vector
@var{uvec}.
@end deffn
u8vector-ref
@c snarfed from ../libguile/srfi-4.i.c:85
@deffn {Scheme Procedure} u8vector-ref uvec index
@deffnx {C Function} scm_u8vector_ref (uvec, index)
Return the element at @var{index} in the uniform numeric
vector @var{uvec}.
@end deffn
u8vector-set!
@c snarfed from ../libguile/srfi-4.i.c:97
@deffn {Scheme Procedure} u8vector-set! uvec index value
@deffnx {C Function} scm_u8vector_set_x (uvec, index, value)
Set the element at @var{index} in the uniform numeric
vector @var{uvec} to @var{value}. The return value is not
specified.
@end deffn
u8vector->list
@c snarfed from ../libguile/srfi-4.i.c:107
@deffn {Scheme Procedure} u8vector->list uvec
@deffnx {C Function} scm_u8vector_to_list (uvec)
Convert the uniform numeric vector @var{uvec} to a list.
@end deffn
list->u8vector
@c snarfed from ../libguile/srfi-4.i.c:117
@deffn {Scheme Procedure} list->u8vector l
@deffnx {C Function} scm_list_to_u8vector (l)
Convert the list @var{l} to a numeric uniform vector.
@end deffn
any->u8vector
@c snarfed from ../libguile/srfi-4.i.c:128
@deffn {Scheme Procedure} any->u8vector obj
@deffnx {C Function} scm_any_to_u8vector (obj)
Convert @var{obj}, which can be a list, vector, or
uniform vector, to a numeric uniform vector of
type u8.
@end deffn
s8vector?
@c snarfed from ../libguile/srfi-4.i.c:41
@deffn {Scheme Procedure} s8vector? obj
@deffnx {C Function} scm_s8vector_p (obj)
Return @code{#t} if @var{obj} is a vector of type s8,
@code{#f} otherwise.
@end deffn
make-s8vector
@c snarfed from ../libguile/srfi-4.i.c:53
@deffn {Scheme Procedure} make-s8vector len [fill]
@deffnx {C Function} scm_make_s8vector (len, fill)
Return a newly allocated uniform numeric vector which can
hold @var{len} elements. If @var{fill} is given, it is used to
initialize the elements, otherwise the contents of the vector
is unspecified.
@end deffn
s8vector
@c snarfed from ../libguile/srfi-4.i.c:63
@deffn {Scheme Procedure} s8vector . l
@deffnx {C Function} scm_s8vector (l)
Return a newly allocated uniform numeric vector containing
all argument values.
@end deffn
s8vector-length
@c snarfed from ../libguile/srfi-4.i.c:74
@deffn {Scheme Procedure} s8vector-length uvec
@deffnx {C Function} scm_s8vector_length (uvec)
Return the number of elements in the uniform numeric vector
@var{uvec}.
@end deffn
s8vector-ref
@c snarfed from ../libguile/srfi-4.i.c:85
@deffn {Scheme Procedure} s8vector-ref uvec index
@deffnx {C Function} scm_s8vector_ref (uvec, index)
Return the element at @var{index} in the uniform numeric
vector @var{uvec}.
@end deffn
s8vector-set!
@c snarfed from ../libguile/srfi-4.i.c:97
@deffn {Scheme Procedure} s8vector-set! uvec index value
@deffnx {C Function} scm_s8vector_set_x (uvec, index, value)
Set the element at @var{index} in the uniform numeric
vector @var{uvec} to @var{value}. The return value is not
specified.
@end deffn
s8vector->list
@c snarfed from ../libguile/srfi-4.i.c:107
@deffn {Scheme Procedure} s8vector->list uvec
@deffnx {C Function} scm_s8vector_to_list (uvec)
Convert the uniform numeric vector @var{uvec} to a list.
@end deffn
list->s8vector
@c snarfed from ../libguile/srfi-4.i.c:117
@deffn {Scheme Procedure} list->s8vector l
@deffnx {C Function} scm_list_to_s8vector (l)
Convert the list @var{l} to a numeric uniform vector.
@end deffn
any->s8vector
@c snarfed from ../libguile/srfi-4.i.c:128
@deffn {Scheme Procedure} any->s8vector obj
@deffnx {C Function} scm_any_to_s8vector (obj)
Convert @var{obj}, which can be a list, vector, or
uniform vector, to a numeric uniform vector of
type s8.
@end deffn
u16vector?
@c snarfed from ../libguile/srfi-4.i.c:41
@deffn {Scheme Procedure} u16vector? obj
@deffnx {C Function} scm_u16vector_p (obj)
Return @code{#t} if @var{obj} is a vector of type u16,
@code{#f} otherwise.
@end deffn
make-u16vector
@c snarfed from ../libguile/srfi-4.i.c:53
@deffn {Scheme Procedure} make-u16vector len [fill]
@deffnx {C Function} scm_make_u16vector (len, fill)
Return a newly allocated uniform numeric vector which can
hold @var{len} elements. If @var{fill} is given, it is used to
initialize the elements, otherwise the contents of the vector
is unspecified.
@end deffn
u16vector
@c snarfed from ../libguile/srfi-4.i.c:63
@deffn {Scheme Procedure} u16vector . l
@deffnx {C Function} scm_u16vector (l)
Return a newly allocated uniform numeric vector containing
all argument values.
@end deffn
u16vector-length
@c snarfed from ../libguile/srfi-4.i.c:74
@deffn {Scheme Procedure} u16vector-length uvec
@deffnx {C Function} scm_u16vector_length (uvec)
Return the number of elements in the uniform numeric vector
@var{uvec}.
@end deffn
u16vector-ref
@c snarfed from ../libguile/srfi-4.i.c:85
@deffn {Scheme Procedure} u16vector-ref uvec index
@deffnx {C Function} scm_u16vector_ref (uvec, index)
Return the element at @var{index} in the uniform numeric
vector @var{uvec}.
@end deffn
u16vector-set!
@c snarfed from ../libguile/srfi-4.i.c:97
@deffn {Scheme Procedure} u16vector-set! uvec index value
@deffnx {C Function} scm_u16vector_set_x (uvec, index, value)
Set the element at @var{index} in the uniform numeric
vector @var{uvec} to @var{value}. The return value is not
specified.
@end deffn
u16vector->list
@c snarfed from ../libguile/srfi-4.i.c:107
@deffn {Scheme Procedure} u16vector->list uvec
@deffnx {C Function} scm_u16vector_to_list (uvec)
Convert the uniform numeric vector @var{uvec} to a list.
@end deffn
list->u16vector
@c snarfed from ../libguile/srfi-4.i.c:117
@deffn {Scheme Procedure} list->u16vector l
@deffnx {C Function} scm_list_to_u16vector (l)
Convert the list @var{l} to a numeric uniform vector.
@end deffn
any->u16vector
@c snarfed from ../libguile/srfi-4.i.c:128
@deffn {Scheme Procedure} any->u16vector obj
@deffnx {C Function} scm_any_to_u16vector (obj)
Convert @var{obj}, which can be a list, vector, or
uniform vector, to a numeric uniform vector of
type u16.
@end deffn
s16vector?
@c snarfed from ../libguile/srfi-4.i.c:41
@deffn {Scheme Procedure} s16vector? obj
@deffnx {C Function} scm_s16vector_p (obj)
Return @code{#t} if @var{obj} is a vector of type s16,
@code{#f} otherwise.
@end deffn
make-s16vector
@c snarfed from ../libguile/srfi-4.i.c:53
@deffn {Scheme Procedure} make-s16vector len [fill]
@deffnx {C Function} scm_make_s16vector (len, fill)
Return a newly allocated uniform numeric vector which can
hold @var{len} elements. If @var{fill} is given, it is used to
initialize the elements, otherwise the contents of the vector
is unspecified.
@end deffn
s16vector
@c snarfed from ../libguile/srfi-4.i.c:63
@deffn {Scheme Procedure} s16vector . l
@deffnx {C Function} scm_s16vector (l)
Return a newly allocated uniform numeric vector containing
all argument values.
@end deffn
s16vector-length
@c snarfed from ../libguile/srfi-4.i.c:74
@deffn {Scheme Procedure} s16vector-length uvec
@deffnx {C Function} scm_s16vector_length (uvec)
Return the number of elements in the uniform numeric vector
@var{uvec}.
@end deffn
s16vector-ref
@c snarfed from ../libguile/srfi-4.i.c:85
@deffn {Scheme Procedure} s16vector-ref uvec index
@deffnx {C Function} scm_s16vector_ref (uvec, index)
Return the element at @var{index} in the uniform numeric
vector @var{uvec}.
@end deffn
s16vector-set!
@c snarfed from ../libguile/srfi-4.i.c:97
@deffn {Scheme Procedure} s16vector-set! uvec index value
@deffnx {C Function} scm_s16vector_set_x (uvec, index, value)
Set the element at @var{index} in the uniform numeric
vector @var{uvec} to @var{value}. The return value is not
specified.
@end deffn
s16vector->list
@c snarfed from ../libguile/srfi-4.i.c:107
@deffn {Scheme Procedure} s16vector->list uvec
@deffnx {C Function} scm_s16vector_to_list (uvec)
Convert the uniform numeric vector @var{uvec} to a list.
@end deffn
list->s16vector
@c snarfed from ../libguile/srfi-4.i.c:117
@deffn {Scheme Procedure} list->s16vector l
@deffnx {C Function} scm_list_to_s16vector (l)
Convert the list @var{l} to a numeric uniform vector.
@end deffn
any->s16vector
@c snarfed from ../libguile/srfi-4.i.c:128
@deffn {Scheme Procedure} any->s16vector obj
@deffnx {C Function} scm_any_to_s16vector (obj)
Convert @var{obj}, which can be a list, vector, or
uniform vector, to a numeric uniform vector of
type s16.
@end deffn
u32vector?
@c snarfed from ../libguile/srfi-4.i.c:41
@deffn {Scheme Procedure} u32vector? obj
@deffnx {C Function} scm_u32vector_p (obj)
Return @code{#t} if @var{obj} is a vector of type u32,
@code{#f} otherwise.
@end deffn
make-u32vector
@c snarfed from ../libguile/srfi-4.i.c:53
@deffn {Scheme Procedure} make-u32vector len [fill]
@deffnx {C Function} scm_make_u32vector (len, fill)
Return a newly allocated uniform numeric vector which can
hold @var{len} elements. If @var{fill} is given, it is used to
initialize the elements, otherwise the contents of the vector
is unspecified.
@end deffn
u32vector
@c snarfed from ../libguile/srfi-4.i.c:63
@deffn {Scheme Procedure} u32vector . l
@deffnx {C Function} scm_u32vector (l)
Return a newly allocated uniform numeric vector containing
all argument values.
@end deffn
u32vector-length
@c snarfed from ../libguile/srfi-4.i.c:74
@deffn {Scheme Procedure} u32vector-length uvec
@deffnx {C Function} scm_u32vector_length (uvec)
Return the number of elements in the uniform numeric vector
@var{uvec}.
@end deffn
u32vector-ref
@c snarfed from ../libguile/srfi-4.i.c:85
@deffn {Scheme Procedure} u32vector-ref uvec index
@deffnx {C Function} scm_u32vector_ref (uvec, index)
Return the element at @var{index} in the uniform numeric
vector @var{uvec}.
@end deffn
u32vector-set!
@c snarfed from ../libguile/srfi-4.i.c:97
@deffn {Scheme Procedure} u32vector-set! uvec index value
@deffnx {C Function} scm_u32vector_set_x (uvec, index, value)
Set the element at @var{index} in the uniform numeric
vector @var{uvec} to @var{value}. The return value is not
specified.
@end deffn
u32vector->list
@c snarfed from ../libguile/srfi-4.i.c:107
@deffn {Scheme Procedure} u32vector->list uvec
@deffnx {C Function} scm_u32vector_to_list (uvec)
Convert the uniform numeric vector @var{uvec} to a list.
@end deffn
list->u32vector
@c snarfed from ../libguile/srfi-4.i.c:117
@deffn {Scheme Procedure} list->u32vector l
@deffnx {C Function} scm_list_to_u32vector (l)
Convert the list @var{l} to a numeric uniform vector.
@end deffn
any->u32vector
@c snarfed from ../libguile/srfi-4.i.c:128
@deffn {Scheme Procedure} any->u32vector obj
@deffnx {C Function} scm_any_to_u32vector (obj)
Convert @var{obj}, which can be a list, vector, or
uniform vector, to a numeric uniform vector of
type u32.
@end deffn
s32vector?
@c snarfed from ../libguile/srfi-4.i.c:41
@deffn {Scheme Procedure} s32vector? obj
@deffnx {C Function} scm_s32vector_p (obj)
Return @code{#t} if @var{obj} is a vector of type s32,
@code{#f} otherwise.
@end deffn
make-s32vector
@c snarfed from ../libguile/srfi-4.i.c:53
@deffn {Scheme Procedure} make-s32vector len [fill]
@deffnx {C Function} scm_make_s32vector (len, fill)
Return a newly allocated uniform numeric vector which can
hold @var{len} elements. If @var{fill} is given, it is used to
initialize the elements, otherwise the contents of the vector
is unspecified.
@end deffn
s32vector
@c snarfed from ../libguile/srfi-4.i.c:63
@deffn {Scheme Procedure} s32vector . l
@deffnx {C Function} scm_s32vector (l)
Return a newly allocated uniform numeric vector containing
all argument values.
@end deffn
s32vector-length
@c snarfed from ../libguile/srfi-4.i.c:74
@deffn {Scheme Procedure} s32vector-length uvec
@deffnx {C Function} scm_s32vector_length (uvec)
Return the number of elements in the uniform numeric vector
@var{uvec}.
@end deffn
s32vector-ref
@c snarfed from ../libguile/srfi-4.i.c:85
@deffn {Scheme Procedure} s32vector-ref uvec index
@deffnx {C Function} scm_s32vector_ref (uvec, index)
Return the element at @var{index} in the uniform numeric
vector @var{uvec}.
@end deffn
s32vector-set!
@c snarfed from ../libguile/srfi-4.i.c:97
@deffn {Scheme Procedure} s32vector-set! uvec index value
@deffnx {C Function} scm_s32vector_set_x (uvec, index, value)
Set the element at @var{index} in the uniform numeric
vector @var{uvec} to @var{value}. The return value is not
specified.
@end deffn
s32vector->list
@c snarfed from ../libguile/srfi-4.i.c:107
@deffn {Scheme Procedure} s32vector->list uvec
@deffnx {C Function} scm_s32vector_to_list (uvec)
Convert the uniform numeric vector @var{uvec} to a list.
@end deffn
list->s32vector
@c snarfed from ../libguile/srfi-4.i.c:117
@deffn {Scheme Procedure} list->s32vector l
@deffnx {C Function} scm_list_to_s32vector (l)
Convert the list @var{l} to a numeric uniform vector.
@end deffn
any->s32vector
@c snarfed from ../libguile/srfi-4.i.c:128
@deffn {Scheme Procedure} any->s32vector obj
@deffnx {C Function} scm_any_to_s32vector (obj)
Convert @var{obj}, which can be a list, vector, or
uniform vector, to a numeric uniform vector of
type s32.
@end deffn
u64vector?
@c snarfed from ../libguile/srfi-4.i.c:41
@deffn {Scheme Procedure} u64vector? obj
@deffnx {C Function} scm_u64vector_p (obj)
Return @code{#t} if @var{obj} is a vector of type u64,
@code{#f} otherwise.
@end deffn
make-u64vector
@c snarfed from ../libguile/srfi-4.i.c:53
@deffn {Scheme Procedure} make-u64vector len [fill]
@deffnx {C Function} scm_make_u64vector (len, fill)
Return a newly allocated uniform numeric vector which can
hold @var{len} elements. If @var{fill} is given, it is used to
initialize the elements, otherwise the contents of the vector
is unspecified.
@end deffn
u64vector
@c snarfed from ../libguile/srfi-4.i.c:63
@deffn {Scheme Procedure} u64vector . l
@deffnx {C Function} scm_u64vector (l)
Return a newly allocated uniform numeric vector containing
all argument values.
@end deffn
u64vector-length
@c snarfed from ../libguile/srfi-4.i.c:74
@deffn {Scheme Procedure} u64vector-length uvec
@deffnx {C Function} scm_u64vector_length (uvec)
Return the number of elements in the uniform numeric vector
@var{uvec}.
@end deffn
u64vector-ref
@c snarfed from ../libguile/srfi-4.i.c:85
@deffn {Scheme Procedure} u64vector-ref uvec index
@deffnx {C Function} scm_u64vector_ref (uvec, index)
Return the element at @var{index} in the uniform numeric
vector @var{uvec}.
@end deffn
u64vector-set!
@c snarfed from ../libguile/srfi-4.i.c:97
@deffn {Scheme Procedure} u64vector-set! uvec index value
@deffnx {C Function} scm_u64vector_set_x (uvec, index, value)
Set the element at @var{index} in the uniform numeric
vector @var{uvec} to @var{value}. The return value is not
specified.
@end deffn
u64vector->list
@c snarfed from ../libguile/srfi-4.i.c:107
@deffn {Scheme Procedure} u64vector->list uvec
@deffnx {C Function} scm_u64vector_to_list (uvec)
Convert the uniform numeric vector @var{uvec} to a list.
@end deffn
list->u64vector
@c snarfed from ../libguile/srfi-4.i.c:117
@deffn {Scheme Procedure} list->u64vector l
@deffnx {C Function} scm_list_to_u64vector (l)
Convert the list @var{l} to a numeric uniform vector.
@end deffn
any->u64vector
@c snarfed from ../libguile/srfi-4.i.c:128
@deffn {Scheme Procedure} any->u64vector obj
@deffnx {C Function} scm_any_to_u64vector (obj)
Convert @var{obj}, which can be a list, vector, or
uniform vector, to a numeric uniform vector of
type u64.
@end deffn
s64vector?
@c snarfed from ../libguile/srfi-4.i.c:41
@deffn {Scheme Procedure} s64vector? obj
@deffnx {C Function} scm_s64vector_p (obj)
Return @code{#t} if @var{obj} is a vector of type s64,
@code{#f} otherwise.
@end deffn
make-s64vector
@c snarfed from ../libguile/srfi-4.i.c:53
@deffn {Scheme Procedure} make-s64vector len [fill]
@deffnx {C Function} scm_make_s64vector (len, fill)
Return a newly allocated uniform numeric vector which can
hold @var{len} elements. If @var{fill} is given, it is used to
initialize the elements, otherwise the contents of the vector
is unspecified.
@end deffn
s64vector
@c snarfed from ../libguile/srfi-4.i.c:63
@deffn {Scheme Procedure} s64vector . l
@deffnx {C Function} scm_s64vector (l)
Return a newly allocated uniform numeric vector containing
all argument values.
@end deffn
s64vector-length
@c snarfed from ../libguile/srfi-4.i.c:74
@deffn {Scheme Procedure} s64vector-length uvec
@deffnx {C Function} scm_s64vector_length (uvec)
Return the number of elements in the uniform numeric vector
@var{uvec}.
@end deffn
s64vector-ref
@c snarfed from ../libguile/srfi-4.i.c:85
@deffn {Scheme Procedure} s64vector-ref uvec index
@deffnx {C Function} scm_s64vector_ref (uvec, index)
Return the element at @var{index} in the uniform numeric
vector @var{uvec}.
@end deffn
s64vector-set!
@c snarfed from ../libguile/srfi-4.i.c:97
@deffn {Scheme Procedure} s64vector-set! uvec index value
@deffnx {C Function} scm_s64vector_set_x (uvec, index, value)
Set the element at @var{index} in the uniform numeric
vector @var{uvec} to @var{value}. The return value is not
specified.
@end deffn
s64vector->list
@c snarfed from ../libguile/srfi-4.i.c:107
@deffn {Scheme Procedure} s64vector->list uvec
@deffnx {C Function} scm_s64vector_to_list (uvec)
Convert the uniform numeric vector @var{uvec} to a list.
@end deffn
list->s64vector
@c snarfed from ../libguile/srfi-4.i.c:117
@deffn {Scheme Procedure} list->s64vector l
@deffnx {C Function} scm_list_to_s64vector (l)
Convert the list @var{l} to a numeric uniform vector.
@end deffn
any->s64vector
@c snarfed from ../libguile/srfi-4.i.c:128
@deffn {Scheme Procedure} any->s64vector obj
@deffnx {C Function} scm_any_to_s64vector (obj)
Convert @var{obj}, which can be a list, vector, or
uniform vector, to a numeric uniform vector of
type s64.
@end deffn
f32vector?
@c snarfed from ../libguile/srfi-4.i.c:41
@deffn {Scheme Procedure} f32vector? obj
@deffnx {C Function} scm_f32vector_p (obj)
Return @code{#t} if @var{obj} is a vector of type f32,
@code{#f} otherwise.
@end deffn
make-f32vector
@c snarfed from ../libguile/srfi-4.i.c:53
@deffn {Scheme Procedure} make-f32vector len [fill]
@deffnx {C Function} scm_make_f32vector (len, fill)
Return a newly allocated uniform numeric vector which can
hold @var{len} elements. If @var{fill} is given, it is used to
initialize the elements, otherwise the contents of the vector
is unspecified.
@end deffn
f32vector
@c snarfed from ../libguile/srfi-4.i.c:63
@deffn {Scheme Procedure} f32vector . l
@deffnx {C Function} scm_f32vector (l)
Return a newly allocated uniform numeric vector containing
all argument values.
@end deffn
f32vector-length
@c snarfed from ../libguile/srfi-4.i.c:74
@deffn {Scheme Procedure} f32vector-length uvec
@deffnx {C Function} scm_f32vector_length (uvec)
Return the number of elements in the uniform numeric vector
@var{uvec}.
@end deffn
f32vector-ref
@c snarfed from ../libguile/srfi-4.i.c:85
@deffn {Scheme Procedure} f32vector-ref uvec index
@deffnx {C Function} scm_f32vector_ref (uvec, index)
Return the element at @var{index} in the uniform numeric
vector @var{uvec}.
@end deffn
f32vector-set!
@c snarfed from ../libguile/srfi-4.i.c:97
@deffn {Scheme Procedure} f32vector-set! uvec index value
@deffnx {C Function} scm_f32vector_set_x (uvec, index, value)
Set the element at @var{index} in the uniform numeric
vector @var{uvec} to @var{value}. The return value is not
specified.
@end deffn
f32vector->list
@c snarfed from ../libguile/srfi-4.i.c:107
@deffn {Scheme Procedure} f32vector->list uvec
@deffnx {C Function} scm_f32vector_to_list (uvec)
Convert the uniform numeric vector @var{uvec} to a list.
@end deffn
list->f32vector
@c snarfed from ../libguile/srfi-4.i.c:117
@deffn {Scheme Procedure} list->f32vector l
@deffnx {C Function} scm_list_to_f32vector (l)
Convert the list @var{l} to a numeric uniform vector.
@end deffn
any->f32vector
@c snarfed from ../libguile/srfi-4.i.c:128
@deffn {Scheme Procedure} any->f32vector obj
@deffnx {C Function} scm_any_to_f32vector (obj)
Convert @var{obj}, which can be a list, vector, or
uniform vector, to a numeric uniform vector of
type f32.
@end deffn
f64vector?
@c snarfed from ../libguile/srfi-4.i.c:41
@deffn {Scheme Procedure} f64vector? obj
@deffnx {C Function} scm_f64vector_p (obj)
Return @code{#t} if @var{obj} is a vector of type f64,
@code{#f} otherwise.
@end deffn
make-f64vector
@c snarfed from ../libguile/srfi-4.i.c:53
@deffn {Scheme Procedure} make-f64vector len [fill]
@deffnx {C Function} scm_make_f64vector (len, fill)
Return a newly allocated uniform numeric vector which can
hold @var{len} elements. If @var{fill} is given, it is used to
initialize the elements, otherwise the contents of the vector
is unspecified.
@end deffn
f64vector
@c snarfed from ../libguile/srfi-4.i.c:63
@deffn {Scheme Procedure} f64vector . l
@deffnx {C Function} scm_f64vector (l)
Return a newly allocated uniform numeric vector containing
all argument values.
@end deffn
f64vector-length
@c snarfed from ../libguile/srfi-4.i.c:74
@deffn {Scheme Procedure} f64vector-length uvec
@deffnx {C Function} scm_f64vector_length (uvec)
Return the number of elements in the uniform numeric vector
@var{uvec}.
@end deffn
f64vector-ref
@c snarfed from ../libguile/srfi-4.i.c:85
@deffn {Scheme Procedure} f64vector-ref uvec index
@deffnx {C Function} scm_f64vector_ref (uvec, index)
Return the element at @var{index} in the uniform numeric
vector @var{uvec}.
@end deffn
f64vector-set!
@c snarfed from ../libguile/srfi-4.i.c:97
@deffn {Scheme Procedure} f64vector-set! uvec index value
@deffnx {C Function} scm_f64vector_set_x (uvec, index, value)
Set the element at @var{index} in the uniform numeric
vector @var{uvec} to @var{value}. The return value is not
specified.
@end deffn
f64vector->list
@c snarfed from ../libguile/srfi-4.i.c:107
@deffn {Scheme Procedure} f64vector->list uvec
@deffnx {C Function} scm_f64vector_to_list (uvec)
Convert the uniform numeric vector @var{uvec} to a list.
@end deffn
list->f64vector
@c snarfed from ../libguile/srfi-4.i.c:117
@deffn {Scheme Procedure} list->f64vector l
@deffnx {C Function} scm_list_to_f64vector (l)
Convert the list @var{l} to a numeric uniform vector.
@end deffn
any->f64vector
@c snarfed from ../libguile/srfi-4.i.c:128
@deffn {Scheme Procedure} any->f64vector obj
@deffnx {C Function} scm_any_to_f64vector (obj)
Convert @var{obj}, which can be a list, vector, or
uniform vector, to a numeric uniform vector of
type f64.
@end deffn
c32vector?
@c snarfed from ../libguile/srfi-4.i.c:41
@deffn {Scheme Procedure} c32vector? obj
@deffnx {C Function} scm_c32vector_p (obj)
Return @code{#t} if @var{obj} is a vector of type c32,
@code{#f} otherwise.
@end deffn
make-c32vector
@c snarfed from ../libguile/srfi-4.i.c:53
@deffn {Scheme Procedure} make-c32vector len [fill]
@deffnx {C Function} scm_make_c32vector (len, fill)
Return a newly allocated uniform numeric vector which can
hold @var{len} elements. If @var{fill} is given, it is used to
initialize the elements, otherwise the contents of the vector
is unspecified.
@end deffn
c32vector
@c snarfed from ../libguile/srfi-4.i.c:63
@deffn {Scheme Procedure} c32vector . l
@deffnx {C Function} scm_c32vector (l)
Return a newly allocated uniform numeric vector containing
all argument values.
@end deffn
c32vector-length
@c snarfed from ../libguile/srfi-4.i.c:74
@deffn {Scheme Procedure} c32vector-length uvec
@deffnx {C Function} scm_c32vector_length (uvec)
Return the number of elements in the uniform numeric vector
@var{uvec}.
@end deffn
c32vector-ref
@c snarfed from ../libguile/srfi-4.i.c:85
@deffn {Scheme Procedure} c32vector-ref uvec index
@deffnx {C Function} scm_c32vector_ref (uvec, index)
Return the element at @var{index} in the uniform numeric
vector @var{uvec}.
@end deffn
c32vector-set!
@c snarfed from ../libguile/srfi-4.i.c:97
@deffn {Scheme Procedure} c32vector-set! uvec index value
@deffnx {C Function} scm_c32vector_set_x (uvec, index, value)
Set the element at @var{index} in the uniform numeric
vector @var{uvec} to @var{value}. The return value is not
specified.
@end deffn
c32vector->list
@c snarfed from ../libguile/srfi-4.i.c:107
@deffn {Scheme Procedure} c32vector->list uvec
@deffnx {C Function} scm_c32vector_to_list (uvec)
Convert the uniform numeric vector @var{uvec} to a list.
@end deffn
list->c32vector
@c snarfed from ../libguile/srfi-4.i.c:117
@deffn {Scheme Procedure} list->c32vector l
@deffnx {C Function} scm_list_to_c32vector (l)
Convert the list @var{l} to a numeric uniform vector.
@end deffn
any->c32vector
@c snarfed from ../libguile/srfi-4.i.c:128
@deffn {Scheme Procedure} any->c32vector obj
@deffnx {C Function} scm_any_to_c32vector (obj)
Convert @var{obj}, which can be a list, vector, or
uniform vector, to a numeric uniform vector of
type c32.
@end deffn
c64vector?
@c snarfed from ../libguile/srfi-4.i.c:41
@deffn {Scheme Procedure} c64vector? obj
@deffnx {C Function} scm_c64vector_p (obj)
Return @code{#t} if @var{obj} is a vector of type c64,
@code{#f} otherwise.
@end deffn
make-c64vector
@c snarfed from ../libguile/srfi-4.i.c:53
@deffn {Scheme Procedure} make-c64vector len [fill]
@deffnx {C Function} scm_make_c64vector (len, fill)
Return a newly allocated uniform numeric vector which can
hold @var{len} elements. If @var{fill} is given, it is used to
initialize the elements, otherwise the contents of the vector
is unspecified.
@end deffn
c64vector
@c snarfed from ../libguile/srfi-4.i.c:63
@deffn {Scheme Procedure} c64vector . l
@deffnx {C Function} scm_c64vector (l)
Return a newly allocated uniform numeric vector containing
all argument values.
@end deffn
c64vector-length
@c snarfed from ../libguile/srfi-4.i.c:74
@deffn {Scheme Procedure} c64vector-length uvec
@deffnx {C Function} scm_c64vector_length (uvec)
Return the number of elements in the uniform numeric vector
@var{uvec}.
@end deffn
c64vector-ref
@c snarfed from ../libguile/srfi-4.i.c:85
@deffn {Scheme Procedure} c64vector-ref uvec index
@deffnx {C Function} scm_c64vector_ref (uvec, index)
Return the element at @var{index} in the uniform numeric
vector @var{uvec}.
@end deffn
c64vector-set!
@c snarfed from ../libguile/srfi-4.i.c:97
@deffn {Scheme Procedure} c64vector-set! uvec index value
@deffnx {C Function} scm_c64vector_set_x (uvec, index, value)
Set the element at @var{index} in the uniform numeric
vector @var{uvec} to @var{value}. The return value is not
specified.
@end deffn
c64vector->list
@c snarfed from ../libguile/srfi-4.i.c:107
@deffn {Scheme Procedure} c64vector->list uvec
@deffnx {C Function} scm_c64vector_to_list (uvec)
Convert the uniform numeric vector @var{uvec} to a list.
@end deffn
list->c64vector
@c snarfed from ../libguile/srfi-4.i.c:117
@deffn {Scheme Procedure} list->c64vector l
@deffnx {C Function} scm_list_to_c64vector (l)
Convert the list @var{l} to a numeric uniform vector.
@end deffn
any->c64vector
@c snarfed from ../libguile/srfi-4.i.c:128
@deffn {Scheme Procedure} any->c64vector obj
@deffnx {C Function} scm_any_to_c64vector (obj)
Convert @var{obj}, which can be a list, vector, or
uniform vector, to a numeric uniform vector of
type c64.
@end deffn
string-null?
@c snarfed from srfi-13.c:62
@deffn {Scheme Procedure} string-null? str
@deffnx {C Function} scm_string_null_p (str)
Return @code{#t} if @var{str}'s length is zero, and
@code{#f} otherwise.
@lisp
(string-null? "") @result{} #t
y @result{} "foo"
(string-null? y) @result{} #f
@end lisp
@end deffn
string-any-c-code
@c snarfed from srfi-13.c:94
@deffn {Scheme Procedure} string-any-c-code char_pred s [start [end]]
@deffnx {C Function} scm_string_any (char_pred, s, start, end)
Check if @var{char_pred} is true for any character in string @var{s}.
@var{char_pred} can be a character to check for any equal to that, or
a character set (@pxref{Character Sets}) to check for any in that set,
or a predicate procedure to call.
For a procedure, calls @code{(@var{char_pred} c)} are made
successively on the characters from @var{start} to @var{end}. If
@var{char_pred} returns true (ie.@: non-@code{#f}), @code{string-any}
stops and that return value is the return from @code{string-any}. The
call on the last character (ie.@: at @math{@var{end}-1}), if that
point is reached, is a tail call.
If there are no characters in @var{s} (ie.@: @var{start} equals
@var{end}) then the return is @code{#f}.
@end deffn
string-every-c-code
@c snarfed from srfi-13.c:158
@deffn {Scheme Procedure} string-every-c-code char_pred s [start [end]]
@deffnx {C Function} scm_string_every (char_pred, s, start, end)
Check if @var{char_pred} is true for every character in string
@var{s}.
@var{char_pred} can be a character to check for every character equal
to that, or a character set (@pxref{Character Sets}) to check for
every character being in that set, or a predicate procedure to call.
For a procedure, calls @code{(@var{char_pred} c)} are made
successively on the characters from @var{start} to @var{end}. If
@var{char_pred} returns @code{#f}, @code{string-every} stops and
returns @code{#f}. The call on the last character (ie.@: at
@math{@var{end}-1}), if that point is reached, is a tail call and the
return from that call is the return from @code{string-every}.
If there are no characters in @var{s} (ie.@: @var{start} equals
@var{end}) then the return is @code{#t}.
@end deffn
string-tabulate
@c snarfed from srfi-13.c:214
@deffn {Scheme Procedure} string-tabulate proc len
@deffnx {C Function} scm_string_tabulate (proc, len)
@var{proc} is an integer->char procedure. Construct a string
of size @var{len} by applying @var{proc} to each index to
produce the corresponding string element. The order in which
@var{proc} is applied to the indices is not specified.
@end deffn
string->list
@c snarfed from srfi-13.c:246
@deffn {Scheme Procedure} string->list str [start [end]]
@deffnx {C Function} scm_substring_to_list (str, start, end)
Convert the string @var{str} into a list of characters.
@end deffn
reverse-list->string
@c snarfed from srfi-13.c:285
@deffn {Scheme Procedure} reverse-list->string chrs
@deffnx {C Function} scm_reverse_list_to_string (chrs)
An efficient implementation of @code{(compose string->list
reverse)}:
@smalllisp
(reverse-list->string '(#\a #\B #\c)) @result{} "cBa"
@end smalllisp
@end deffn
string-join
@c snarfed from srfi-13.c:352
@deffn {Scheme Procedure} string-join ls [delimiter [grammar]]
@deffnx {C Function} scm_string_join (ls, delimiter, grammar)
Append the string in the string list @var{ls}, using the string
@var{delim} as a delimiter between the elements of @var{ls}.
@var{grammar} is a symbol which specifies how the delimiter is
placed between the strings, and defaults to the symbol
@code{infix}.
@table @code
@item infix
Insert the separator between list elements. An empty string
will produce an empty list.
@item string-infix
Like @code{infix}, but will raise an error if given the empty
list.
@item suffix
Insert the separator after every list element.
@item prefix
Insert the separator before each list element.
@end table
@end deffn
string-copy
@c snarfed from srfi-13.c:486
@deffn {Scheme Procedure} string-copy str [start [end]]
@deffnx {C Function} scm_srfi13_substring_copy (str, start, end)
Return a freshly allocated copy of the string @var{str}. If
given, @var{start} and @var{end} delimit the portion of
@var{str} which is copied.
@end deffn
string-copy!
@c snarfed from srfi-13.c:513
@deffn {Scheme Procedure} string-copy! target tstart s [start [end]]
@deffnx {C Function} scm_string_copy_x (target, tstart, s, start, end)
Copy the sequence of characters from index range [@var{start},
@var{end}) in string @var{s} to string @var{target}, beginning
at index @var{tstart}. The characters are copied left-to-right
or right-to-left as needed -- the copy is guaranteed to work,
even if @var{target} and @var{s} are the same string. It is an
error if the copy operation runs off the end of the target
string.
@end deffn
substring-move!
@c snarfed from srfi-13.c:543
@deffn {Scheme Procedure} substring-move! str1 start1 end1 str2 start2
@deffnx {C Function} scm_substring_move_x (str1, start1, end1, str2, start2)
Copy the substring of @var{str1} bounded by @var{start1} and @var{end1}
into @var{str2} beginning at position @var{start2}.
@var{str1} and @var{str2} can be the same string.
@end deffn
string-take
@c snarfed from srfi-13.c:552
@deffn {Scheme Procedure} string-take s n
@deffnx {C Function} scm_string_take (s, n)
Return the @var{n} first characters of @var{s}.
@end deffn
string-drop
@c snarfed from srfi-13.c:562
@deffn {Scheme Procedure} string-drop s n
@deffnx {C Function} scm_string_drop (s, n)
Return all but the first @var{n} characters of @var{s}.
@end deffn
string-take-right
@c snarfed from srfi-13.c:572
@deffn {Scheme Procedure} string-take-right s n
@deffnx {C Function} scm_string_take_right (s, n)
Return the @var{n} last characters of @var{s}.
@end deffn
string-drop-right
@c snarfed from srfi-13.c:584
@deffn {Scheme Procedure} string-drop-right s n
@deffnx {C Function} scm_string_drop_right (s, n)
Return all but the last @var{n} characters of @var{s}.
@end deffn
string-pad
@c snarfed from srfi-13.c:599
@deffn {Scheme Procedure} string-pad s len [chr [start [end]]]
@deffnx {C Function} scm_string_pad (s, len, chr, start, end)
Take that characters from @var{start} to @var{end} from the
string @var{s} and return a new string, right-padded by the
character @var{chr} to length @var{len}. If the resulting
string is longer than @var{len}, it is truncated on the right.
@end deffn
string-pad-right
@c snarfed from srfi-13.c:639
@deffn {Scheme Procedure} string-pad-right s len [chr [start [end]]]
@deffnx {C Function} scm_string_pad_right (s, len, chr, start, end)
Take that characters from @var{start} to @var{end} from the
string @var{s} and return a new string, left-padded by the
character @var{chr} to length @var{len}. If the resulting
string is longer than @var{len}, it is truncated on the left.
@end deffn
string-trim
@c snarfed from srfi-13.c:692
@deffn {Scheme Procedure} string-trim s [char_pred [start [end]]]
@deffnx {C Function} scm_string_trim (s, char_pred, start, end)
Trim @var{s} by skipping over all characters on the left
that satisfy the parameter @var{char_pred}:
@itemize @bullet
@item
if it is the character @var{ch}, characters equal to
@var{ch} are trimmed,
@item
if it is a procedure @var{pred} characters that
satisfy @var{pred} are trimmed,
@item
if it is a character set, characters in that set are trimmed.
@end itemize
If called without a @var{char_pred} argument, all whitespace is
trimmed.
@end deffn
string-trim-right
@c snarfed from srfi-13.c:768
@deffn {Scheme Procedure} string-trim-right s [char_pred [start [end]]]
@deffnx {C Function} scm_string_trim_right (s, char_pred, start, end)
Trim @var{s} by skipping over all characters on the rightt
that satisfy the parameter @var{char_pred}:
@itemize @bullet
@item
if it is the character @var{ch}, characters equal to @var{ch}
are trimmed,
@item
if it is a procedure @var{pred} characters that satisfy
@var{pred} are trimmed,
@item
if it is a character sets, all characters in that set are
trimmed.
@end itemize
If called without a @var{char_pred} argument, all whitespace is
trimmed.
@end deffn
string-trim-both
@c snarfed from srfi-13.c:844
@deffn {Scheme Procedure} string-trim-both s [char_pred [start [end]]]
@deffnx {C Function} scm_string_trim_both (s, char_pred, start, end)
Trim @var{s} by skipping over all characters on both sides of
the string that satisfy the parameter @var{char_pred}:
@itemize @bullet
@item
if it is the character @var{ch}, characters equal to @var{ch}
are trimmed,
@item
if it is a procedure @var{pred} characters that satisfy
@var{pred} are trimmed,
@item
if it is a character set, the characters in the set are
trimmed.
@end itemize
If called without a @var{char_pred} argument, all whitespace is
trimmed.
@end deffn
string-fill!
@c snarfed from srfi-13.c:931
@deffn {Scheme Procedure} string-fill! str chr [start [end]]
@deffnx {C Function} scm_substring_fill_x (str, chr, start, end)
Stores @var{chr} in every element of the given @var{str} and
returns an unspecified value.
@end deffn
string-compare
@c snarfed from srfi-13.c:983
@deffn {Scheme Procedure} string-compare s1 s2 proc_lt proc_eq proc_gt [start1 [end1 [start2 [end2]]]]
@deffnx {C Function} scm_string_compare (s1, s2, proc_lt, proc_eq, proc_gt, start1, end1, start2, end2)
Apply @var{proc_lt}, @var{proc_eq}, @var{proc_gt} to the
mismatch index, depending upon whether @var{s1} is less than,
equal to, or greater than @var{s2}. The mismatch index is the
largest index @var{i} such that for every 0 <= @var{j} <
@var{i}, @var{s1}[@var{j}] = @var{s2}[@var{j}] -- that is,
@var{i} is the first position that does not match.
@end deffn
string-compare-ci
@c snarfed from srfi-13.c:1037
@deffn {Scheme Procedure} string-compare-ci s1 s2 proc_lt proc_eq proc_gt [start1 [end1 [start2 [end2]]]]
@deffnx {C Function} scm_string_compare_ci (s1, s2, proc_lt, proc_eq, proc_gt, start1, end1, start2, end2)
Apply @var{proc_lt}, @var{proc_eq}, @var{proc_gt} to the
mismatch index, depending upon whether @var{s1} is less than,
equal to, or greater than @var{s2}. The mismatch index is the
largest index @var{i} such that for every 0 <= @var{j} <
@var{i}, @var{s1}[@var{j}] = @var{s2}[@var{j}] -- that is,
@var{i} is the first position where the lowercased letters
do not match.
@end deffn
string=
@c snarfed from srfi-13.c:1088
@deffn {Scheme Procedure} string= s1 s2 [start1 [end1 [start2 [end2]]]]
@deffnx {C Function} scm_string_eq (s1, s2, start1, end1, start2, end2)
Return @code{#f} if @var{s1} and @var{s2} are not equal, a true
value otherwise.
@end deffn
string<>
@c snarfed from srfi-13.c:1127
@deffn {Scheme Procedure} string<> s1 s2 [start1 [end1 [start2 [end2]]]]
@deffnx {C Function} scm_string_neq (s1, s2, start1, end1, start2, end2)
Return @code{#f} if @var{s1} and @var{s2} are equal, a true
value otherwise.
@end deffn
string<
@c snarfed from srfi-13.c:1170
@deffn {Scheme Procedure} string< s1 s2 [start1 [end1 [start2 [end2]]]]
@deffnx {C Function} scm_string_lt (s1, s2, start1, end1, start2, end2)
Return @code{#f} if @var{s1} is greater or equal to @var{s2}, a
true value otherwise.
@end deffn
string>
@c snarfed from srfi-13.c:1213
@deffn {Scheme Procedure} string> s1 s2 [start1 [end1 [start2 [end2]]]]
@deffnx {C Function} scm_string_gt (s1, s2, start1, end1, start2, end2)
Return @code{#f} if @var{s1} is less or equal to @var{s2}, a
true value otherwise.
@end deffn
string<=
@c snarfed from srfi-13.c:1256
@deffn {Scheme Procedure} string<= s1 s2 [start1 [end1 [start2 [end2]]]]
@deffnx {C Function} scm_string_le (s1, s2, start1, end1, start2, end2)
Return @code{#f} if @var{s1} is greater to @var{s2}, a true
value otherwise.
@end deffn
string>=
@c snarfed from srfi-13.c:1299
@deffn {Scheme Procedure} string>= s1 s2 [start1 [end1 [start2 [end2]]]]
@deffnx {C Function} scm_string_ge (s1, s2, start1, end1, start2, end2)
Return @code{#f} if @var{s1} is less to @var{s2}, a true value
otherwise.
@end deffn
string-ci=
@c snarfed from srfi-13.c:1343
@deffn {Scheme Procedure} string-ci= s1 s2 [start1 [end1 [start2 [end2]]]]
@deffnx {C Function} scm_string_ci_eq (s1, s2, start1, end1, start2, end2)
Return @code{#f} if @var{s1} and @var{s2} are not equal, a true
value otherwise. The character comparison is done
case-insensitively.
@end deffn
string-ci<>
@c snarfed from srfi-13.c:1387
@deffn {Scheme Procedure} string-ci<> s1 s2 [start1 [end1 [start2 [end2]]]]
@deffnx {C Function} scm_string_ci_neq (s1, s2, start1, end1, start2, end2)
Return @code{#f} if @var{s1} and @var{s2} are equal, a true
value otherwise. The character comparison is done
case-insensitively.
@end deffn
string-ci<
@c snarfed from srfi-13.c:1431
@deffn {Scheme Procedure} string-ci< s1 s2 [start1 [end1 [start2 [end2]]]]
@deffnx {C Function} scm_string_ci_lt (s1, s2, start1, end1, start2, end2)
Return @code{#f} if @var{s1} is greater or equal to @var{s2}, a
true value otherwise. The character comparison is done
case-insensitively.
@end deffn
string-ci>
@c snarfed from srfi-13.c:1475
@deffn {Scheme Procedure} string-ci> s1 s2 [start1 [end1 [start2 [end2]]]]
@deffnx {C Function} scm_string_ci_gt (s1, s2, start1, end1, start2, end2)
Return @code{#f} if @var{s1} is less or equal to @var{s2}, a
true value otherwise. The character comparison is done
case-insensitively.
@end deffn
string-ci<=
@c snarfed from srfi-13.c:1519
@deffn {Scheme Procedure} string-ci<= s1 s2 [start1 [end1 [start2 [end2]]]]
@deffnx {C Function} scm_string_ci_le (s1, s2, start1, end1, start2, end2)
Return @code{#f} if @var{s1} is greater to @var{s2}, a true
value otherwise. The character comparison is done
case-insensitively.
@end deffn
string-ci>=
@c snarfed from srfi-13.c:1563
@deffn {Scheme Procedure} string-ci>= s1 s2 [start1 [end1 [start2 [end2]]]]
@deffnx {C Function} scm_string_ci_ge (s1, s2, start1, end1, start2, end2)
Return @code{#f} if @var{s1} is less to @var{s2}, a true value
otherwise. The character comparison is done
case-insensitively.
@end deffn
string-hash
@c snarfed from srfi-13.c:1608
@deffn {Scheme Procedure} string-hash s [bound [start [end]]]
@deffnx {C Function} scm_substring_hash (s, bound, start, end)
Compute a hash value for @var{S}. the optional argument @var{bound} is a non-negative exact integer specifying the range of the hash function. A positive value restricts the return value to the range [0,bound).
@end deffn
string-hash-ci
@c snarfed from srfi-13.c:1625
@deffn {Scheme Procedure} string-hash-ci s [bound [start [end]]]
@deffnx {C Function} scm_substring_hash_ci (s, bound, start, end)
Compute a hash value for @var{S}. the optional argument @var{bound} is a non-negative exact integer specifying the range of the hash function. A positive value restricts the return value to the range [0,bound).
@end deffn
string-prefix-length
@c snarfed from srfi-13.c:1637
@deffn {Scheme Procedure} string-prefix-length s1 s2 [start1 [end1 [start2 [end2]]]]
@deffnx {C Function} scm_string_prefix_length (s1, s2, start1, end1, start2, end2)
Return the length of the longest common prefix of the two
strings.
@end deffn
string-prefix-length-ci
@c snarfed from srfi-13.c:1669
@deffn {Scheme Procedure} string-prefix-length-ci s1 s2 [start1 [end1 [start2 [end2]]]]
@deffnx {C Function} scm_string_prefix_length_ci (s1, s2, start1, end1, start2, end2)
Return the length of the longest common prefix of the two
strings, ignoring character case.
@end deffn
string-suffix-length
@c snarfed from srfi-13.c:1701
@deffn {Scheme Procedure} string-suffix-length s1 s2 [start1 [end1 [start2 [end2]]]]
@deffnx {C Function} scm_string_suffix_length (s1, s2, start1, end1, start2, end2)
Return the length of the longest common suffix of the two
strings.
@end deffn
string-suffix-length-ci
@c snarfed from srfi-13.c:1733
@deffn {Scheme Procedure} string-suffix-length-ci s1 s2 [start1 [end1 [start2 [end2]]]]
@deffnx {C Function} scm_string_suffix_length_ci (s1, s2, start1, end1, start2, end2)
Return the length of the longest common suffix of the two
strings, ignoring character case.
@end deffn
string-prefix?
@c snarfed from srfi-13.c:1764
@deffn {Scheme Procedure} string-prefix? s1 s2 [start1 [end1 [start2 [end2]]]]
@deffnx {C Function} scm_string_prefix_p (s1, s2, start1, end1, start2, end2)
Is @var{s1} a prefix of @var{s2}?
@end deffn
string-prefix-ci?
@c snarfed from srfi-13.c:1796
@deffn {Scheme Procedure} string-prefix-ci? s1 s2 [start1 [end1 [start2 [end2]]]]
@deffnx {C Function} scm_string_prefix_ci_p (s1, s2, start1, end1, start2, end2)
Is @var{s1} a prefix of @var{s2}, ignoring character case?
@end deffn
string-suffix?
@c snarfed from srfi-13.c:1828
@deffn {Scheme Procedure} string-suffix? s1 s2 [start1 [end1 [start2 [end2]]]]
@deffnx {C Function} scm_string_suffix_p (s1, s2, start1, end1, start2, end2)
Is @var{s1} a suffix of @var{s2}?
@end deffn
string-suffix-ci?
@c snarfed from srfi-13.c:1860
@deffn {Scheme Procedure} string-suffix-ci? s1 s2 [start1 [end1 [start2 [end2]]]]
@deffnx {C Function} scm_string_suffix_ci_p (s1, s2, start1, end1, start2, end2)
Is @var{s1} a suffix of @var{s2}, ignoring character case?
@end deffn
string-index
@c snarfed from srfi-13.c:1904
@deffn {Scheme Procedure} string-index s char_pred [start [end]]
@deffnx {C Function} scm_string_index (s, char_pred, start, end)
Search through the string @var{s} from left to right, returning
the index of the first occurence of a character which
@itemize @bullet
@item
equals @var{char_pred}, if it is character,
@item
satisifies the predicate @var{char_pred}, if it is a procedure,
@item
is in the set @var{char_pred}, if it is a character set.
@end itemize
@end deffn
string-index-right
@c snarfed from srfi-13.c:1969
@deffn {Scheme Procedure} string-index-right s char_pred [start [end]]
@deffnx {C Function} scm_string_index_right (s, char_pred, start, end)
Search through the string @var{s} from right to left, returning
the index of the last occurence of a character which
@itemize @bullet
@item
equals @var{char_pred}, if it is character,
@item
satisifies the predicate @var{char_pred}, if it is a procedure,
@item
is in the set if @var{char_pred} is a character set.
@end itemize
@end deffn
string-rindex
@c snarfed from srfi-13.c:2034
@deffn {Scheme Procedure} string-rindex s char_pred [start [end]]
@deffnx {C Function} scm_string_rindex (s, char_pred, start, end)
Search through the string @var{s} from right to left, returning
the index of the last occurence of a character which
@itemize @bullet
@item
equals @var{char_pred}, if it is character,
@item
satisifies the predicate @var{char_pred}, if it is a procedure,
@item
is in the set if @var{char_pred} is a character set.
@end itemize
@end deffn
string-skip
@c snarfed from srfi-13.c:2056
@deffn {Scheme Procedure} string-skip s char_pred [start [end]]
@deffnx {C Function} scm_string_skip (s, char_pred, start, end)
Search through the string @var{s} from left to right, returning
the index of the first occurence of a character which
@itemize @bullet
@item
does not equal @var{char_pred}, if it is character,
@item
does not satisify the predicate @var{char_pred}, if it is a
procedure,
@item
is not in the set if @var{char_pred} is a character set.
@end itemize
@end deffn
string-skip-right
@c snarfed from srfi-13.c:2123
@deffn {Scheme Procedure} string-skip-right s char_pred [start [end]]
@deffnx {C Function} scm_string_skip_right (s, char_pred, start, end)
Search through the string @var{s} from right to left, returning
the index of the last occurence of a character which
@itemize @bullet
@item
does not equal @var{char_pred}, if it is character,
@item
does not satisfy the predicate @var{char_pred}, if it is a
procedure,
@item
is not in the set if @var{char_pred} is a character set.
@end itemize
@end deffn
string-count
@c snarfed from srfi-13.c:2190
@deffn {Scheme Procedure} string-count s char_pred [start [end]]
@deffnx {C Function} scm_string_count (s, char_pred, start, end)
Return the count of the number of characters in the string
@var{s} which
@itemize @bullet
@item
equals @var{char_pred}, if it is character,
@item
satisifies the predicate @var{char_pred}, if it is a procedure.
@item
is in the set @var{char_pred}, if it is a character set.
@end itemize
@end deffn
string-contains
@c snarfed from srfi-13.c:2247
@deffn {Scheme Procedure} string-contains s1 s2 [start1 [end1 [start2 [end2]]]]
@deffnx {C Function} scm_string_contains (s1, s2, start1, end1, start2, end2)
Does string @var{s1} contain string @var{s2}? Return the index
in @var{s1} where @var{s2} occurs as a substring, or false.
The optional start/end indices restrict the operation to the
indicated substrings.
@end deffn
string-contains-ci
@c snarfed from srfi-13.c:2294
@deffn {Scheme Procedure} string-contains-ci s1 s2 [start1 [end1 [start2 [end2]]]]
@deffnx {C Function} scm_string_contains_ci (s1, s2, start1, end1, start2, end2)
Does string @var{s1} contain string @var{s2}? Return the index
in @var{s1} where @var{s2} occurs as a substring, or false.
The optional start/end indices restrict the operation to the
indicated substrings. Character comparison is done
case-insensitively.
@end deffn
string-upcase!
@c snarfed from srfi-13.c:2359
@deffn {Scheme Procedure} string-upcase! str [start [end]]
@deffnx {C Function} scm_substring_upcase_x (str, start, end)
Destructively upcase every character in @code{str}.
@lisp
(string-upcase! y)
@result{} "ARRDEFG"
y
@result{} "ARRDEFG"
@end lisp
@end deffn
string-upcase
@c snarfed from srfi-13.c:2380
@deffn {Scheme Procedure} string-upcase str [start [end]]
@deffnx {C Function} scm_substring_upcase (str, start, end)
Upcase every character in @code{str}.
@end deffn
string-downcase!
@c snarfed from srfi-13.c:2427
@deffn {Scheme Procedure} string-downcase! str [start [end]]
@deffnx {C Function} scm_substring_downcase_x (str, start, end)
Destructively downcase every character in @var{str}.
@lisp
y
@result{} "ARRDEFG"
(string-downcase! y)
@result{} "arrdefg"
y
@result{} "arrdefg"
@end lisp
@end deffn
string-downcase
@c snarfed from srfi-13.c:2448
@deffn {Scheme Procedure} string-downcase str [start [end]]
@deffnx {C Function} scm_substring_downcase (str, start, end)
Downcase every character in @var{str}.
@end deffn
string-titlecase!
@c snarfed from srfi-13.c:2504
@deffn {Scheme Procedure} string-titlecase! str [start [end]]
@deffnx {C Function} scm_string_titlecase_x (str, start, end)
Destructively titlecase every first character in a word in
@var{str}.
@end deffn
string-titlecase
@c snarfed from srfi-13.c:2520
@deffn {Scheme Procedure} string-titlecase str [start [end]]
@deffnx {C Function} scm_string_titlecase (str, start, end)
Titlecase every first character in a word in @var{str}.
@end deffn
string-capitalize!
@c snarfed from srfi-13.c:2542
@deffn {Scheme Procedure} string-capitalize! str
@deffnx {C Function} scm_string_capitalize_x (str)
Upcase the first character of every word in @var{str}
destructively and return @var{str}.
@lisp
y @result{} "hello world"
(string-capitalize! y) @result{} "Hello World"
y @result{} "Hello World"
@end lisp
@end deffn
string-capitalize
@c snarfed from srfi-13.c:2554
@deffn {Scheme Procedure} string-capitalize str
@deffnx {C Function} scm_string_capitalize (str)
Return a freshly allocated string with the characters in
@var{str}, where the first character of every word is
capitalized.
@end deffn
string-reverse
@c snarfed from srfi-13.c:2588
@deffn {Scheme Procedure} string-reverse str [start [end]]
@deffnx {C Function} scm_string_reverse (str, start, end)
Reverse the string @var{str}. The optional arguments
@var{start} and @var{end} delimit the region of @var{str} to
operate on.
@end deffn
string-reverse!
@c snarfed from srfi-13.c:2613
@deffn {Scheme Procedure} string-reverse! str [start [end]]
@deffnx {C Function} scm_string_reverse_x (str, start, end)
Reverse the string @var{str} in-place. The optional arguments
@var{start} and @var{end} delimit the region of @var{str} to
operate on. The return value is unspecified.
@end deffn
string-append/shared
@c snarfed from srfi-13.c:2635
@deffn {Scheme Procedure} string-append/shared . rest
@deffnx {C Function} scm_string_append_shared (rest)
Like @code{string-append}, but the result may share memory
with the argument strings.
@end deffn
string-concatenate
@c snarfed from srfi-13.c:2656
@deffn {Scheme Procedure} string-concatenate ls
@deffnx {C Function} scm_string_concatenate (ls)
Append the elements of @var{ls} (which must be strings)
together into a single string. Guaranteed to return a freshly
allocated string.
@end deffn
string-concatenate-reverse
@c snarfed from srfi-13.c:2678
@deffn {Scheme Procedure} string-concatenate-reverse ls [final_string [end]]
@deffnx {C Function} scm_string_concatenate_reverse (ls, final_string, end)
Without optional arguments, this procedure is equivalent to
@smalllisp
(string-concatenate (reverse ls))
@end smalllisp
If the optional argument @var{final_string} is specified, it is
consed onto the beginning to @var{ls} before performing the
list-reverse and string-concatenate operations. If @var{end}
is given, only the characters of @var{final_string} up to index
@var{end} are used.
Guaranteed to return a freshly allocated string.
@end deffn
string-concatenate/shared
@c snarfed from srfi-13.c:2695
@deffn {Scheme Procedure} string-concatenate/shared ls
@deffnx {C Function} scm_string_concatenate_shared (ls)
Like @code{string-concatenate}, but the result may share memory
with the strings in the list @var{ls}.
@end deffn
string-concatenate-reverse/shared
@c snarfed from srfi-13.c:2706
@deffn {Scheme Procedure} string-concatenate-reverse/shared ls [final_string [end]]
@deffnx {C Function} scm_string_concatenate_reverse_shared (ls, final_string, end)
Like @code{string-concatenate-reverse}, but the result may
share memory with the the strings in the @var{ls} arguments.
@end deffn
string-map
@c snarfed from srfi-13.c:2719
@deffn {Scheme Procedure} string-map proc s [start [end]]
@deffnx {C Function} scm_string_map (proc, s, start, end)
@var{proc} is a char->char procedure, it is mapped over
@var{s}. The order in which the procedure is applied to the
string elements is not specified.
@end deffn
string-map!
@c snarfed from srfi-13.c:2749
@deffn {Scheme Procedure} string-map! proc s [start [end]]
@deffnx {C Function} scm_string_map_x (proc, s, start, end)
@var{proc} is a char->char procedure, it is mapped over
@var{s}. The order in which the procedure is applied to the
string elements is not specified. The string @var{s} is
modified in-place, the return value is not specified.
@end deffn
string-fold
@c snarfed from srfi-13.c:2776
@deffn {Scheme Procedure} string-fold kons knil s [start [end]]
@deffnx {C Function} scm_string_fold (kons, knil, s, start, end)
Fold @var{kons} over the characters of @var{s}, with @var{knil}
as the terminating element, from left to right. @var{kons}
must expect two arguments: The actual character and the last
result of @var{kons}' application.
@end deffn
string-fold-right
@c snarfed from srfi-13.c:2807
@deffn {Scheme Procedure} string-fold-right kons knil s [start [end]]
@deffnx {C Function} scm_string_fold_right (kons, knil, s, start, end)
Fold @var{kons} over the characters of @var{s}, with @var{knil}
as the terminating element, from right to left. @var{kons}
must expect two arguments: The actual character and the last
result of @var{kons}' application.
@end deffn
string-unfold
@c snarfed from srfi-13.c:2852
@deffn {Scheme Procedure} string-unfold p f g seed [base [make_final]]
@deffnx {C Function} scm_string_unfold (p, f, g, seed, base, make_final)
@itemize @bullet
@item @var{g} is used to generate a series of @emph{seed}
values from the initial @var{seed}: @var{seed}, (@var{g}
@var{seed}), (@var{g}^2 @var{seed}), (@var{g}^3 @var{seed}),
@dots{}
@item @var{p} tells us when to stop -- when it returns true
when applied to one of these seed values.
@item @var{f} maps each seed value to the corresponding
character in the result string. These chars are assembled
into the string in a left-to-right order.
@item @var{base} is the optional initial/leftmost portion
of the constructed string; it default to the empty
string.
@item @var{make_final} is applied to the terminal seed
value (on which @var{p} returns true) to produce
the final/rightmost portion of the constructed string.
It defaults to @code{(lambda (x) )}.
@end itemize
@end deffn
string-unfold-right
@c snarfed from srfi-13.c:2915
@deffn {Scheme Procedure} string-unfold-right p f g seed [base [make_final]]
@deffnx {C Function} scm_string_unfold_right (p, f, g, seed, base, make_final)
@itemize @bullet
@item @var{g} is used to generate a series of @emph{seed}
values from the initial @var{seed}: @var{seed}, (@var{g}
@var{seed}), (@var{g}^2 @var{seed}), (@var{g}^3 @var{seed}),
@dots{}
@item @var{p} tells us when to stop -- when it returns true
when applied to one of these seed values.
@item @var{f} maps each seed value to the corresponding
character in the result string. These chars are assembled
into the string in a right-to-left order.
@item @var{base} is the optional initial/rightmost portion
of the constructed string; it default to the empty
string.
@item @var{make_final} is applied to the terminal seed
value (on which @var{p} returns true) to produce
the final/leftmost portion of the constructed string.
It defaults to @code{(lambda (x) )}.
@end itemize
@end deffn
string-for-each
@c snarfed from srfi-13.c:2962
@deffn {Scheme Procedure} string-for-each proc s [start [end]]
@deffnx {C Function} scm_string_for_each (proc, s, start, end)
@var{proc} is mapped over @var{s} in left-to-right order. The
return value is not specified.
@end deffn
string-for-each-index
@c snarfed from srfi-13.c:2988
@deffn {Scheme Procedure} string-for-each-index proc s [start [end]]
@deffnx {C Function} scm_string_for_each_index (proc, s, start, end)
@var{proc} is mapped over @var{s} in left-to-right order. The
return value is not specified.
@end deffn
xsubstring
@c snarfed from srfi-13.c:3020
@deffn {Scheme Procedure} xsubstring s from [to [start [end]]]
@deffnx {C Function} scm_xsubstring (s, from, to, start, end)
This is the @emph{extended substring} procedure that implements
replicated copying of a substring of some string.
@var{s} is a string, @var{start} and @var{end} are optional
arguments that demarcate a substring of @var{s}, defaulting to
0 and the length of @var{s}. Replicate this substring up and
down index space, in both the positive and negative directions.
@code{xsubstring} returns the substring of this string
beginning at index @var{from}, and ending at @var{to}, which
defaults to @var{from} + (@var{end} - @var{start}).
@end deffn
string-xcopy!
@c snarfed from srfi-13.c:3067
@deffn {Scheme Procedure} string-xcopy! target tstart s sfrom [sto [start [end]]]
@deffnx {C Function} scm_string_xcopy_x (target, tstart, s, sfrom, sto, start, end)
Exactly the same as @code{xsubstring}, but the extracted text
is written into the string @var{target} starting at index
@var{tstart}. The operation is not defined if @code{(eq?
@var{target} @var{s})} or these arguments share storage -- you
cannot copy a string on top of itself.
@end deffn
string-replace
@c snarfed from srfi-13.c:3117
@deffn {Scheme Procedure} string-replace s1 s2 [start1 [end1 [start2 [end2]]]]
@deffnx {C Function} scm_string_replace (s1, s2, start1, end1, start2, end2)
Return the string @var{s1}, but with the characters
@var{start1} @dots{} @var{end1} replaced by the characters
@var{start2} @dots{} @var{end2} from @var{s2}.
@end deffn
string-tokenize
@c snarfed from srfi-13.c:3154
@deffn {Scheme Procedure} string-tokenize s [token_set [start [end]]]
@deffnx {C Function} scm_string_tokenize (s, token_set, start, end)
Split the string @var{s} into a list of substrings, where each
substring is a maximal non-empty contiguous sequence of
characters from the character set @var{token_set}, which
defaults to @code{char-set:graphic}.
If @var{start} or @var{end} indices are provided, they restrict
@code{string-tokenize} to operating on the indicated substring
of @var{s}.
@end deffn
string-split
@c snarfed from srfi-13.c:3220
@deffn {Scheme Procedure} string-split str chr
@deffnx {C Function} scm_string_split (str, chr)
Split the string @var{str} into the a list of the substrings delimited
by appearances of the character @var{chr}. Note that an empty substring
between separator characters will result in an empty string in the
result list.
@lisp
(string-split "root:x:0:0:root:/root:/bin/bash" #\:)
@result{}
("root" "x" "0" "0" "root" "/root" "/bin/bash")
(string-split "::" #\:)
@result{}
("" "" "")
(string-split "" #\:)
@result{}
("")
@end lisp
@end deffn
string-filter
@c snarfed from srfi-13.c:3258
@deffn {Scheme Procedure} string-filter s char_pred [start [end]]
@deffnx {C Function} scm_string_filter (s, char_pred, start, end)
Filter the string @var{s}, retaining only those characters that
satisfy the @var{char_pred} argument. If the argument is a
procedure, it is applied to each character as a predicate, if
it is a character, it is tested for equality and if it is a
character set, it is tested for membership.
@end deffn
string-delete
@c snarfed from srfi-13.c:3330
@deffn {Scheme Procedure} string-delete s char_pred [start [end]]
@deffnx {C Function} scm_string_delete (s, char_pred, start, end)
Filter the string @var{s}, retaining only those characters that
do not satisfy the @var{char_pred} argument. If the argument
is a procedure, it is applied to each character as a predicate,
if it is a character, it is tested for equality and if it is a
character set, it is tested for membership.
@end deffn
char-set?
@c snarfed from srfi-14.c:85
@deffn {Scheme Procedure} char-set? obj
@deffnx {C Function} scm_char_set_p (obj)
Return @code{#t} if @var{obj} is a character set, @code{#f}
otherwise.
@end deffn
char-set=
@c snarfed from srfi-14.c:95
@deffn {Scheme Procedure} char-set= . char_sets
@deffnx {C Function} scm_char_set_eq (char_sets)
Return @code{#t} if all given character sets are equal.
@end deffn
char-set<=
@c snarfed from srfi-14.c:125
@deffn {Scheme Procedure} char-set<= . char_sets
@deffnx {C Function} scm_char_set_leq (char_sets)
Return @code{#t} if every character set @var{cs}i is a subset
of character set @var{cs}i+1.
@end deffn
char-set-hash
@c snarfed from srfi-14.c:163
@deffn {Scheme Procedure} char-set-hash cs [bound]
@deffnx {C Function} scm_char_set_hash (cs, bound)
Compute a hash value for the character set @var{cs}. If
@var{bound} is given and non-zero, it restricts the
returned value to the range 0 @dots{} @var{bound - 1}.
@end deffn
char-set-cursor
@c snarfed from srfi-14.c:196
@deffn {Scheme Procedure} char-set-cursor cs
@deffnx {C Function} scm_char_set_cursor (cs)
Return a cursor into the character set @var{cs}.
@end deffn
char-set-ref
@c snarfed from srfi-14.c:216
@deffn {Scheme Procedure} char-set-ref cs cursor
@deffnx {C Function} scm_char_set_ref (cs, cursor)
Return the character at the current cursor position
@var{cursor} in the character set @var{cs}. It is an error to
pass a cursor for which @code{end-of-char-set?} returns true.
@end deffn
char-set-cursor-next
@c snarfed from srfi-14.c:233
@deffn {Scheme Procedure} char-set-cursor-next cs cursor
@deffnx {C Function} scm_char_set_cursor_next (cs, cursor)
Advance the character set cursor @var{cursor} to the next
character in the character set @var{cs}. It is an error if the
cursor given satisfies @code{end-of-char-set?}.
@end deffn
end-of-char-set?
@c snarfed from srfi-14.c:254
@deffn {Scheme Procedure} end-of-char-set? cursor
@deffnx {C Function} scm_end_of_char_set_p (cursor)
Return @code{#t} if @var{cursor} has reached the end of a
character set, @code{#f} otherwise.
@end deffn
char-set-fold
@c snarfed from srfi-14.c:266
@deffn {Scheme Procedure} char-set-fold kons knil cs
@deffnx {C Function} scm_char_set_fold (kons, knil, cs)
Fold the procedure @var{kons} over the character set @var{cs},
initializing it with @var{knil}.
@end deffn
char-set-unfold
@c snarfed from srfi-14.c:296
@deffn {Scheme Procedure} char-set-unfold p f g seed [base_cs]
@deffnx {C Function} scm_char_set_unfold (p, f, g, seed, base_cs)
This is a fundamental constructor for character sets.
@itemize @bullet
@item @var{g} is used to generate a series of ``seed'' values
from the initial seed: @var{seed}, (@var{g} @var{seed}),
(@var{g}^2 @var{seed}), (@var{g}^3 @var{seed}), @dots{}
@item @var{p} tells us when to stop -- when it returns true
when applied to one of the seed values.
@item @var{f} maps each seed value to a character. These
characters are added to the base character set @var{base_cs} to
form the result; @var{base_cs} defaults to the empty set.
@end itemize
@end deffn
char-set-unfold!
@c snarfed from srfi-14.c:340
@deffn {Scheme Procedure} char-set-unfold! p f g seed base_cs
@deffnx {C Function} scm_char_set_unfold_x (p, f, g, seed, base_cs)
This is a fundamental constructor for character sets.
@itemize @bullet
@item @var{g} is used to generate a series of ``seed'' values
from the initial seed: @var{seed}, (@var{g} @var{seed}),
(@var{g}^2 @var{seed}), (@var{g}^3 @var{seed}), @dots{}
@item @var{p} tells us when to stop -- when it returns true
when applied to one of the seed values.
@item @var{f} maps each seed value to a character. These
characters are added to the base character set @var{base_cs} to
form the result; @var{base_cs} defaults to the empty set.
@end itemize
@end deffn
char-set-for-each
@c snarfed from srfi-14.c:369
@deffn {Scheme Procedure} char-set-for-each proc cs
@deffnx {C Function} scm_char_set_for_each (proc, cs)
Apply @var{proc} to every character in the character set
@var{cs}. The return value is not specified.
@end deffn
char-set-map
@c snarfed from srfi-14.c:388
@deffn {Scheme Procedure} char-set-map proc cs
@deffnx {C Function} scm_char_set_map (proc, cs)
Map the procedure @var{proc} over every character in @var{cs}.
@var{proc} must be a character -> character procedure.
@end deffn
char-set-copy
@c snarfed from srfi-14.c:414
@deffn {Scheme Procedure} char-set-copy cs
@deffnx {C Function} scm_char_set_copy (cs)
Return a newly allocated character set containing all
characters in @var{cs}.
@end deffn
char-set
@c snarfed from srfi-14.c:434
@deffn {Scheme Procedure} char-set . rest
@deffnx {C Function} scm_char_set (rest)
Return a character set containing all given characters.
@end deffn
list->char-set
@c snarfed from srfi-14.c:462
@deffn {Scheme Procedure} list->char-set list [base_cs]
@deffnx {C Function} scm_list_to_char_set (list, base_cs)
Convert the character list @var{list} to a character set. If
the character set @var{base_cs} is given, the character in this
set are also included in the result.
@end deffn
list->char-set!
@c snarfed from srfi-14.c:496
@deffn {Scheme Procedure} list->char-set! list base_cs
@deffnx {C Function} scm_list_to_char_set_x (list, base_cs)
Convert the character list @var{list} to a character set. The
characters are added to @var{base_cs} and @var{base_cs} is
returned.
@end deffn
string->char-set
@c snarfed from srfi-14.c:523
@deffn {Scheme Procedure} string->char-set str [base_cs]
@deffnx {C Function} scm_string_to_char_set (str, base_cs)
Convert the string @var{str} to a character set. If the
character set @var{base_cs} is given, the characters in this
set are also included in the result.
@end deffn
string->char-set!
@c snarfed from srfi-14.c:557
@deffn {Scheme Procedure} string->char-set! str base_cs
@deffnx {C Function} scm_string_to_char_set_x (str, base_cs)
Convert the string @var{str} to a character set. The
characters from the string are added to @var{base_cs}, and
@var{base_cs} is returned.
@end deffn
char-set-filter
@c snarfed from srfi-14.c:584
@deffn {Scheme Procedure} char-set-filter pred cs [base_cs]
@deffnx {C Function} scm_char_set_filter (pred, cs, base_cs)
Return a character set containing every character from @var{cs}
so that it satisfies @var{pred}. If provided, the characters
from @var{base_cs} are added to the result.
@end deffn
char-set-filter!
@c snarfed from srfi-14.c:620
@deffn {Scheme Procedure} char-set-filter! pred cs base_cs
@deffnx {C Function} scm_char_set_filter_x (pred, cs, base_cs)
Return a character set containing every character from @var{cs}
so that it satisfies @var{pred}. The characters are added to
@var{base_cs} and @var{base_cs} is returned.
@end deffn
ucs-range->char-set
@c snarfed from srfi-14.c:658
@deffn {Scheme Procedure} ucs-range->char-set lower upper [error [base_cs]]
@deffnx {C Function} scm_ucs_range_to_char_set (lower, upper, error, base_cs)
Return a character set containing all characters whose
character codes lie in the half-open range
[@var{lower},@var{upper}).
If @var{error} is a true value, an error is signalled if the
specified range contains characters which are not contained in
the implemented character range. If @var{error} is @code{#f},
these characters are silently left out of the resultung
character set.
The characters in @var{base_cs} are added to the result, if
given.
@end deffn
ucs-range->char-set!
@c snarfed from srfi-14.c:711
@deffn {Scheme Procedure} ucs-range->char-set! lower upper error base_cs
@deffnx {C Function} scm_ucs_range_to_char_set_x (lower, upper, error, base_cs)
Return a character set containing all characters whose
character codes lie in the half-open range
[@var{lower},@var{upper}).
If @var{error} is a true value, an error is signalled if the
specified range contains characters which are not contained in
the implemented character range. If @var{error} is @code{#f},
these characters are silently left out of the resultung
character set.
The characters are added to @var{base_cs} and @var{base_cs} is
returned.
@end deffn
->char-set
@c snarfed from srfi-14.c:741
@deffn {Scheme Procedure} ->char-set x
@deffnx {C Function} scm_to_char_set (x)
Coerces x into a char-set. @var{x} may be a string, character or char-set. A string is converted to the set of its constituent characters; a character is converted to a singleton set; a char-set is returned as-is.
@end deffn
char-set-size
@c snarfed from srfi-14.c:757
@deffn {Scheme Procedure} char-set-size cs
@deffnx {C Function} scm_char_set_size (cs)
Return the number of elements in character set @var{cs}.
@end deffn
char-set-count
@c snarfed from srfi-14.c:774
@deffn {Scheme Procedure} char-set-count pred cs
@deffnx {C Function} scm_char_set_count (pred, cs)
Return the number of the elements int the character set
@var{cs} which satisfy the predicate @var{pred}.
@end deffn
char-set->list
@c snarfed from srfi-14.c:797
@deffn {Scheme Procedure} char-set->list cs
@deffnx {C Function} scm_char_set_to_list (cs)
Return a list containing the elements of the character set
@var{cs}.
@end deffn
char-set->string
@c snarfed from srfi-14.c:816
@deffn {Scheme Procedure} char-set->string cs
@deffnx {C Function} scm_char_set_to_string (cs)
Return a string containing the elements of the character set
@var{cs}. The order in which the characters are placed in the
string is not defined.
@end deffn
char-set-contains?
@c snarfed from srfi-14.c:841
@deffn {Scheme Procedure} char-set-contains? cs ch
@deffnx {C Function} scm_char_set_contains_p (cs, ch)
Return @code{#t} iff the character @var{ch} is contained in the
character set @var{cs}.
@end deffn
char-set-every
@c snarfed from srfi-14.c:854
@deffn {Scheme Procedure} char-set-every pred cs
@deffnx {C Function} scm_char_set_every (pred, cs)
Return a true value if every character in the character set
@var{cs} satisfies the predicate @var{pred}.
@end deffn
char-set-any
@c snarfed from srfi-14.c:878
@deffn {Scheme Procedure} char-set-any pred cs
@deffnx {C Function} scm_char_set_any (pred, cs)
Return a true value if any character in the character set
@var{cs} satisfies the predicate @var{pred}.
@end deffn
char-set-adjoin
@c snarfed from srfi-14.c:901
@deffn {Scheme Procedure} char-set-adjoin cs . rest
@deffnx {C Function} scm_char_set_adjoin (cs, rest)
Add all character arguments to the first argument, which must
be a character set.
@end deffn
char-set-delete
@c snarfed from srfi-14.c:929
@deffn {Scheme Procedure} char-set-delete cs . rest
@deffnx {C Function} scm_char_set_delete (cs, rest)
Delete all character arguments from the first argument, which
must be a character set.
@end deffn
char-set-adjoin!
@c snarfed from srfi-14.c:957
@deffn {Scheme Procedure} char-set-adjoin! cs . rest
@deffnx {C Function} scm_char_set_adjoin_x (cs, rest)
Add all character arguments to the first argument, which must
be a character set.
@end deffn
char-set-delete!
@c snarfed from srfi-14.c:984
@deffn {Scheme Procedure} char-set-delete! cs . rest
@deffnx {C Function} scm_char_set_delete_x (cs, rest)
Delete all character arguments from the first argument, which
must be a character set.
@end deffn
char-set-complement
@c snarfed from srfi-14.c:1010
@deffn {Scheme Procedure} char-set-complement cs
@deffnx {C Function} scm_char_set_complement (cs)
Return the complement of the character set @var{cs}.
@end deffn
char-set-union
@c snarfed from srfi-14.c:1031
@deffn {Scheme Procedure} char-set-union . rest
@deffnx {C Function} scm_char_set_union (rest)
Return the union of all argument character sets.
@end deffn
char-set-intersection
@c snarfed from srfi-14.c:1060
@deffn {Scheme Procedure} char-set-intersection . rest
@deffnx {C Function} scm_char_set_intersection (rest)
Return the intersection of all argument character sets.
@end deffn
char-set-difference
@c snarfed from srfi-14.c:1100
@deffn {Scheme Procedure} char-set-difference cs1 . rest
@deffnx {C Function} scm_char_set_difference (cs1, rest)
Return the difference of all argument character sets.
@end deffn
char-set-xor
@c snarfed from srfi-14.c:1130
@deffn {Scheme Procedure} char-set-xor . rest
@deffnx {C Function} scm_char_set_xor (rest)
Return the exclusive-or of all argument character sets.
@end deffn
char-set-diff+intersection
@c snarfed from srfi-14.c:1171
@deffn {Scheme Procedure} char-set-diff+intersection cs1 . rest
@deffnx {C Function} scm_char_set_diff_plus_intersection (cs1, rest)
Return the difference and the intersection of all argument
character sets.
@end deffn
char-set-complement!
@c snarfed from srfi-14.c:1209
@deffn {Scheme Procedure} char-set-complement! cs
@deffnx {C Function} scm_char_set_complement_x (cs)
Return the complement of the character set @var{cs}.
@end deffn
char-set-union!
@c snarfed from srfi-14.c:1226
@deffn {Scheme Procedure} char-set-union! cs1 . rest
@deffnx {C Function} scm_char_set_union_x (cs1, rest)
Return the union of all argument character sets.
@end deffn
char-set-intersection!
@c snarfed from srfi-14.c:1254
@deffn {Scheme Procedure} char-set-intersection! cs1 . rest
@deffnx {C Function} scm_char_set_intersection_x (cs1, rest)
Return the intersection of all argument character sets.
@end deffn
char-set-difference!
@c snarfed from srfi-14.c:1282
@deffn {Scheme Procedure} char-set-difference! cs1 . rest
@deffnx {C Function} scm_char_set_difference_x (cs1, rest)
Return the difference of all argument character sets.
@end deffn
char-set-xor!
@c snarfed from srfi-14.c:1310
@deffn {Scheme Procedure} char-set-xor! cs1 . rest
@deffnx {C Function} scm_char_set_xor_x (cs1, rest)
Return the exclusive-or of all argument character sets.
@end deffn
char-set-diff+intersection!
@c snarfed from srfi-14.c:1349
@deffn {Scheme Procedure} char-set-diff+intersection! cs1 cs2 . rest
@deffnx {C Function} scm_char_set_diff_plus_intersection_x (cs1, cs2, rest)
Return the difference and the intersection of all argument
character sets.
@end deffn
string=?
@c snarfed from strorder.c:50
@deffn {Scheme Procedure} string=? [s1 [s2 . rest]]
@deffnx {C Function} scm_i_string_equal_p (s1, s2, rest)
Lexicographic equality predicate; return @code{#t} if the two
strings are the same length and contain the same characters in
the same positions, otherwise return @code{#f}.
The procedure @code{string-ci=?} treats upper and lower case
letters as though they were the same character, but
@code{string=?} treats upper and lower case as distinct
characters.
@end deffn
string-ci=?
@c snarfed from strorder.c:62
@deffn {Scheme Procedure} string-ci=? [s1 [s2 . rest]]
@deffnx {C Function} scm_i_string_ci_equal_p (s1, s2, rest)
Case-insensitive string equality predicate; return @code{#t} if
the two strings are the same length and their component
characters match (ignoring case) at each position; otherwise
return @code{#f}.
@end deffn
string<?
@c snarfed from strorder.c:72
@deffn {Scheme Procedure} string<? [s1 [s2 . rest]]
@deffnx {C Function} scm_i_string_less_p (s1, s2, rest)
Lexicographic ordering predicate; return @code{#t} if @var{s1}
is lexicographically less than @var{s2}.
@end deffn
string<=?
@c snarfed from strorder.c:82
@deffn {Scheme Procedure} string<=? [s1 [s2 . rest]]
@deffnx {C Function} scm_i_string_leq_p (s1, s2, rest)
Lexicographic ordering predicate; return @code{#t} if @var{s1}
is lexicographically less than or equal to @var{s2}.
@end deffn
string>?
@c snarfed from strorder.c:92
@deffn {Scheme Procedure} string>? [s1 [s2 . rest]]
@deffnx {C Function} scm_i_string_gr_p (s1, s2, rest)
Lexicographic ordering predicate; return @code{#t} if @var{s1}
is lexicographically greater than @var{s2}.
@end deffn
string>=?
@c snarfed from strorder.c:102
@deffn {Scheme Procedure} string>=? [s1 [s2 . rest]]
@deffnx {C Function} scm_i_string_geq_p (s1, s2, rest)
Lexicographic ordering predicate; return @code{#t} if @var{s1}
is lexicographically greater than or equal to @var{s2}.
@end deffn
string-ci<?
@c snarfed from strorder.c:113
@deffn {Scheme Procedure} string-ci<? [s1 [s2 . rest]]
@deffnx {C Function} scm_i_string_ci_less_p (s1, s2, rest)
Case insensitive lexicographic ordering predicate; return
@code{#t} if @var{s1} is lexicographically less than @var{s2}
regardless of case.
@end deffn
string-ci<=?
@c snarfed from strorder.c:124
@deffn {Scheme Procedure} string-ci<=? [s1 [s2 . rest]]
@deffnx {C Function} scm_i_string_ci_leq_p (s1, s2, rest)
Case insensitive lexicographic ordering predicate; return
@code{#t} if @var{s1} is lexicographically less than or equal
to @var{s2} regardless of case.
@end deffn
string-ci>?
@c snarfed from strorder.c:135
@deffn {Scheme Procedure} string-ci>? [s1 [s2 . rest]]
@deffnx {C Function} scm_i_string_ci_gr_p (s1, s2, rest)
Case insensitive lexicographic ordering predicate; return
@code{#t} if @var{s1} is lexicographically greater than
@var{s2} regardless of case.
@end deffn
string-ci>=?
@c snarfed from strorder.c:146
@deffn {Scheme Procedure} string-ci>=? [s1 [s2 . rest]]
@deffnx {C Function} scm_i_string_ci_geq_p (s1, s2, rest)
Case insensitive lexicographic ordering predicate; return
@code{#t} if @var{s1} is lexicographically greater than or
equal to @var{s2} regardless of case.
@end deffn
object->string
@c snarfed from strports.c:332
@deffn {Scheme Procedure} object->string obj [printer]
@deffnx {C Function} scm_object_to_string (obj, printer)
Return a Scheme string obtained by printing @var{obj}.
Printing function can be specified by the optional second
argument @var{printer} (default: @code{write}).
@end deffn
call-with-output-string
@c snarfed from strports.c:356
@deffn {Scheme Procedure} call-with-output-string proc
@deffnx {C Function} scm_call_with_output_string (proc)
Calls the one-argument procedure @var{proc} with a newly created output
port. When the function returns, the string composed of the characters
written into the port is returned.
@end deffn
call-with-input-string
@c snarfed from strports.c:375
@deffn {Scheme Procedure} call-with-input-string string proc
@deffnx {C Function} scm_call_with_input_string (string, proc)
Calls the one-argument procedure @var{proc} with a newly
created input port from which @var{string}'s contents may be
read. The value yielded by the @var{proc} is returned.
@end deffn
open-input-string
@c snarfed from strports.c:388
@deffn {Scheme Procedure} open-input-string str
@deffnx {C Function} scm_open_input_string (str)
Take a string and return an input port that delivers characters
from the string. The port can be closed by
@code{close-input-port}, though its storage will be reclaimed
by the garbage collector if it becomes inaccessible.
@end deffn
open-output-string
@c snarfed from strports.c:402
@deffn {Scheme Procedure} open-output-string
@deffnx {C Function} scm_open_output_string ()
Return an output port that will accumulate characters for
retrieval by @code{get-output-string}. The port can be closed
by the procedure @code{close-output-port}, though its storage
will be reclaimed by the garbage collector if it becomes
inaccessible.
@end deffn
get-output-string
@c snarfed from strports.c:419
@deffn {Scheme Procedure} get-output-string port
@deffnx {C Function} scm_get_output_string (port)
Given an output port created by @code{open-output-string},
return a string consisting of the characters that have been
output to the port so far.
@end deffn
eval-string
@c snarfed from strports.c:488
@deffn {Scheme Procedure} eval-string string [module]
@deffnx {C Function} scm_eval_string_in_module (string, module)
Evaluate @var{string} as the text representation of a Scheme
form or forms, and return whatever value they produce.
Evaluation takes place in the given module, or the current
module when no module is given.
While the code is evaluated, the given module is made the
current one. The current module is restored when this
procedure returns.
@end deffn
make-struct-layout
@c snarfed from struct.c:56
@deffn {Scheme Procedure} make-struct-layout fields
@deffnx {C Function} scm_make_struct_layout (fields)
Return a new structure layout object.
@var{fields} must be a string made up of pairs of characters
strung together. The first character of each pair describes a field
type, the second a field protection. Allowed types are 'p' for
GC-protected Scheme data, 'u' for unprotected binary data, and 's' for
a field that points to the structure itself. Allowed protections
are 'w' for mutable fields, 'r' for read-only fields, and 'o' for opaque
fields. The last field protection specification may be capitalized to
indicate that the field is a tail-array.
@end deffn
struct?
@c snarfed from struct.c:223
@deffn {Scheme Procedure} struct? x
@deffnx {C Function} scm_struct_p (x)
Return @code{#t} iff @var{x} is a structure object, else
@code{#f}.
@end deffn
struct-vtable?
@c snarfed from struct.c:232
@deffn {Scheme Procedure} struct-vtable? x
@deffnx {C Function} scm_struct_vtable_p (x)
Return @code{#t} iff @var{x} is a vtable structure.
@end deffn
make-struct
@c snarfed from struct.c:418
@deffn {Scheme Procedure} make-struct vtable tail_array_size . init
@deffnx {C Function} scm_make_struct (vtable, tail_array_size, init)
Create a new structure.
@var{type} must be a vtable structure (@pxref{Vtables}).
@var{tail-elts} must be a non-negative integer. If the layout
specification indicated by @var{type} includes a tail-array,
this is the number of elements allocated to that array.
The @var{init1}, @dots{} are optional arguments describing how
successive fields of the structure should be initialized. Only fields
with protection 'r' or 'w' can be initialized, except for fields of
type 's', which are automatically initialized to point to the new
structure itself; fields with protection 'o' can not be initialized by
Scheme programs.
If fewer optional arguments than initializable fields are supplied,
fields of type 'p' get default value #f while fields of type 'u' are
initialized to 0.
Structs are currently the basic representation for record-like data
structures in Guile. The plan is to eventually replace them with a
new representation which will at the same time be easier to use and
more powerful.
For more information, see the documentation for @code{make-vtable-vtable}.
@end deffn
make-vtable-vtable
@c snarfed from struct.c:502
@deffn {Scheme Procedure} make-vtable-vtable user_fields tail_array_size . init
@deffnx {C Function} scm_make_vtable_vtable (user_fields, tail_array_size, init)
Return a new, self-describing vtable structure.
@var{user-fields} is a string describing user defined fields of the
vtable beginning at index @code{vtable-offset-user}
(see @code{make-struct-layout}).
@var{tail-size} specifies the size of the tail-array (if any) of
this vtable.
@var{init1}, @dots{} are the optional initializers for the fields of
the vtable.
Vtables have one initializable system field---the struct printer.
This field comes before the user fields in the initializers passed
to @code{make-vtable-vtable} and @code{make-struct}, and thus works as
a third optional argument to @code{make-vtable-vtable} and a fourth to
@code{make-struct} when creating vtables:
If the value is a procedure, it will be called instead of the standard
printer whenever a struct described by this vtable is printed.
The procedure will be called with arguments STRUCT and PORT.
The structure of a struct is described by a vtable, so the vtable is
in essence the type of the struct. The vtable is itself a struct with
a vtable. This could go on forever if it weren't for the
vtable-vtables which are self-describing vtables, and thus terminate
the chain.
There are several potential ways of using structs, but the standard
one is to use three kinds of structs, together building up a type
sub-system: one vtable-vtable working as the root and one or several
"types", each with a set of "instances". (The vtable-vtable should be
compared to the class <class> which is the class of itself.)
@lisp
(define ball-root (make-vtable-vtable "pr" 0))
(define (make-ball-type ball-color)
(make-struct ball-root 0
(make-struct-layout "pw")
(lambda (ball port)
(format port "#<a ~A ball owned by ~A>"
(color ball)
(owner ball)))
ball-color))
(define (color ball) (struct-ref (struct-vtable ball) vtable-offset-user))
(define (owner ball) (struct-ref ball 0))
(define red (make-ball-type 'red))
(define green (make-ball-type 'green))
(define (make-ball type owner) (make-struct type 0 owner))
(define ball (make-ball green 'Nisse))
ball @result{} #<a green ball owned by Nisse>
@end lisp
@end deffn
struct-ref
@c snarfed from struct.c:542
@deffn {Scheme Procedure} struct-ref handle pos
@deffnx {Scheme Procedure} struct-set! struct n value
@deffnx {C Function} scm_struct_ref (handle, pos)
Access (or modify) the @var{n}th field of @var{struct}.
If the field is of type 'p', then it can be set to an arbitrary value.
If the field is of type 'u', then it can only be set to a non-negative
integer value small enough to fit in one machine word.
@end deffn
struct-set!
@c snarfed from struct.c:621
@deffn {Scheme Procedure} struct-set! handle pos val
@deffnx {C Function} scm_struct_set_x (handle, pos, val)
Set the slot of the structure @var{handle} with index @var{pos}
to @var{val}. Signal an error if the slot can not be written
to.
@end deffn
struct-vtable
@c snarfed from struct.c:692
@deffn {Scheme Procedure} struct-vtable handle
@deffnx {C Function} scm_struct_vtable (handle)
Return the vtable structure that describes the type of @var{struct}.
@end deffn
struct-vtable-tag
@c snarfed from struct.c:703
@deffn {Scheme Procedure} struct-vtable-tag handle
@deffnx {C Function} scm_struct_vtable_tag (handle)
Return the vtable tag of the structure @var{handle}.
@end deffn
struct-vtable-name
@c snarfed from struct.c:742
@deffn {Scheme Procedure} struct-vtable-name vtable
@deffnx {C Function} scm_struct_vtable_name (vtable)
Return the name of the vtable @var{vtable}.
@end deffn
set-struct-vtable-name!
@c snarfed from struct.c:752
@deffn {Scheme Procedure} set-struct-vtable-name! vtable name
@deffnx {C Function} scm_set_struct_vtable_name_x (vtable, name)
Set the name of the vtable @var{vtable} to @var{name}.
@end deffn
symbol?
@c snarfed from symbols.c:156
@deffn {Scheme Procedure} symbol? obj
@deffnx {C Function} scm_symbol_p (obj)
Return @code{#t} if @var{obj} is a symbol, otherwise return
@code{#f}.
@end deffn
symbol-interned?
@c snarfed from symbols.c:166
@deffn {Scheme Procedure} symbol-interned? symbol
@deffnx {C Function} scm_symbol_interned_p (symbol)
Return @code{#t} if @var{symbol} is interned, otherwise return
@code{#f}.
@end deffn
make-symbol
@c snarfed from symbols.c:178
@deffn {Scheme Procedure} make-symbol name
@deffnx {C Function} scm_make_symbol (name)
Return a new uninterned symbol with the name @var{name}. The returned symbol is guaranteed to be unique and future calls to @code{string->symbol} will not return it.
@end deffn
symbol->string
@c snarfed from symbols.c:210
@deffn {Scheme Procedure} symbol->string s
@deffnx {C Function} scm_symbol_to_string (s)
Return the name of @var{symbol} as a string. If the symbol was
part of an object returned as the value of a literal expression
(section @pxref{Literal expressions,,,r5rs, The Revised^5
Report on Scheme}) or by a call to the @code{read} procedure,
and its name contains alphabetic characters, then the string
returned will contain characters in the implementation's
preferred standard case---some implementations will prefer
upper case, others lower case. If the symbol was returned by
@code{string->symbol}, the case of characters in the string
returned will be the same as the case in the string that was
passed to @code{string->symbol}. It is an error to apply
mutation procedures like @code{string-set!} to strings returned
by this procedure.
The following examples assume that the implementation's
standard case is lower case:
@lisp
(symbol->string 'flying-fish) @result{} "flying-fish"
(symbol->string 'Martin) @result{} "martin"
(symbol->string
(string->symbol "Malvina")) @result{} "Malvina"
@end lisp
@end deffn
string->symbol
@c snarfed from symbols.c:240
@deffn {Scheme Procedure} string->symbol string
@deffnx {C Function} scm_string_to_symbol (string)
Return the symbol whose name is @var{string}. This procedure
can create symbols with names containing special characters or
letters in the non-standard case, but it is usually a bad idea
to create such symbols because in some implementations of
Scheme they cannot be read as themselves. See
@code{symbol->string}.
The following examples assume that the implementation's
standard case is lower case:
@lisp
(eq? 'mISSISSIppi 'mississippi) @result{} #t
(string->symbol "mISSISSIppi") @result{} @r{the symbol with name "mISSISSIppi"}
(eq? 'bitBlt (string->symbol "bitBlt")) @result{} #f
(eq? 'JollyWog
(string->symbol (symbol->string 'JollyWog))) @result{} #t
(string=? "K. Harper, M.D."
(symbol->string
(string->symbol "K. Harper, M.D."))) @result{}#t
@end lisp
@end deffn
string-ci->symbol
@c snarfed from symbols.c:252
@deffn {Scheme Procedure} string-ci->symbol str
@deffnx {C Function} scm_string_ci_to_symbol (str)
Return the symbol whose name is @var{str}. @var{str} is
converted to lowercase before the conversion is done, if Guile
is currently reading symbols case-insensitively.
@end deffn
gensym
@c snarfed from symbols.c:269
@deffn {Scheme Procedure} gensym [prefix]
@deffnx {C Function} scm_gensym (prefix)
Create a new symbol with a name constructed from a prefix and
a counter value. The string @var{prefix} can be specified as
an optional argument. Default prefix is @code{ g}. The counter
is increased by 1 at each call. There is no provision for
resetting the counter.
@end deffn
symbol-hash
@c snarfed from symbols.c:295
@deffn {Scheme Procedure} symbol-hash symbol
@deffnx {C Function} scm_symbol_hash (symbol)
Return a hash value for @var{symbol}.
@end deffn
symbol-fref
@c snarfed from symbols.c:305
@deffn {Scheme Procedure} symbol-fref s
@deffnx {C Function} scm_symbol_fref (s)
Return the contents of @var{symbol}'s @dfn{function slot}.
@end deffn
symbol-pref
@c snarfed from symbols.c:316
@deffn {Scheme Procedure} symbol-pref s
@deffnx {C Function} scm_symbol_pref (s)
Return the @dfn{property list} currently associated with @var{symbol}.
@end deffn
symbol-fset!
@c snarfed from symbols.c:327
@deffn {Scheme Procedure} symbol-fset! s val
@deffnx {C Function} scm_symbol_fset_x (s, val)
Change the binding of @var{symbol}'s function slot.
@end deffn
symbol-pset!
@c snarfed from symbols.c:339
@deffn {Scheme Procedure} symbol-pset! s val
@deffnx {C Function} scm_symbol_pset_x (s, val)
Change the binding of @var{symbol}'s property slot.
@end deffn
call-with-new-thread
@c snarfed from threads.c:611
@deffn {Scheme Procedure} call-with-new-thread thunk [handler]
@deffnx {C Function} scm_call_with_new_thread (thunk, handler)
Call @code{thunk} in a new thread and with a new dynamic state,
returning a new thread object representing the thread. The procedure
@var{thunk} is called via @code{with-continuation-barrier}.
When @var{handler} is specified, then @var{thunk} is called from
within a @code{catch} with tag @code{#t} that has @var{handler} as its
handler. This catch is established inside the continuation barrier.
Once @var{thunk} or @var{handler} returns, the return value is made
the @emph{exit value} of the thread and the thread is terminated.
@end deffn
yield
@c snarfed from threads.c:722
@deffn {Scheme Procedure} yield
@deffnx {C Function} scm_yield ()
Move the calling thread to the end of the scheduling queue.
@end deffn
join-thread
@c snarfed from threads.c:732
@deffn {Scheme Procedure} join-thread thread
@deffnx {C Function} scm_join_thread (thread)
Suspend execution of the calling thread until the target @var{thread} terminates, unless the target @var{thread} has already terminated.
@end deffn
make-mutex
@c snarfed from threads.c:828
@deffn {Scheme Procedure} make-mutex
@deffnx {C Function} scm_make_mutex ()
Create a new mutex.
@end deffn
make-recursive-mutex
@c snarfed from threads.c:837
@deffn {Scheme Procedure} make-recursive-mutex
@deffnx {C Function} scm_make_recursive_mutex ()
Create a new recursive mutex.
@end deffn
lock-mutex
@c snarfed from threads.c:883
@deffn {Scheme Procedure} lock-mutex mx
@deffnx {C Function} scm_lock_mutex (mx)
Lock @var{mutex}. If the mutex is already locked, the calling thread blocks until the mutex becomes available. The function returns when the calling thread owns the lock on @var{mutex}. Locking a mutex that a thread already owns will succeed right away and will not block the thread. That is, Guile's mutexes are @emph{recursive}.
@end deffn
try-mutex
@c snarfed from threads.c:931
@deffn {Scheme Procedure} try-mutex mutex
@deffnx {C Function} scm_try_mutex (mutex)
Try to lock @var{mutex}. If the mutex is already locked by someone else, return @code{#f}. Else lock the mutex and return @code{#t}.
@end deffn
unlock-mutex
@c snarfed from threads.c:976
@deffn {Scheme Procedure} unlock-mutex mx
@deffnx {C Function} scm_unlock_mutex (mx)
Unlocks @var{mutex} if the calling thread owns the lock on @var{mutex}. Calling unlock-mutex on a mutex not owned by the current thread results in undefined behaviour. Once a mutex has been unlocked, one thread blocked on @var{mutex} is awakened and grabs the mutex lock. Every call to @code{lock-mutex} by this thread must be matched with a call to @code{unlock-mutex}. Only the last call to @code{unlock-mutex} will actually unlock the mutex.
@end deffn
make-condition-variable
@c snarfed from threads.c:1052
@deffn {Scheme Procedure} make-condition-variable
@deffnx {C Function} scm_make_condition_variable ()
Make a new condition variable.
@end deffn
wait-condition-variable
@c snarfed from threads.c:1120
@deffn {Scheme Procedure} wait-condition-variable cv mx [t]
@deffnx {C Function} scm_timed_wait_condition_variable (cv, mx, t)
Wait until @var{cond-var} has been signalled. While waiting, @var{mutex} is atomically unlocked (as with @code{unlock-mutex}) and is locked again when this function returns. When @var{time} is given, it specifies a point in time where the waiting should be aborted. It can be either a integer as returned by @code{current-time} or a pair as returned by @code{gettimeofday}. When the waiting is aborted the mutex is locked and @code{#f} is returned. When the condition variable is in fact signalled, the mutex is also locked and @code{#t} is returned.
@end deffn
signal-condition-variable
@c snarfed from threads.c:1157
@deffn {Scheme Procedure} signal-condition-variable cv
@deffnx {C Function} scm_signal_condition_variable (cv)
Wake up one thread that is waiting for @var{cv}
@end deffn
broadcast-condition-variable
@c snarfed from threads.c:1177
@deffn {Scheme Procedure} broadcast-condition-variable cv
@deffnx {C Function} scm_broadcast_condition_variable (cv)
Wake up all threads that are waiting for @var{cv}.
@end deffn
current-thread
@c snarfed from threads.c:1354
@deffn {Scheme Procedure} current-thread
@deffnx {C Function} scm_current_thread ()
Return the thread that called this function.
@end deffn
all-threads
@c snarfed from threads.c:1372
@deffn {Scheme Procedure} all-threads
@deffnx {C Function} scm_all_threads ()
Return a list of all threads.
@end deffn
thread-exited?
@c snarfed from threads.c:1398
@deffn {Scheme Procedure} thread-exited? thread
@deffnx {C Function} scm_thread_exited_p (thread)
Return @code{#t} iff @var{thread} has exited.
@end deffn
catch
@c snarfed from throw.c:512
@deffn {Scheme Procedure} catch key thunk handler
@deffnx {C Function} scm_catch (key, thunk, handler)
Invoke @var{thunk} in the dynamic context of @var{handler} for
exceptions matching @var{key}. If thunk throws to the symbol
@var{key}, then @var{handler} is invoked this way:
@lisp
(handler key args ...)
@end lisp
@var{key} is a symbol or @code{#t}.
@var{thunk} takes no arguments. If @var{thunk} returns
normally, that is the return value of @code{catch}.
Handler is invoked outside the scope of its own @code{catch}.
If @var{handler} again throws to the same key, a new handler
from further up the call chain is invoked.
If the key is @code{#t}, then a throw to @emph{any} symbol will
match this call to @code{catch}.
@end deffn
lazy-catch
@c snarfed from throw.c:540
@deffn {Scheme Procedure} lazy-catch key thunk handler
@deffnx {C Function} scm_lazy_catch (key, thunk, handler)
This behaves exactly like @code{catch}, except that it does
not unwind the stack before invoking @var{handler}.
The @var{handler} procedure is not allowed to return:
it must throw to another catch, or otherwise exit non-locally.
@end deffn
throw
@c snarfed from throw.c:573
@deffn {Scheme Procedure} throw key . args
@deffnx {C Function} scm_throw (key, args)
Invoke the catch form matching @var{key}, passing @var{args} to the
@var{handler}.
@var{key} is a symbol. It will match catches of the same symbol or of
@code{#t}.
If there is no handler at all, Guile prints an error and then exits.
@end deffn
values
@c snarfed from values.c:53
@deffn {Scheme Procedure} values . args
@deffnx {C Function} scm_values (args)
Delivers all of its arguments to its continuation. Except for
continuations created by the @code{call-with-values} procedure,
all continuations take exactly one value. The effect of
passing no value or more than one value to continuations that
were not created by @code{call-with-values} is unspecified.
@end deffn
make-variable
@c snarfed from variable.c:52
@deffn {Scheme Procedure} make-variable init
@deffnx {C Function} scm_make_variable (init)
Return a variable initialized to value @var{init}.
@end deffn
make-undefined-variable
@c snarfed from variable.c:62
@deffn {Scheme Procedure} make-undefined-variable
@deffnx {C Function} scm_make_undefined_variable ()
Return a variable that is initially unbound.
@end deffn
variable?
@c snarfed from variable.c:73
@deffn {Scheme Procedure} variable? obj
@deffnx {C Function} scm_variable_p (obj)
Return @code{#t} iff @var{obj} is a variable object, else
return @code{#f}.
@end deffn
variable-ref
@c snarfed from variable.c:85
@deffn {Scheme Procedure} variable-ref var
@deffnx {C Function} scm_variable_ref (var)
Dereference @var{var} and return its value.
@var{var} must be a variable object; see @code{make-variable}
and @code{make-undefined-variable}.
@end deffn
variable-set!
@c snarfed from variable.c:101
@deffn {Scheme Procedure} variable-set! var val
@deffnx {C Function} scm_variable_set_x (var, val)
Set the value of the variable @var{var} to @var{val}.
@var{var} must be a variable object, @var{val} can be any
value. Return an unspecified value.
@end deffn
variable-bound?
@c snarfed from variable.c:113
@deffn {Scheme Procedure} variable-bound? var
@deffnx {C Function} scm_variable_bound_p (var)
Return @code{#t} iff @var{var} is bound to a value.
Throws an error if @var{var} is not a variable object.
@end deffn
vector?
@c snarfed from vectors.c:91
@deffn {Scheme Procedure} vector? obj
@deffnx {C Function} scm_vector_p (obj)
Return @code{#t} if @var{obj} is a vector, otherwise return
@code{#f}.
@end deffn
list->vector
@c snarfed from vectors.c:123
@deffn {Scheme Procedure} list->vector
implemented by the C function "scm_vector"
@end deffn
vector
@c snarfed from vectors.c:140
@deffn {Scheme Procedure} vector . l
@deffnx {Scheme Procedure} list->vector l
@deffnx {C Function} scm_vector (l)
Return a newly allocated vector composed of the
given arguments. Analogous to @code{list}.
@lisp
(vector 'a 'b 'c) @result{} #(a b c)
@end lisp
@end deffn
make-vector
@c snarfed from vectors.c:276
@deffn {Scheme Procedure} make-vector k [fill]
@deffnx {C Function} scm_make_vector (k, fill)
Return a newly allocated vector of @var{k} elements. If a
second argument is given, then each position is initialized to
@var{fill}. Otherwise the initial contents of each position is
unspecified.
@end deffn
vector-copy
@c snarfed from vectors.c:318
@deffn {Scheme Procedure} vector-copy vec
@deffnx {C Function} scm_vector_copy (vec)
Return a copy of @var{vec}.
@end deffn
vector->list
@c snarfed from vectors.c:389
@deffn {Scheme Procedure} vector->list v
@deffnx {C Function} scm_vector_to_list (v)
Return a newly allocated list composed of the elements of @var{v}.
@lisp
(vector->list '#(dah dah didah)) @result{} (dah dah didah)
(list->vector '(dididit dah)) @result{} #(dididit dah)
@end lisp
@end deffn
vector-fill!
@c snarfed from vectors.c:413
@deffn {Scheme Procedure} vector-fill! v fill
@deffnx {C Function} scm_vector_fill_x (v, fill)
Store @var{fill} in every position of @var{vector}. The value
returned by @code{vector-fill!} is unspecified.
@end deffn
vector-move-left!
@c snarfed from vectors.c:450
@deffn {Scheme Procedure} vector-move-left! vec1 start1 end1 vec2 start2
@deffnx {C Function} scm_vector_move_left_x (vec1, start1, end1, vec2, start2)
Copy elements from @var{vec1}, positions @var{start1} to @var{end1},
to @var{vec2} starting at position @var{start2}. @var{start1} and
@var{start2} are inclusive indices; @var{end1} is exclusive.
@code{vector-move-left!} copies elements in leftmost order.
Therefore, in the case where @var{vec1} and @var{vec2} refer to the
same vector, @code{vector-move-left!} is usually appropriate when
@var{start1} is greater than @var{start2}.
@end deffn
vector-move-right!
@c snarfed from vectors.c:488
@deffn {Scheme Procedure} vector-move-right! vec1 start1 end1 vec2 start2
@deffnx {C Function} scm_vector_move_right_x (vec1, start1, end1, vec2, start2)
Copy elements from @var{vec1}, positions @var{start1} to @var{end1},
to @var{vec2} starting at position @var{start2}. @var{start1} and
@var{start2} are inclusive indices; @var{end1} is exclusive.
@code{vector-move-right!} copies elements in rightmost order.
Therefore, in the case where @var{vec1} and @var{vec2} refer to the
same vector, @code{vector-move-right!} is usually appropriate when
@var{start1} is less than @var{start2}.
@end deffn
generalized-vector?
@c snarfed from vectors.c:537
@deffn {Scheme Procedure} generalized-vector? obj
@deffnx {C Function} scm_generalized_vector_p (obj)
Return @code{#t} if @var{obj} is a vector, string,
bitvector, or uniform numeric vector.
@end deffn
generalized-vector-length
@c snarfed from vectors.c:569
@deffn {Scheme Procedure} generalized-vector-length v
@deffnx {C Function} scm_generalized_vector_length (v)
Return the length of the generalized vector @var{v}.
@end deffn
generalized-vector-ref
@c snarfed from vectors.c:594
@deffn {Scheme Procedure} generalized-vector-ref v idx
@deffnx {C Function} scm_generalized_vector_ref (v, idx)
Return the element at index @var{idx} of the
generalized vector @var{v}.
@end deffn
generalized-vector-set!
@c snarfed from vectors.c:619
@deffn {Scheme Procedure} generalized-vector-set! v idx val
@deffnx {C Function} scm_generalized_vector_set_x (v, idx, val)
Set the element at index @var{idx} of the
generalized vector @var{v} to @var{val}.
@end deffn
generalized-vector->list
@c snarfed from vectors.c:630
@deffn {Scheme Procedure} generalized-vector->list v
@deffnx {C Function} scm_generalized_vector_to_list (v)
Return a new list whose elements are the elements of the
generalized vector @var{v}.
@end deffn
major-version
@c snarfed from version.c:35
@deffn {Scheme Procedure} major-version
@deffnx {C Function} scm_major_version ()
Return a string containing Guile's major version number.
E.g., the 1 in "1.6.5".
@end deffn
minor-version
@c snarfed from version.c:48
@deffn {Scheme Procedure} minor-version
@deffnx {C Function} scm_minor_version ()
Return a string containing Guile's minor version number.
E.g., the 6 in "1.6.5".
@end deffn
micro-version
@c snarfed from version.c:61
@deffn {Scheme Procedure} micro-version
@deffnx {C Function} scm_micro_version ()
Return a string containing Guile's micro version number.
E.g., the 5 in "1.6.5".
@end deffn
version
@c snarfed from version.c:83
@deffn {Scheme Procedure} version
@deffnx {Scheme Procedure} major-version
@deffnx {Scheme Procedure} minor-version
@deffnx {Scheme Procedure} micro-version
@deffnx {C Function} scm_version ()
Return a string describing Guile's version number, or its major, minor
or micro version number, respectively.
@lisp
(version) @result{} "1.6.0"
(major-version) @result{} "1"
(minor-version) @result{} "6"
(micro-version) @result{} "0"
@end lisp
@end deffn
effective-version
@c snarfed from version.c:113
@deffn {Scheme Procedure} effective-version
@deffnx {C Function} scm_effective_version ()
Return a string describing Guile's effective version number.
@lisp
(version) @result{} "1.6.0"
(effective-version) @result{} "1.6"
(major-version) @result{} "1"
(minor-version) @result{} "6"
(micro-version) @result{} "0"
@end lisp
@end deffn
make-soft-port
@c snarfed from vports.c:185
@deffn {Scheme Procedure} make-soft-port pv modes
@deffnx {C Function} scm_make_soft_port (pv, modes)
Return a port capable of receiving or delivering characters as
specified by the @var{modes} string (@pxref{File Ports,
open-file}). @var{pv} must be a vector of length 5 or 6. Its
components are as follows:
@enumerate 0
@item
procedure accepting one character for output
@item
procedure accepting a string for output
@item
thunk for flushing output
@item
thunk for getting one character
@item
thunk for closing port (not by garbage collection)
@item
(if present and not @code{#f}) thunk for computing the number of
characters that can be read from the port without blocking.
@end enumerate
For an output-only port only elements 0, 1, 2, and 4 need be
procedures. For an input-only port only elements 3 and 4 need
be procedures. Thunks 2 and 4 can instead be @code{#f} if
there is no useful operation for them to perform.
If thunk 3 returns @code{#f} or an @code{eof-object}
(@pxref{Input, eof-object?, ,r5rs, The Revised^5 Report on
Scheme}) it indicates that the port has reached end-of-file.
For example:
@lisp
(define stdout (current-output-port))
(define p (make-soft-port
(vector
(lambda (c) (write c stdout))
(lambda (s) (display s stdout))
(lambda () (display "." stdout))
(lambda () (char-upcase (read-char)))
(lambda () (display "@@" stdout)))
"rw"))
(write p p) @result{} #<input-output: soft 8081e20>
@end lisp
@end deffn
make-weak-vector
@c snarfed from weaks.c:74
@deffn {Scheme Procedure} make-weak-vector size [fill]
@deffnx {C Function} scm_make_weak_vector (size, fill)
Return a weak vector with @var{size} elements. If the optional
argument @var{fill} is given, all entries in the vector will be
set to @var{fill}. The default value for @var{fill} is the
empty list.
@end deffn
list->weak-vector
@c snarfed from weaks.c:82
@deffn {Scheme Procedure} list->weak-vector
implemented by the C function "scm_weak_vector"
@end deffn
weak-vector
@c snarfed from weaks.c:90
@deffn {Scheme Procedure} weak-vector . l
@deffnx {Scheme Procedure} list->weak-vector l
@deffnx {C Function} scm_weak_vector (l)
Construct a weak vector from a list: @code{weak-vector} uses
the list of its arguments while @code{list->weak-vector} uses
its only argument @var{l} (a list) to construct a weak vector
the same way @code{list->vector} would.
@end deffn
weak-vector?
@c snarfed from weaks.c:120
@deffn {Scheme Procedure} weak-vector? obj
@deffnx {C Function} scm_weak_vector_p (obj)
Return @code{#t} if @var{obj} is a weak vector. Note that all
weak hashes are also weak vectors.
@end deffn
make-weak-key-alist-vector
@c snarfed from weaks.c:138
@deffn {Scheme Procedure} make-weak-key-alist-vector [size]
@deffnx {Scheme Procedure} make-weak-value-alist-vector size
@deffnx {Scheme Procedure} make-doubly-weak-alist-vector size
@deffnx {C Function} scm_make_weak_key_alist_vector (size)
Return a weak hash table with @var{size} buckets. As with any
hash table, choosing a good size for the table requires some
caution.
You can modify weak hash tables in exactly the same way you
would modify regular hash tables. (@pxref{Hash Tables})
@end deffn
make-weak-value-alist-vector
@c snarfed from weaks.c:150
@deffn {Scheme Procedure} make-weak-value-alist-vector [size]
@deffnx {C Function} scm_make_weak_value_alist_vector (size)
Return a hash table with weak values with @var{size} buckets.
(@pxref{Hash Tables})
@end deffn
make-doubly-weak-alist-vector
@c snarfed from weaks.c:162
@deffn {Scheme Procedure} make-doubly-weak-alist-vector size
@deffnx {C Function} scm_make_doubly_weak_alist_vector (size)
Return a hash table with weak keys and values with @var{size}
buckets. (@pxref{Hash Tables})
@end deffn
weak-key-alist-vector?
@c snarfed from weaks.c:177
@deffn {Scheme Procedure} weak-key-alist-vector? obj
@deffnx {Scheme Procedure} weak-value-alist-vector? obj
@deffnx {Scheme Procedure} doubly-weak-alist-vector? obj
@deffnx {C Function} scm_weak_key_alist_vector_p (obj)
Return @code{#t} if @var{obj} is the specified weak hash
table. Note that a doubly weak hash table is neither a weak key
nor a weak value hash table.
@end deffn
weak-value-alist-vector?
@c snarfed from weaks.c:187
@deffn {Scheme Procedure} weak-value-alist-vector? obj
@deffnx {C Function} scm_weak_value_alist_vector_p (obj)
Return @code{#t} if @var{obj} is a weak value hash table.
@end deffn
doubly-weak-alist-vector?
@c snarfed from weaks.c:197
@deffn {Scheme Procedure} doubly-weak-alist-vector? obj
@deffnx {C Function} scm_doubly_weak_alist_vector_p (obj)
Return @code{#t} if @var{obj} is a doubly weak hash table.
@end deffn
array-fill!
@c snarfed from ramap.c:352
@deffn {Scheme Procedure} array-fill! ra fill
@deffnx {C Function} scm_array_fill_x (ra, fill)
Store @var{fill} in every element of @var{array}. The value returned
is unspecified.
@end deffn
array-copy-in-order!
@c snarfed from ramap.c:399
@deffn {Scheme Procedure} array-copy-in-order!
implemented by the C function "scm_array_copy_x"
@end deffn
array-copy!
@c snarfed from ramap.c:408
@deffn {Scheme Procedure} array-copy! src dst
@deffnx {Scheme Procedure} array-copy-in-order! src dst
@deffnx {C Function} scm_array_copy_x (src, dst)
Copy every element from vector or array @var{source} to the
corresponding element of @var{destination}. @var{destination} must have
the same rank as @var{source}, and be at least as large in each
dimension. The order is unspecified.
@end deffn
array-map-in-order!
@c snarfed from ramap.c:798
@deffn {Scheme Procedure} array-map-in-order!
implemented by the C function "scm_array_map_x"
@end deffn
array-map!
@c snarfed from ramap.c:809
@deffn {Scheme Procedure} array-map! ra0 proc . lra
@deffnx {Scheme Procedure} array-map-in-order! ra0 proc . lra
@deffnx {C Function} scm_array_map_x (ra0, proc, lra)
@var{array1}, @dots{} must have the same number of dimensions as
@var{array0} and have a range for each index which includes the range
for the corresponding index in @var{array0}. @var{proc} is applied to
each tuple of elements of @var{array1} @dots{} and the result is stored
as the corresponding element in @var{array0}. The value returned is
unspecified. The order of application is unspecified.
@end deffn
array-for-each
@c snarfed from ramap.c:950
@deffn {Scheme Procedure} array-for-each proc ra0 . lra
@deffnx {C Function} scm_array_for_each (proc, ra0, lra)
Apply @var{proc} to each tuple of elements of @var{array0} @dots{}
in row-major order. The value returned is unspecified.
@end deffn
array-index-map!
@c snarfed from ramap.c:978
@deffn {Scheme Procedure} array-index-map! ra proc
@deffnx {C Function} scm_array_index_map_x (ra, proc)
Apply @var{proc} to the indices of each element of @var{array} in
turn, storing the result in the corresponding element. The value
returned and the order of application are unspecified.
One can implement @var{array-indexes} as
@lisp
(define (array-indexes array)
(let ((ra (apply make-array #f (array-shape array))))
(array-index-map! ra (lambda x x))
ra))
@end lisp
Another example:
@lisp
(define (apl:index-generator n)
(let ((v (make-uniform-vector n 1)))
(array-index-map! v (lambda (i) i))
v))
@end lisp
@end deffn
array?
@c snarfed from unif.c:501
@deffn {Scheme Procedure} array? obj [prot]
@deffnx {C Function} scm_array_p (obj, prot)
Return @code{#t} if the @var{obj} is an array, and @code{#f} if
not.
@end deffn
typed-array?
@c snarfed from unif.c:548
@deffn {Scheme Procedure} typed-array? obj type
@deffnx {C Function} scm_typed_array_p (obj, type)
Return @code{#t} if the @var{obj} is an array of type
@var{type}, and @code{#f} if not.
@end deffn
array-rank
@c snarfed from unif.c:569
@deffn {Scheme Procedure} array-rank array
@deffnx {C Function} scm_array_rank (array)
Return the number of dimensions of the array @var{array.}
@end deffn
array-dimensions
@c snarfed from unif.c:583
@deffn {Scheme Procedure} array-dimensions ra
@deffnx {C Function} scm_array_dimensions (ra)
@code{array-dimensions} is similar to @code{array-shape} but replaces
elements with a @code{0} minimum with one greater than the maximum. So:
@lisp
(array-dimensions (make-array 'foo '(-1 3) 5)) @result{} ((-1 3) 5)
@end lisp
@end deffn
shared-array-root
@c snarfed from unif.c:611
@deffn {Scheme Procedure} shared-array-root ra
@deffnx {C Function} scm_shared_array_root (ra)
Return the root vector of a shared array.
@end deffn
shared-array-offset
@c snarfed from unif.c:625
@deffn {Scheme Procedure} shared-array-offset ra
@deffnx {C Function} scm_shared_array_offset (ra)
Return the root vector index of the first element in the array.
@end deffn
shared-array-increments
@c snarfed from unif.c:641
@deffn {Scheme Procedure} shared-array-increments ra
@deffnx {C Function} scm_shared_array_increments (ra)
For each dimension, return the distance between elements in the root vector.
@end deffn
make-typed-array
@c snarfed from unif.c:740
@deffn {Scheme Procedure} make-typed-array type fill . bounds
@deffnx {C Function} scm_make_typed_array (type, fill, bounds)
Create and return an array of type @var{type}.
@end deffn
make-array
@c snarfed from unif.c:775
@deffn {Scheme Procedure} make-array fill . bounds
@deffnx {C Function} scm_make_array (fill, bounds)
Create and return an array.
@end deffn
dimensions->uniform-array
@c snarfed from unif.c:790
@deffn {Scheme Procedure} dimensions->uniform-array dims prot [fill]
@deffnx {Scheme Procedure} make-uniform-vector length prototype [fill]
@deffnx {C Function} scm_dimensions_to_uniform_array (dims, prot, fill)
Create and return a uniform array or vector of type
corresponding to @var{prototype} with dimensions @var{dims} or
length @var{length}. If @var{fill} is supplied, it's used to
fill the array, otherwise @var{prototype} is used.
@end deffn
make-shared-array
@c snarfed from unif.c:843
@deffn {Scheme Procedure} make-shared-array oldra mapfunc . dims
@deffnx {C Function} scm_make_shared_array (oldra, mapfunc, dims)
@code{make-shared-array} can be used to create shared subarrays of other
arrays. The @var{mapper} is a function that translates coordinates in
the new array into coordinates in the old array. A @var{mapper} must be
linear, and its range must stay within the bounds of the old array, but
it can be otherwise arbitrary. A simple example:
@lisp
(define fred (make-array #f 8 8))
(define freds-diagonal
(make-shared-array fred (lambda (i) (list i i)) 8))
(array-set! freds-diagonal 'foo 3)
(array-ref fred 3 3) @result{} foo
(define freds-center
(make-shared-array fred (lambda (i j) (list (+ 3 i) (+ 3 j))) 2 2))
(array-ref freds-center 0 0) @result{} foo
@end lisp
@end deffn
transpose-array
@c snarfed from unif.c:961
@deffn {Scheme Procedure} transpose-array ra . args
@deffnx {C Function} scm_transpose_array (ra, args)
Return an array sharing contents with @var{array}, but with
dimensions arranged in a different order. There must be one
@var{dim} argument for each dimension of @var{array}.
@var{dim0}, @var{dim1}, @dots{} should be integers between 0
and the rank of the array to be returned. Each integer in that
range must appear at least once in the argument list.
The values of @var{dim0}, @var{dim1}, @dots{} correspond to
dimensions in the array to be returned, their positions in the
argument list to dimensions of @var{array}. Several @var{dim}s
may have the same value, in which case the returned array will
have smaller rank than @var{array}.
@lisp
(transpose-array '#2((a b) (c d)) 1 0) @result{} #2((a c) (b d))
(transpose-array '#2((a b) (c d)) 0 0) @result{} #1(a d)
(transpose-array '#3(((a b c) (d e f)) ((1 2 3) (4 5 6))) 1 1 0) @result{}
#2((a 4) (b 5) (c 6))
@end lisp
@end deffn
enclose-array
@c snarfed from unif.c:1059
@deffn {Scheme Procedure} enclose-array ra . axes
@deffnx {C Function} scm_enclose_array (ra, axes)
@var{dim0}, @var{dim1} @dots{} should be nonnegative integers less than
the rank of @var{array}. @var{enclose-array} returns an array
resembling an array of shared arrays. The dimensions of each shared
array are the same as the @var{dim}th dimensions of the original array,
the dimensions of the outer array are the same as those of the original
array that did not match a @var{dim}.
An enclosed array is not a general Scheme array. Its elements may not
be set using @code{array-set!}. Two references to the same element of
an enclosed array will be @code{equal?} but will not in general be
@code{eq?}. The value returned by @var{array-prototype} when given an
enclosed array is unspecified.
examples:
@lisp
(enclose-array '#3(((a b c) (d e f)) ((1 2 3) (4 5 6))) 1) @result{}
#<enclosed-array (#1(a d) #1(b e) #1(c f)) (#1(1 4) #1(2 5) #1(3 6))>
(enclose-array '#3(((a b c) (d e f)) ((1 2 3) (4 5 6))) 1 0) @result{}
#<enclosed-array #2((a 1) (d 4)) #2((b 2) (e 5)) #2((c 3) (f 6))>
@end lisp
@end deffn
array-in-bounds?
@c snarfed from unif.c:1132
@deffn {Scheme Procedure} array-in-bounds? v . args
@deffnx {C Function} scm_array_in_bounds_p (v, args)
Return @code{#t} if its arguments would be acceptable to
@code{array-ref}.
@end deffn
array-ref
@c snarfed from unif.c:1209
@deffn {Scheme Procedure} array-ref v . args
@deffnx {C Function} scm_array_ref (v, args)
Return the element at the @code{(index1, index2)} element in
@var{array}.
@end deffn
array-set!
@c snarfed from unif.c:1226
@deffn {Scheme Procedure} array-set! v obj . args
@deffnx {C Function} scm_array_set_x (v, obj, args)
Set the element at the @code{(index1, index2)} element in @var{array} to
@var{new-value}. The value returned by array-set! is unspecified.
@end deffn
array-contents
@c snarfed from unif.c:1252
@deffn {Scheme Procedure} array-contents ra [strict]
@deffnx {C Function} scm_array_contents (ra, strict)
If @var{array} may be @dfn{unrolled} into a one dimensional shared array
without changing their order (last subscript changing fastest), then
@code{array-contents} returns that shared array, otherwise it returns
@code{#f}. All arrays made by @var{make-array} and
@var{make-uniform-array} may be unrolled, some arrays made by
@var{make-shared-array} may not be.
If the optional argument @var{strict} is provided, a shared array will
be returned only if its elements are stored internally contiguous in
memory.
@end deffn
uniform-array-read!
@c snarfed from unif.c:1352
@deffn {Scheme Procedure} uniform-array-read! ura [port_or_fd [start [end]]]
@deffnx {Scheme Procedure} uniform-vector-read! uve [port-or-fdes] [start] [end]
@deffnx {C Function} scm_uniform_array_read_x (ura, port_or_fd, start, end)
Attempt to read all elements of @var{ura}, in lexicographic order, as
binary objects from @var{port-or-fdes}.
If an end of file is encountered,
the objects up to that point are put into @var{ura}
(starting at the beginning) and the remainder of the array is
unchanged.
The optional arguments @var{start} and @var{end} allow
a specified region of a vector (or linearized array) to be read,
leaving the remainder of the vector unchanged.
@code{uniform-array-read!} returns the number of objects read.
@var{port-or-fdes} may be omitted, in which case it defaults to the value
returned by @code{(current-input-port)}.
@end deffn
uniform-array-write
@c snarfed from unif.c:1406
@deffn {Scheme Procedure} uniform-array-write ura [port_or_fd [start [end]]]
@deffnx {C Function} scm_uniform_array_write (ura, port_or_fd, start, end)
Writes all elements of @var{ura} as binary objects to
@var{port-or-fdes}.
The optional arguments @var{start}
and @var{end} allow
a specified region of a vector (or linearized array) to be written.
The number of objects actually written is returned.
@var{port-or-fdes} may be
omitted, in which case it defaults to the value returned by
@code{(current-output-port)}.
@end deffn
bitvector?
@c snarfed from unif.c:1518
@deffn {Scheme Procedure} bitvector? obj
@deffnx {C Function} scm_bitvector_p (obj)
Return @code{#t} when @var{obj} is a bitvector, else
return @code{#f}.
@end deffn
make-bitvector
@c snarfed from unif.c:1545
@deffn {Scheme Procedure} make-bitvector len [fill]
@deffnx {C Function} scm_make_bitvector (len, fill)
Create a new bitvector of length @var{len} and
optionally initialize all elements to @var{fill}.
@end deffn
bitvector
@c snarfed from unif.c:1554
@deffn {Scheme Procedure} bitvector . bits
@deffnx {C Function} scm_bitvector (bits)
Create a new bitvector with the arguments as elements.
@end deffn
bitvector-length
@c snarfed from unif.c:1570
@deffn {Scheme Procedure} bitvector-length vec
@deffnx {C Function} scm_bitvector_length (vec)
Return the length of the bitvector @var{vec}.
@end deffn
bitvector-ref
@c snarfed from unif.c:1661
@deffn {Scheme Procedure} bitvector-ref vec idx
@deffnx {C Function} scm_bitvector_ref (vec, idx)
Return the element at index @var{idx} of the bitvector
@var{vec}.
@end deffn
bitvector-set!
@c snarfed from unif.c:1704
@deffn {Scheme Procedure} bitvector-set! vec idx val
@deffnx {C Function} scm_bitvector_set_x (vec, idx, val)
Set the element at index @var{idx} of the bitvector
@var{vec} when @var{val} is true, else clear it.
@end deffn
bitvector-fill!
@c snarfed from unif.c:1715
@deffn {Scheme Procedure} bitvector-fill! vec val
@deffnx {C Function} scm_bitvector_fill_x (vec, val)
Set all elements of the bitvector
@var{vec} when @var{val} is true, else clear them.
@end deffn
list->bitvector
@c snarfed from unif.c:1760
@deffn {Scheme Procedure} list->bitvector list
@deffnx {C Function} scm_list_to_bitvector (list)
Return a new bitvector initialized with the elements
of @var{list}.
@end deffn
bitvector->list
@c snarfed from unif.c:1790
@deffn {Scheme Procedure} bitvector->list vec
@deffnx {C Function} scm_bitvector_to_list (vec)
Return a new list initialized with the elements
of the bitvector @var{vec}.
@end deffn
bit-count
@c snarfed from unif.c:1854
@deffn {Scheme Procedure} bit-count b bitvector
@deffnx {C Function} scm_bit_count (b, bitvector)
Return the number of occurrences of the boolean @var{b} in
@var{bitvector}.
@end deffn
bit-position
@c snarfed from unif.c:1923
@deffn {Scheme Procedure} bit-position item v k
@deffnx {C Function} scm_bit_position (item, v, k)
Return the index of the first occurrance of @var{item} in bit
vector @var{v}, starting from @var{k}. If there is no
@var{item} entry between @var{k} and the end of
@var{bitvector}, then return @code{#f}. For example,
@example
(bit-position #t #*000101 0) @result{} 3
(bit-position #f #*0001111 3) @result{} #f
@end example
@end deffn
bit-set*!
@c snarfed from unif.c:2006
@deffn {Scheme Procedure} bit-set*! v kv obj
@deffnx {C Function} scm_bit_set_star_x (v, kv, obj)
Set entries of bit vector @var{v} to @var{obj}, with @var{kv}
selecting the entries to change. The return value is
unspecified.
If @var{kv} is a bit vector, then those entries where it has
@code{#t} are the ones in @var{v} which are set to @var{obj}.
@var{kv} and @var{v} must be the same length. When @var{obj}
is @code{#t} it's like @var{kv} is OR'ed into @var{v}. Or when
@var{obj} is @code{#f} it can be seen as an ANDNOT.
@example
(define bv #*01000010)
(bit-set*! bv #*10010001 #t)
bv
@result{} #*11010011
@end example
If @var{kv} is a u32vector, then its elements are
indices into @var{v} which are set to @var{obj}.
@example
(define bv #*01000010)
(bit-set*! bv #u32(5 2 7) #t)
bv
@result{} #*01100111
@end example
@end deffn
bit-count*
@c snarfed from unif.c:2109
@deffn {Scheme Procedure} bit-count* v kv obj
@deffnx {C Function} scm_bit_count_star (v, kv, obj)
Return a count of how many entries in bit vector @var{v} are
equal to @var{obj}, with @var{kv} selecting the entries to
consider.
If @var{kv} is a bit vector, then those entries where it has
@code{#t} are the ones in @var{v} which are considered.
@var{kv} and @var{v} must be the same length.
If @var{kv} is a u32vector, then it contains
the indexes in @var{v} to consider.
For example,
@example
(bit-count* #*01110111 #*11001101 #t) @result{} 3
(bit-count* #*01110111 #u32(7 0 4) #f) @result{} 2
@end example
@end deffn
bit-invert!
@c snarfed from unif.c:2196
@deffn {Scheme Procedure} bit-invert! v
@deffnx {C Function} scm_bit_invert_x (v)
Modify the bit vector @var{v} by replacing each element with
its negation.
@end deffn
array->list
@c snarfed from unif.c:2303
@deffn {Scheme Procedure} array->list v
@deffnx {C Function} scm_array_to_list (v)
Return a list consisting of all the elements, in order, of
@var{array}.
@end deffn
list->typed-array
@c snarfed from unif.c:2332
@deffn {Scheme Procedure} list->typed-array type shape lst
@deffnx {C Function} scm_list_to_typed_array (type, shape, lst)
Return an array of the type @var{type}
with elements the same as those of @var{lst}.
The argument @var{shape} determines the number of dimensions
of the array and their shape. It is either an exact integer,
giving the
number of dimensions directly, or a list whose length
specifies the number of dimensions and each element specified
the lower and optionally the upper bound of the corresponding
dimension.
When the element is list of two elements, these elements
give the lower and upper bounds. When it is an exact
integer, it gives only the lower bound.
@end deffn
list->array
@c snarfed from unif.c:2390
@deffn {Scheme Procedure} list->array ndim lst
@deffnx {C Function} scm_list_to_array (ndim, lst)
Return an array with elements the same as those of @var{lst}.
@end deffn
list->uniform-array
@c snarfed from unif.c:2440
@deffn {Scheme Procedure} list->uniform-array ndim prot lst
@deffnx {C Function} scm_list_to_uniform_array (ndim, prot, lst)
Return a uniform array of the type indicated by prototype
@var{prot} with elements the same as those of @var{lst}.
Elements must be of the appropriate type, no coercions are
done.
The argument @var{ndim} determines the number of dimensions
of the array. It is either an exact integer, giving the
number directly, or a list of exact integers, whose length
specifies the number of dimensions and each element is the
lower index bound of its dimension.
@end deffn
array-type
@c snarfed from unif.c:2789
@deffn {Scheme Procedure} array-type ra
@deffnx {C Function} scm_array_type (ra)
@end deffn
array-prototype
@c snarfed from unif.c:2809
@deffn {Scheme Procedure} array-prototype ra
@deffnx {C Function} scm_array_prototype (ra)
Return an object that would produce an array of the same type
as @var{array}, if used as the @var{prototype} for
@code{make-uniform-array}.
@end deffn
dynamic-link
@c snarfed from dynl.c:149
@deffn {Scheme Procedure} dynamic-link filename
@deffnx {C Function} scm_dynamic_link (filename)
Find the shared object (shared library) denoted by
@var{filename} and link it into the running Guile
application. The returned
scheme object is a ``handle'' for the library which can
be passed to @code{dynamic-func}, @code{dynamic-call} etc.
Searching for object files is system dependent. Normally,
if @var{filename} does have an explicit directory it will
be searched for in locations
such as @file{/usr/lib} and @file{/usr/local/lib}.
@end deffn
dynamic-object?
@c snarfed from dynl.c:168
@deffn {Scheme Procedure} dynamic-object? obj
@deffnx {C Function} scm_dynamic_object_p (obj)
Return @code{#t} if @var{obj} is a dynamic object handle,
or @code{#f} otherwise.
@end deffn
dynamic-unlink
@c snarfed from dynl.c:182
@deffn {Scheme Procedure} dynamic-unlink dobj
@deffnx {C Function} scm_dynamic_unlink (dobj)
Unlink a dynamic object from the application, if possible. The
object must have been linked by @code{dynamic-link}, with
@var{dobj} the corresponding handle. After this procedure
is called, the handle can no longer be used to access the
object.
@end deffn
dynamic-func
@c snarfed from dynl.c:207
@deffn {Scheme Procedure} dynamic-func name dobj
@deffnx {C Function} scm_dynamic_func (name, dobj)
Return a ``handle'' for the function @var{name} in the
shared object referred to by @var{dobj}. The handle
can be passed to @code{dynamic-call} to actually
call the function.
Regardless whether your C compiler prepends an underscore
@samp{_} to the global names in a program, you should
@strong{not} include this underscore in @var{name}
since it will be added automatically when necessary.
@end deffn
dynamic-call
@c snarfed from dynl.c:253
@deffn {Scheme Procedure} dynamic-call func dobj
@deffnx {C Function} scm_dynamic_call (func, dobj)
Call a C function in a dynamic object. Two styles of
invocation are supported:
@itemize @bullet
@item @var{func} can be a function handle returned by
@code{dynamic-func}. In this case @var{dobj} is
ignored
@item @var{func} can be a string with the name of the
function to call, with @var{dobj} the handle of the
dynamic object in which to find the function.
This is equivalent to
@smallexample
(dynamic-call (dynamic-func @var{func} @var{dobj}) #f)
@end smallexample
@end itemize
In either case, the function is passed no arguments
and its return value is ignored.
@end deffn
dynamic-args-call
@c snarfed from dynl.c:285
@deffn {Scheme Procedure} dynamic-args-call func dobj args
@deffnx {C Function} scm_dynamic_args_call (func, dobj, args)
Call the C function indicated by @var{func} and @var{dobj},
just like @code{dynamic-call}, but pass it some arguments and
return its return value. The C function is expected to take
two arguments and return an @code{int}, just like @code{main}:
@smallexample
int c_func (int argc, char **argv);
@end smallexample
The parameter @var{args} must be a list of strings and is
converted into an array of @code{char *}. The array is passed
in @var{argv} and its size in @var{argc}. The return value is
converted to a Scheme number and returned from the call to
@code{dynamic-args-call}.
@end deffn
chown
@c snarfed from filesys.c:224
@deffn {Scheme Procedure} chown object owner group
@deffnx {C Function} scm_chown (object, owner, group)
Change the ownership and group of the file referred to by @var{object} to
the integer values @var{owner} and @var{group}. @var{object} can be
a string containing a file name or, if the platform
supports fchown, a port or integer file descriptor
which is open on the file. The return value
is unspecified.
If @var{object} is a symbolic link, either the
ownership of the link or the ownership of the referenced file will be
changed depending on the operating system (lchown is
unsupported at present). If @var{owner} or @var{group} is specified
as @code{-1}, then that ID is not changed.
@end deffn
chmod
@c snarfed from filesys.c:262
@deffn {Scheme Procedure} chmod object mode
@deffnx {C Function} scm_chmod (object, mode)
Changes the permissions of the file referred to by @var{obj}.
@var{obj} can be a string containing a file name or a port or integer file
descriptor which is open on a file (in which case @code{fchmod} is used
as the underlying system call).
@var{mode} specifies
the new permissions as a decimal number, e.g., @code{(chmod "foo" #o755)}.
The return value is unspecified.
@end deffn
umask
@c snarfed from filesys.c:294
@deffn {Scheme Procedure} umask [mode]
@deffnx {C Function} scm_umask (mode)
If @var{mode} is omitted, returns a decimal number representing the current
file creation mask. Otherwise the file creation mask is set to
@var{mode} and the previous value is returned.
E.g., @code{(umask #o022)} sets the mask to octal 22, decimal 18.
@end deffn
open-fdes
@c snarfed from filesys.c:316
@deffn {Scheme Procedure} open-fdes path flags [mode]
@deffnx {C Function} scm_open_fdes (path, flags, mode)
Similar to @code{open} but return a file descriptor instead of
a port.
@end deffn
open
@c snarfed from filesys.c:357
@deffn {Scheme Procedure} open path flags [mode]
@deffnx {C Function} scm_open (path, flags, mode)
Open the file named by @var{path} for reading and/or writing.
@var{flags} is an integer specifying how the file should be opened.
@var{mode} is an integer specifying the permission bits of the file, if
it needs to be created, before the umask is applied. The default is 666
(Unix itself has no default).
@var{flags} can be constructed by combining variables using @code{logior}.
Basic flags are:
@defvar O_RDONLY
Open the file read-only.
@end defvar
@defvar O_WRONLY
Open the file write-only.
@end defvar
@defvar O_RDWR
Open the file read/write.
@end defvar
@defvar O_APPEND
Append to the file instead of truncating.
@end defvar
@defvar O_CREAT
Create the file if it does not already exist.
@end defvar
See the Unix documentation of the @code{open} system call
for additional flags.
@end deffn
close
@c snarfed from filesys.c:395
@deffn {Scheme Procedure} close fd_or_port
@deffnx {C Function} scm_close (fd_or_port)
Similar to close-port (@pxref{Closing, close-port}),
but also works on file descriptors. A side
effect of closing a file descriptor is that any ports using that file
descriptor are moved to a different file descriptor and have
their revealed counts set to zero.
@end deffn
close-fdes
@c snarfed from filesys.c:422
@deffn {Scheme Procedure} close-fdes fd
@deffnx {C Function} scm_close_fdes (fd)
A simple wrapper for the @code{close} system call.
Close file descriptor @var{fd}, which must be an integer.
Unlike close (@pxref{Ports and File Descriptors, close}),
the file descriptor will be closed even if a port is using it.
The return value is unspecified.
@end deffn
stat
@c snarfed from filesys.c:624
@deffn {Scheme Procedure} stat object
@deffnx {C Function} scm_stat (object)
Return an object containing various information about the file
determined by @var{obj}. @var{obj} can be a string containing
a file name or a port or integer file descriptor which is open
on a file (in which case @code{fstat} is used as the underlying
system call).
The object returned by @code{stat} can be passed as a single
parameter to the following procedures, all of which return
integers:
@table @code
@item stat:dev
The device containing the file.
@item stat:ino
The file serial number, which distinguishes this file from all
other files on the same device.
@item stat:mode
The mode of the file. This includes file type information and
the file permission bits. See @code{stat:type} and
@code{stat:perms} below.
@item stat:nlink
The number of hard links to the file.
@item stat:uid
The user ID of the file's owner.
@item stat:gid
The group ID of the file.
@item stat:rdev
Device ID; this entry is defined only for character or block
special files.
@item stat:size
The size of a regular file in bytes.
@item stat:atime
The last access time for the file.
@item stat:mtime
The last modification time for the file.
@item stat:ctime
The last modification time for the attributes of the file.
@item stat:blksize
The optimal block size for reading or writing the file, in
bytes.
@item stat:blocks
The amount of disk space that the file occupies measured in
units of 512 byte blocks.
@end table
In addition, the following procedures return the information
from stat:mode in a more convenient form:
@table @code
@item stat:type
A symbol representing the type of file. Possible values are
regular, directory, symlink, block-special, char-special, fifo,
socket and unknown
@item stat:perms
An integer representing the access permission bits.
@end table
@end deffn
link
@c snarfed from filesys.c:686
@deffn {Scheme Procedure} link oldpath newpath
@deffnx {C Function} scm_link (oldpath, newpath)
Creates a new name @var{newpath} in the file system for the
file named by @var{oldpath}. If @var{oldpath} is a symbolic
link, the link may or may not be followed depending on the
system.
@end deffn
rename-file
@c snarfed from filesys.c:724
@deffn {Scheme Procedure} rename-file oldname newname
@deffnx {C Function} scm_rename (oldname, newname)
Renames the file specified by @var{oldname} to @var{newname}.
The return value is unspecified.
@end deffn
delete-file
@c snarfed from filesys.c:741
@deffn {Scheme Procedure} delete-file str
@deffnx {C Function} scm_delete_file (str)
Deletes (or "unlinks") the file specified by @var{path}.
@end deffn
mkdir
@c snarfed from filesys.c:758
@deffn {Scheme Procedure} mkdir path [mode]
@deffnx {C Function} scm_mkdir (path, mode)
Create a new directory named by @var{path}. If @var{mode} is omitted
then the permissions of the directory file are set using the current
umask. Otherwise they are set to the decimal value specified with
@var{mode}. The return value is unspecified.
@end deffn
rmdir
@c snarfed from filesys.c:785
@deffn {Scheme Procedure} rmdir path
@deffnx {C Function} scm_rmdir (path)
Remove the existing directory named by @var{path}. The directory must
be empty for this to succeed. The return value is unspecified.
@end deffn
directory-stream?
@c snarfed from filesys.c:809
@deffn {Scheme Procedure} directory-stream? obj
@deffnx {C Function} scm_directory_stream_p (obj)
Return a boolean indicating whether @var{object} is a directory
stream as returned by @code{opendir}.
@end deffn
opendir
@c snarfed from filesys.c:820
@deffn {Scheme Procedure} opendir dirname
@deffnx {C Function} scm_opendir (dirname)
Open the directory specified by @var{path} and return a directory
stream.
@end deffn
readdir
@c snarfed from filesys.c:841
@deffn {Scheme Procedure} readdir port
@deffnx {C Function} scm_readdir (port)
Return (as a string) the next directory entry from the directory stream
@var{stream}. If there is no remaining entry to be read then the
end of file object is returned.
@end deffn
rewinddir
@c snarfed from filesys.c:880
@deffn {Scheme Procedure} rewinddir port
@deffnx {C Function} scm_rewinddir (port)
Reset the directory port @var{stream} so that the next call to
@code{readdir} will return the first directory entry.
@end deffn
closedir
@c snarfed from filesys.c:897
@deffn {Scheme Procedure} closedir port
@deffnx {C Function} scm_closedir (port)
Close the directory stream @var{stream}.
The return value is unspecified.
@end deffn
chdir
@c snarfed from filesys.c:947
@deffn {Scheme Procedure} chdir str
@deffnx {C Function} scm_chdir (str)
Change the current working directory to @var{path}.
The return value is unspecified.
@end deffn
getcwd
@c snarfed from filesys.c:962
@deffn {Scheme Procedure} getcwd
@deffnx {C Function} scm_getcwd ()
Return the name of the current working directory.
@end deffn
select
@c snarfed from filesys.c:1164
@deffn {Scheme Procedure} select reads writes excepts [secs [usecs]]
@deffnx {C Function} scm_select (reads, writes, excepts, secs, usecs)
This procedure has a variety of uses: waiting for the ability
to provide input, accept output, or the existence of
exceptional conditions on a collection of ports or file
descriptors, or waiting for a timeout to occur.
It also returns if interrupted by a signal.
@var{reads}, @var{writes} and @var{excepts} can be lists or
vectors, with each member a port or a file descriptor.
The value returned is a list of three corresponding
lists or vectors containing only the members which meet the
specified requirement. The ability of port buffers to
provide input or accept output is taken into account.
Ordering of the input lists or vectors is not preserved.
The optional arguments @var{secs} and @var{usecs} specify the
timeout. Either @var{secs} can be specified alone, as
either an integer or a real number, or both @var{secs} and
@var{usecs} can be specified as integers, in which case
@var{usecs} is an additional timeout expressed in
microseconds. If @var{secs} is omitted or is @code{#f} then
select will wait for as long as it takes for one of the other
conditions to be satisfied.
The scsh version of @code{select} differs as follows:
Only vectors are accepted for the first three arguments.
The @var{usecs} argument is not supported.
Multiple values are returned instead of a list.
Duplicates in the input vectors appear only once in output.
An additional @code{select!} interface is provided.
@end deffn
fcntl
@c snarfed from filesys.c:1302
@deffn {Scheme Procedure} fcntl object cmd [value]
@deffnx {C Function} scm_fcntl (object, cmd, value)
Apply @var{command} to the specified file descriptor or the underlying
file descriptor of the specified port. @var{value} is an optional
integer argument.
Values for @var{command} are:
@table @code
@item F_DUPFD
Duplicate a file descriptor
@item F_GETFD
Get flags associated with the file descriptor.
@item F_SETFD
Set flags associated with the file descriptor to @var{value}.
@item F_GETFL
Get flags associated with the open file.
@item F_SETFL
Set flags associated with the open file to @var{value}
@item F_GETOWN
Get the process ID of a socket's owner, for @code{SIGIO} signals.
@item F_SETOWN
Set the process that owns a socket to @var{value}, for @code{SIGIO} signals.
@item FD_CLOEXEC
The value used to indicate the "close on exec" flag with @code{F_GETFL} or
@code{F_SETFL}.
@end table
@end deffn
fsync
@c snarfed from filesys.c:1334
@deffn {Scheme Procedure} fsync object
@deffnx {C Function} scm_fsync (object)
Copies any unwritten data for the specified output file descriptor to disk.
If @var{port/fd} is a port, its buffer is flushed before the underlying
file descriptor is fsync'd.
The return value is unspecified.
@end deffn
symlink
@c snarfed from filesys.c:1359
@deffn {Scheme Procedure} symlink oldpath newpath
@deffnx {C Function} scm_symlink (oldpath, newpath)
Create a symbolic link named @var{path-to} with the value (i.e., pointing to)
@var{path-from}. The return value is unspecified.
@end deffn
readlink
@c snarfed from filesys.c:1378
@deffn {Scheme Procedure} readlink path
@deffnx {C Function} scm_readlink (path)
Return the value of the symbolic link named by @var{path} (a
string), i.e., the file that the link points to.
@end deffn
lstat
@c snarfed from filesys.c:1420
@deffn {Scheme Procedure} lstat str
@deffnx {C Function} scm_lstat (str)
Similar to @code{stat}, but does not follow symbolic links, i.e.,
it will return information about a symbolic link itself, not the
file it points to. @var{path} must be a string.
@end deffn
copy-file
@c snarfed from filesys.c:1443
@deffn {Scheme Procedure} copy-file oldfile newfile
@deffnx {C Function} scm_copy_file (oldfile, newfile)
Copy the file specified by @var{path-from} to @var{path-to}.
The return value is unspecified.
@end deffn
dirname
@c snarfed from filesys.c:1506
@deffn {Scheme Procedure} dirname filename
@deffnx {C Function} scm_dirname (filename)
Return the directory name component of the file name
@var{filename}. If @var{filename} does not contain a directory
component, @code{.} is returned.
@end deffn
basename
@c snarfed from filesys.c:1549
@deffn {Scheme Procedure} basename filename [suffix]
@deffnx {C Function} scm_basename (filename, suffix)
Return the base name of the file name @var{filename}. The
base name is the file name without any directory components.
If @var{suffix} is provided, and is equal to the end of
@var{basename}, it is removed also.
@end deffn
pipe
@c snarfed from posix.c:233
@deffn {Scheme Procedure} pipe
@deffnx {C Function} scm_pipe ()
Return a newly created pipe: a pair of ports which are linked
together on the local machine. The @emph{car} is the input
port and the @emph{cdr} is the output port. Data written (and
flushed) to the output port can be read from the input port.
Pipes are commonly used for communication with a newly forked
child process. The need to flush the output port can be
avoided by making it unbuffered using @code{setvbuf}.
Writes occur atomically provided the size of the data in bytes
is not greater than the value of @code{PIPE_BUF}. Note that
the output port is likely to block if too much data (typically
equal to @code{PIPE_BUF}) has been written but not yet read
from the input port.
@end deffn
getgroups
@c snarfed from posix.c:254
@deffn {Scheme Procedure} getgroups
@deffnx {C Function} scm_getgroups ()
Return a vector of integers representing the current
supplementary group IDs.
@end deffn
setgroups
@c snarfed from posix.c:287
@deffn {Scheme Procedure} setgroups group_vec
@deffnx {C Function} scm_setgroups (group_vec)
Set the current set of supplementary group IDs to the integers
in the given vector @var{vec}. The return value is
unspecified.
Generally only the superuser can set the process group IDs.
@end deffn
getpw
@c snarfed from posix.c:336
@deffn {Scheme Procedure} getpw [user]
@deffnx {C Function} scm_getpwuid (user)
Look up an entry in the user database. @var{obj} can be an integer,
a string, or omitted, giving the behaviour of getpwuid, getpwnam
or getpwent respectively.
@end deffn
setpw
@c snarfed from posix.c:386
@deffn {Scheme Procedure} setpw [arg]
@deffnx {C Function} scm_setpwent (arg)
If called with a true argument, initialize or reset the password data
stream. Otherwise, close the stream. The @code{setpwent} and
@code{endpwent} procedures are implemented on top of this.
@end deffn
getgr
@c snarfed from posix.c:405
@deffn {Scheme Procedure} getgr [name]
@deffnx {C Function} scm_getgrgid (name)
Look up an entry in the group database. @var{obj} can be an integer,
a string, or omitted, giving the behaviour of getgrgid, getgrnam
or getgrent respectively.
@end deffn
setgr
@c snarfed from posix.c:441
@deffn {Scheme Procedure} setgr [arg]
@deffnx {C Function} scm_setgrent (arg)
If called with a true argument, initialize or reset the group data
stream. Otherwise, close the stream. The @code{setgrent} and
@code{endgrent} procedures are implemented on top of this.
@end deffn
kill
@c snarfed from posix.c:477
@deffn {Scheme Procedure} kill pid sig
@deffnx {C Function} scm_kill (pid, sig)
Sends a signal to the specified process or group of processes.
@var{pid} specifies the processes to which the signal is sent:
@table @r
@item @var{pid} greater than 0
The process whose identifier is @var{pid}.
@item @var{pid} equal to 0
All processes in the current process group.
@item @var{pid} less than -1
The process group whose identifier is -@var{pid}
@item @var{pid} equal to -1
If the process is privileged, all processes except for some special
system processes. Otherwise, all processes with the current effective
user ID.
@end table
@var{sig} should be specified using a variable corresponding to
the Unix symbolic name, e.g.,
@defvar SIGHUP
Hang-up signal.
@end defvar
@defvar SIGINT
Interrupt signal.
@end defvar
@end deffn
waitpid
@c snarfed from posix.c:528
@deffn {Scheme Procedure} waitpid pid [options]
@deffnx {C Function} scm_waitpid (pid, options)
This procedure collects status information from a child process which
has terminated or (optionally) stopped. Normally it will
suspend the calling process until this can be done. If more than one
child process is eligible then one will be chosen by the operating system.
The value of @var{pid} determines the behaviour:
@table @r
@item @var{pid} greater than 0
Request status information from the specified child process.
@item @var{pid} equal to -1 or WAIT_ANY
Request status information for any child process.
@item @var{pid} equal to 0 or WAIT_MYPGRP
Request status information for any child process in the current process
group.
@item @var{pid} less than -1
Request status information for any child process whose process group ID
is -@var{PID}.
@end table
The @var{options} argument, if supplied, should be the bitwise OR of the
values of zero or more of the following variables:
@defvar WNOHANG
Return immediately even if there are no child processes to be collected.
@end defvar
@defvar WUNTRACED
Report status information for stopped processes as well as terminated
processes.
@end defvar
The return value is a pair containing:
@enumerate
@item
The process ID of the child process, or 0 if @code{WNOHANG} was
specified and no process was collected.
@item
The integer status value.
@end enumerate
@end deffn
status:exit-val
@c snarfed from posix.c:554
@deffn {Scheme Procedure} status:exit-val status
@deffnx {C Function} scm_status_exit_val (status)
Return the exit status value, as would be set if a process
ended normally through a call to @code{exit} or @code{_exit},
if any, otherwise @code{#f}.
@end deffn
status:term-sig
@c snarfed from posix.c:572
@deffn {Scheme Procedure} status:term-sig status
@deffnx {C Function} scm_status_term_sig (status)
Return the signal number which terminated the process, if any,
otherwise @code{#f}.
@end deffn
status:stop-sig
@c snarfed from posix.c:588
@deffn {Scheme Procedure} status:stop-sig status
@deffnx {C Function} scm_status_stop_sig (status)
Return the signal number which stopped the process, if any,
otherwise @code{#f}.
@end deffn
getppid
@c snarfed from posix.c:606
@deffn {Scheme Procedure} getppid
@deffnx {C Function} scm_getppid ()
Return an integer representing the process ID of the parent
process.
@end deffn
getuid
@c snarfed from posix.c:618
@deffn {Scheme Procedure} getuid
@deffnx {C Function} scm_getuid ()
Return an integer representing the current real user ID.
@end deffn
getgid
@c snarfed from posix.c:629
@deffn {Scheme Procedure} getgid
@deffnx {C Function} scm_getgid ()
Return an integer representing the current real group ID.
@end deffn
geteuid
@c snarfed from posix.c:643
@deffn {Scheme Procedure} geteuid
@deffnx {C Function} scm_geteuid ()
Return an integer representing the current effective user ID.
If the system does not support effective IDs, then the real ID
is returned. @code{(provided? 'EIDs)} reports whether the
system supports effective IDs.
@end deffn
getegid
@c snarfed from posix.c:660
@deffn {Scheme Procedure} getegid
@deffnx {C Function} scm_getegid ()
Return an integer representing the current effective group ID.
If the system does not support effective IDs, then the real ID
is returned. @code{(provided? 'EIDs)} reports whether the
system supports effective IDs.
@end deffn
setuid
@c snarfed from posix.c:676
@deffn {Scheme Procedure} setuid id
@deffnx {C Function} scm_setuid (id)
Sets both the real and effective user IDs to the integer @var{id}, provided
the process has appropriate privileges.
The return value is unspecified.
@end deffn
setgid
@c snarfed from posix.c:689
@deffn {Scheme Procedure} setgid id
@deffnx {C Function} scm_setgid (id)
Sets both the real and effective group IDs to the integer @var{id}, provided
the process has appropriate privileges.
The return value is unspecified.
@end deffn
seteuid
@c snarfed from posix.c:704
@deffn {Scheme Procedure} seteuid id
@deffnx {C Function} scm_seteuid (id)
Sets the effective user ID to the integer @var{id}, provided the process
has appropriate privileges. If effective IDs are not supported, the
real ID is set instead -- @code{(provided? 'EIDs)} reports whether the
system supports effective IDs.
The return value is unspecified.
@end deffn
setegid
@c snarfed from posix.c:729
@deffn {Scheme Procedure} setegid id
@deffnx {C Function} scm_setegid (id)
Sets the effective group ID to the integer @var{id}, provided the process
has appropriate privileges. If effective IDs are not supported, the
real ID is set instead -- @code{(provided? 'EIDs)} reports whether the
system supports effective IDs.
The return value is unspecified.
@end deffn
getpgrp
@c snarfed from posix.c:752
@deffn {Scheme Procedure} getpgrp
@deffnx {C Function} scm_getpgrp ()
Return an integer representing the current process group ID.
This is the POSIX definition, not BSD.
@end deffn
setpgid
@c snarfed from posix.c:770
@deffn {Scheme Procedure} setpgid pid pgid
@deffnx {C Function} scm_setpgid (pid, pgid)
Move the process @var{pid} into the process group @var{pgid}. @var{pid} or
@var{pgid} must be integers: they can be zero to indicate the ID of the
current process.
Fails on systems that do not support job control.
The return value is unspecified.
@end deffn
setsid
@c snarfed from posix.c:787
@deffn {Scheme Procedure} setsid
@deffnx {C Function} scm_setsid ()
Creates a new session. The current process becomes the session leader
and is put in a new process group. The process will be detached
from its controlling terminal if it has one.
The return value is an integer representing the new process group ID.
@end deffn
ttyname
@c snarfed from posix.c:811
@deffn {Scheme Procedure} ttyname port
@deffnx {C Function} scm_ttyname (port)
Return a string with the name of the serial terminal device
underlying @var{port}.
@end deffn
ctermid
@c snarfed from posix.c:850
@deffn {Scheme Procedure} ctermid
@deffnx {C Function} scm_ctermid ()
Return a string containing the file name of the controlling
terminal for the current process.
@end deffn
tcgetpgrp
@c snarfed from posix.c:874
@deffn {Scheme Procedure} tcgetpgrp port
@deffnx {C Function} scm_tcgetpgrp (port)
Return the process group ID of the foreground process group
associated with the terminal open on the file descriptor
underlying @var{port}.
If there is no foreground process group, the return value is a
number greater than 1 that does not match the process group ID
of any existing process group. This can happen if all of the
processes in the job that was formerly the foreground job have
terminated, and no other job has yet been moved into the
foreground.
@end deffn
tcsetpgrp
@c snarfed from posix.c:898
@deffn {Scheme Procedure} tcsetpgrp port pgid
@deffnx {C Function} scm_tcsetpgrp (port, pgid)
Set the foreground process group ID for the terminal used by the file
descriptor underlying @var{port} to the integer @var{pgid}.
The calling process
must be a member of the same session as @var{pgid} and must have the same
controlling terminal. The return value is unspecified.
@end deffn
execl
@c snarfed from posix.c:930
@deffn {Scheme Procedure} execl filename . args
@deffnx {C Function} scm_execl (filename, args)
Executes the file named by @var{path} as a new process image.
The remaining arguments are supplied to the process; from a C program
they are accessible as the @code{argv} argument to @code{main}.
Conventionally the first @var{arg} is the same as @var{path}.
All arguments must be strings.
If @var{arg} is missing, @var{path} is executed with a null
argument list, which may have system-dependent side-effects.
This procedure is currently implemented using the @code{execv} system
call, but we call it @code{execl} because of its Scheme calling interface.
@end deffn
execlp
@c snarfed from posix.c:961
@deffn {Scheme Procedure} execlp filename . args
@deffnx {C Function} scm_execlp (filename, args)
Similar to @code{execl}, however if
@var{filename} does not contain a slash
then the file to execute will be located by searching the
directories listed in the @code{PATH} environment variable.
This procedure is currently implemented using the @code{execvp} system
call, but we call it @code{execlp} because of its Scheme calling interface.
@end deffn
execle
@c snarfed from posix.c:995
@deffn {Scheme Procedure} execle filename env . args
@deffnx {C Function} scm_execle (filename, env, args)
Similar to @code{execl}, but the environment of the new process is
specified by @var{env}, which must be a list of strings as returned by the
@code{environ} procedure.
This procedure is currently implemented using the @code{execve} system
call, but we call it @code{execle} because of its Scheme calling interface.
@end deffn
primitive-fork
@c snarfed from posix.c:1031
@deffn {Scheme Procedure} primitive-fork
@deffnx {C Function} scm_fork ()
Creates a new "child" process by duplicating the current "parent" process.
In the child the return value is 0. In the parent the return value is
the integer process ID of the child.
This procedure has been renamed from @code{fork} to avoid a naming conflict
with the scsh fork.
@end deffn
uname
@c snarfed from posix.c:1051
@deffn {Scheme Procedure} uname
@deffnx {C Function} scm_uname ()
Return an object with some information about the computer
system the program is running on.
@end deffn
environ
@c snarfed from posix.c:1080
@deffn {Scheme Procedure} environ [env]
@deffnx {C Function} scm_environ (env)
If @var{env} is omitted, return the current environment (in the
Unix sense) as a list of strings. Otherwise set the current
environment, which is also the default environment for child
processes, to the supplied list of strings. Each member of
@var{env} should be of the form @code{NAME=VALUE} and values of
@code{NAME} should not be duplicated. If @var{env} is supplied
then the return value is unspecified.
@end deffn
tmpnam
@c snarfed from posix.c:1113
@deffn {Scheme Procedure} tmpnam
@deffnx {C Function} scm_tmpnam ()
Return a name in the file system that does not match any
existing file. However there is no guarantee that another
process will not create the file after @code{tmpnam} is called.
Care should be taken if opening the file, e.g., use the
@code{O_EXCL} open flag or use @code{mkstemp!} instead.
@end deffn
mkstemp!
@c snarfed from posix.c:1144
@deffn {Scheme Procedure} mkstemp! tmpl
@deffnx {C Function} scm_mkstemp (tmpl)
Create a new unique file in the file system and returns a new
buffered port open for reading and writing to the file.
@var{tmpl} is a string specifying where the file should be
created: it must end with @samp{XXXXXX} and will be changed in
place to return the name of the temporary file.
The file is created with mode @code{0600}, which means read and
write for the owner only. @code{chmod} can be used to change
this.
@end deffn
utime
@c snarfed from posix.c:1179
@deffn {Scheme Procedure} utime pathname [actime [modtime]]
@deffnx {C Function} scm_utime (pathname, actime, modtime)
@code{utime} sets the access and modification times for the
file named by @var{path}. If @var{actime} or @var{modtime} is
not supplied, then the current time is used. @var{actime} and
@var{modtime} must be integer time values as returned by the
@code{current-time} procedure.
@lisp
(utime "foo" (- (current-time) 3600))
@end lisp
will set the access time to one hour in the past and the
modification time to the current time.
@end deffn
access?
@c snarfed from posix.c:1244
@deffn {Scheme Procedure} access? path how
@deffnx {C Function} scm_access (path, how)
Test accessibility of a file under the real UID and GID of the
calling process. The return is @code{#t} if @var{path} exists
and the permissions requested by @var{how} are all allowed, or
@code{#f} if not.
@var{how} is an integer which is one of the following values,
or a bitwise-OR (@code{logior}) of multiple values.
@defvar R_OK
Test for read permission.
@end defvar
@defvar W_OK
Test for write permission.
@end defvar
@defvar X_OK
Test for execute permission.
@end defvar
@defvar F_OK
Test for existence of the file. This is implied by each of the
other tests, so there's no need to combine it with them.
@end defvar
It's important to note that @code{access?} does not simply
indicate what will happen on attempting to read or write a
file. In normal circumstances it does, but in a set-UID or
set-GID program it doesn't because @code{access?} tests the
real ID, whereas an open or execute attempt uses the effective
ID.
A program which will never run set-UID/GID can ignore the
difference between real and effective IDs, but for maximum
generality, especially in library functions, it's best not to
use @code{access?} to predict the result of an open or execute,
instead simply attempt that and catch any exception.
The main use for @code{access?} is to let a set-UID/GID program
determine what the invoking user would have been allowed to do,
without the greater (or perhaps lesser) privileges afforded by
the effective ID. For more on this, see ``Testing File
Access'' in The GNU C Library Reference Manual.
@end deffn
getpid
@c snarfed from posix.c:1257
@deffn {Scheme Procedure} getpid
@deffnx {C Function} scm_getpid ()
Return an integer representing the current process ID.
@end deffn
putenv
@c snarfed from posix.c:1274
@deffn {Scheme Procedure} putenv str
@deffnx {C Function} scm_putenv (str)
Modifies the environment of the current process, which is
also the default environment inherited by child processes.
If @var{string} is of the form @code{NAME=VALUE} then it will be written
directly into the environment, replacing any existing environment string
with
name matching @code{NAME}. If @var{string} does not contain an equal
sign, then any existing string with name matching @var{string} will
be removed.
The return value is unspecified.
@end deffn
setlocale
@c snarfed from posix.c:1358
@deffn {Scheme Procedure} setlocale category [locale]
@deffnx {C Function} scm_setlocale (category, locale)
If @var{locale} is omitted, return the current value of the
specified locale category as a system-dependent string.
@var{category} should be specified using the values
@code{LC_COLLATE}, @code{LC_ALL} etc.
Otherwise the specified locale category is set to the string
@var{locale} and the new value is returned as a
system-dependent string. If @var{locale} is an empty string,
the locale will be set using environment variables.
@end deffn
mknod
@c snarfed from posix.c:1407
@deffn {Scheme Procedure} mknod path type perms dev
@deffnx {C Function} scm_mknod (path, type, perms, dev)
Creates a new special file, such as a file corresponding to a device.
@var{path} specifies the name of the file. @var{type} should
be one of the following symbols:
regular, directory, symlink, block-special, char-special,
fifo, or socket. @var{perms} (an integer) specifies the file permissions.
@var{dev} (an integer) specifies which device the special file refers
to. Its exact interpretation depends on the kind of special file
being created.
E.g.,
@lisp
(mknod "/dev/fd0" 'block-special #o660 (+ (* 2 256) 2))
@end lisp
The return value is unspecified.
@end deffn
nice
@c snarfed from posix.c:1453
@deffn {Scheme Procedure} nice incr
@deffnx {C Function} scm_nice (incr)
Increment the priority of the current process by @var{incr}. A higher
priority value means that the process runs less often.
The return value is unspecified.
@end deffn
sync
@c snarfed from posix.c:1471
@deffn {Scheme Procedure} sync
@deffnx {C Function} scm_sync ()
Flush the operating system disk buffers.
The return value is unspecified.
@end deffn
crypt
@c snarfed from posix.c:1502
@deffn {Scheme Procedure} crypt key salt
@deffnx {C Function} scm_crypt (key, salt)
Encrypt @var{key} using @var{salt} as the salt value to the
crypt(3) library call.
@end deffn
chroot
@c snarfed from posix.c:1531
@deffn {Scheme Procedure} chroot path
@deffnx {C Function} scm_chroot (path)
Change the root directory to that specified in @var{path}.
This directory will be used for path names beginning with
@file{/}. The root directory is inherited by all children
of the current process. Only the superuser may change the
root directory.
@end deffn
getlogin
@c snarfed from posix.c:1565
@deffn {Scheme Procedure} getlogin
@deffnx {C Function} scm_getlogin ()
Return a string containing the name of the user logged in on
the controlling terminal of the process, or @code{#f} if this
information cannot be obtained.
@end deffn
cuserid
@c snarfed from posix.c:1583
@deffn {Scheme Procedure} cuserid
@deffnx {C Function} scm_cuserid ()
Return a string containing a user name associated with the
effective user id of the process. Return @code{#f} if this
information cannot be obtained.
@end deffn
getpriority
@c snarfed from posix.c:1609
@deffn {Scheme Procedure} getpriority which who
@deffnx {C Function} scm_getpriority (which, who)
Return the scheduling priority of the process, process group
or user, as indicated by @var{which} and @var{who}. @var{which}
is one of the variables @code{PRIO_PROCESS}, @code{PRIO_PGRP}
or @code{PRIO_USER}, and @var{who} is interpreted relative to
@var{which} (a process identifier for @code{PRIO_PROCESS},
process group identifier for @code{PRIO_PGRP}, and a user
identifier for @code{PRIO_USER}. A zero value of @var{who}
denotes the current process, process group, or user. Return
the highest priority (lowest numerical value) of any of the
specified processes.
@end deffn
setpriority
@c snarfed from posix.c:1643
@deffn {Scheme Procedure} setpriority which who prio
@deffnx {C Function} scm_setpriority (which, who, prio)
Set the scheduling priority of the process, process group
or user, as indicated by @var{which} and @var{who}. @var{which}
is one of the variables @code{PRIO_PROCESS}, @code{PRIO_PGRP}
or @code{PRIO_USER}, and @var{who} is interpreted relative to
@var{which} (a process identifier for @code{PRIO_PROCESS},
process group identifier for @code{PRIO_PGRP}, and a user
identifier for @code{PRIO_USER}. A zero value of @var{who}
denotes the current process, process group, or user.
@var{prio} is a value in the range -20 and 20, the default
priority is 0; lower priorities cause more favorable
scheduling. Sets the priority of all of the specified
processes. Only the super-user may lower priorities.
The return value is not specified.
@end deffn
getpass
@c snarfed from posix.c:1668
@deffn {Scheme Procedure} getpass prompt
@deffnx {C Function} scm_getpass (prompt)
Display @var{prompt} to the standard error output and read
a password from @file{/dev/tty}. If this file is not
accessible, it reads from standard input. The password may be
up to 127 characters in length. Additional characters and the
terminating newline character are discarded. While reading
the password, echoing and the generation of signals by special
characters is disabled.
@end deffn
flock
@c snarfed from posix.c:1780
@deffn {Scheme Procedure} flock file operation
@deffnx {C Function} scm_flock (file, operation)
Apply or remove an advisory lock on an open file.
@var{operation} specifies the action to be done:
@defvar LOCK_SH
Shared lock. More than one process may hold a shared lock
for a given file at a given time.
@end defvar
@defvar LOCK_EX
Exclusive lock. Only one process may hold an exclusive lock
for a given file at a given time.
@end defvar
@defvar LOCK_UN
Unlock the file.
@end defvar
@defvar LOCK_NB
Don't block when locking. This is combined with one of the
other operations using @code{logior}. If @code{flock} would
block an @code{EWOULDBLOCK} error is thrown.
@end defvar
The return value is not specified. @var{file} may be an open
file descriptor or an open file descriptor port.
Note that @code{flock} does not lock files across NFS.
@end deffn
sethostname
@c snarfed from posix.c:1805
@deffn {Scheme Procedure} sethostname name
@deffnx {C Function} scm_sethostname (name)
Set the host name of the current processor to @var{name}. May
only be used by the superuser. The return value is not
specified.
@end deffn
gethostname
@c snarfed from posix.c:1823
@deffn {Scheme Procedure} gethostname
@deffnx {C Function} scm_gethostname ()
Return the host name of the current processor.
@end deffn
gethost
@c snarfed from net_db.c:134
@deffn {Scheme Procedure} gethost [host]
@deffnx {Scheme Procedure} gethostbyname hostname
@deffnx {Scheme Procedure} gethostbyaddr address
@deffnx {C Function} scm_gethost (host)
Look up a host by name or address, returning a host object. The
@code{gethost} procedure will accept either a string name or an integer
address; if given no arguments, it behaves like @code{gethostent} (see
below). If a name or address is supplied but the address can not be
found, an error will be thrown to one of the keys:
@code{host-not-found}, @code{try-again}, @code{no-recovery} or
@code{no-data}, corresponding to the equivalent @code{h_error} values.
Unusual conditions may result in errors thrown to the
@code{system-error} or @code{misc_error} keys.
@end deffn
getnet
@c snarfed from net_db.c:216
@deffn {Scheme Procedure} getnet [net]
@deffnx {Scheme Procedure} getnetbyname net-name
@deffnx {Scheme Procedure} getnetbyaddr net-number
@deffnx {C Function} scm_getnet (net)
Look up a network by name or net number in the network database. The
@var{net-name} argument must be a string, and the @var{net-number}
argument must be an integer. @code{getnet} will accept either type of
argument, behaving like @code{getnetent} (see below) if no arguments are
given.
@end deffn
getproto
@c snarfed from net_db.c:268
@deffn {Scheme Procedure} getproto [protocol]
@deffnx {Scheme Procedure} getprotobyname name
@deffnx {Scheme Procedure} getprotobynumber number
@deffnx {C Function} scm_getproto (protocol)
Look up a network protocol by name or by number. @code{getprotobyname}
takes a string argument, and @code{getprotobynumber} takes an integer
argument. @code{getproto} will accept either type, behaving like
@code{getprotoent} (see below) if no arguments are supplied.
@end deffn
getserv
@c snarfed from net_db.c:334
@deffn {Scheme Procedure} getserv [name [protocol]]
@deffnx {Scheme Procedure} getservbyname name protocol
@deffnx {Scheme Procedure} getservbyport port protocol
@deffnx {C Function} scm_getserv (name, protocol)
Look up a network service by name or by service number, and return a
network service object. The @var{protocol} argument specifies the name
of the desired protocol; if the protocol found in the network service
database does not match this name, a system error is signalled.
The @code{getserv} procedure will take either a service name or number
as its first argument; if given no arguments, it behaves like
@code{getservent} (see below).
@end deffn
sethost
@c snarfed from net_db.c:385
@deffn {Scheme Procedure} sethost [stayopen]
@deffnx {C Function} scm_sethost (stayopen)
If @var{stayopen} is omitted, this is equivalent to @code{endhostent}.
Otherwise it is equivalent to @code{sethostent stayopen}.
@end deffn
setnet
@c snarfed from net_db.c:401
@deffn {Scheme Procedure} setnet [stayopen]
@deffnx {C Function} scm_setnet (stayopen)
If @var{stayopen} is omitted, this is equivalent to @code{endnetent}.
Otherwise it is equivalent to @code{setnetent stayopen}.
@end deffn
setproto
@c snarfed from net_db.c:417
@deffn {Scheme Procedure} setproto [stayopen]
@deffnx {C Function} scm_setproto (stayopen)
If @var{stayopen} is omitted, this is equivalent to @code{endprotoent}.
Otherwise it is equivalent to @code{setprotoent stayopen}.
@end deffn
setserv
@c snarfed from net_db.c:433
@deffn {Scheme Procedure} setserv [stayopen]
@deffnx {C Function} scm_setserv (stayopen)
If @var{stayopen} is omitted, this is equivalent to @code{endservent}.
Otherwise it is equivalent to @code{setservent stayopen}.
@end deffn
htons
@c snarfed from socket.c:80
@deffn {Scheme Procedure} htons value
@deffnx {C Function} scm_htons (value)
Convert a 16 bit quantity from host to network byte ordering.
@var{value} is packed into 2 bytes, which are then converted
and returned as a new integer.
@end deffn
ntohs
@c snarfed from socket.c:91
@deffn {Scheme Procedure} ntohs value
@deffnx {C Function} scm_ntohs (value)
Convert a 16 bit quantity from network to host byte ordering.
@var{value} is packed into 2 bytes, which are then converted
and returned as a new integer.
@end deffn
htonl
@c snarfed from socket.c:102
@deffn {Scheme Procedure} htonl value
@deffnx {C Function} scm_htonl (value)
Convert a 32 bit quantity from host to network byte ordering.
@var{value} is packed into 4 bytes, which are then converted
and returned as a new integer.
@end deffn
ntohl
@c snarfed from socket.c:115
@deffn {Scheme Procedure} ntohl value
@deffnx {C Function} scm_ntohl (value)
Convert a 32 bit quantity from network to host byte ordering.
@var{value} is packed into 4 bytes, which are then converted
and returned as a new integer.
@end deffn
inet-aton
@c snarfed from socket.c:135
@deffn {Scheme Procedure} inet-aton address
@deffnx {C Function} scm_inet_aton (address)
Convert an IPv4 Internet address from printable string
(dotted decimal notation) to an integer. E.g.,
@lisp
(inet-aton "127.0.0.1") @result{} 2130706433
@end lisp
@end deffn
inet-ntoa
@c snarfed from socket.c:158
@deffn {Scheme Procedure} inet-ntoa inetid
@deffnx {C Function} scm_inet_ntoa (inetid)
Convert an IPv4 Internet address to a printable
(dotted decimal notation) string. E.g.,
@lisp
(inet-ntoa 2130706433) @result{} "127.0.0.1"
@end lisp
@end deffn
inet-netof
@c snarfed from socket.c:178
@deffn {Scheme Procedure} inet-netof address
@deffnx {C Function} scm_inet_netof (address)
Return the network number part of the given IPv4
Internet address. E.g.,
@lisp
(inet-netof 2130706433) @result{} 127
@end lisp
@end deffn
inet-lnaof
@c snarfed from socket.c:196
@deffn {Scheme Procedure} inet-lnaof address
@deffnx {C Function} scm_lnaof (address)
Return the local-address-with-network part of the given
IPv4 Internet address, using the obsolete class A/B/C system.
E.g.,
@lisp
(inet-lnaof 2130706433) @result{} 1
@end lisp
@end deffn
inet-makeaddr
@c snarfed from socket.c:214
@deffn {Scheme Procedure} inet-makeaddr net lna
@deffnx {C Function} scm_inet_makeaddr (net, lna)
Make an IPv4 Internet address by combining the network number
@var{net} with the local-address-within-network number
@var{lna}. E.g.,
@lisp
(inet-makeaddr 127 1) @result{} 2130706433
@end lisp
@end deffn
inet-pton
@c snarfed from socket.c:350
@deffn {Scheme Procedure} inet-pton family address
@deffnx {C Function} scm_inet_pton (family, address)
Convert a string containing a printable network address to
an integer address. Note that unlike the C version of this
function,
the result is an integer with normal host byte ordering.
@var{family} can be @code{AF_INET} or @code{AF_INET6}. E.g.,
@lisp
(inet-pton AF_INET "127.0.0.1") @result{} 2130706433
(inet-pton AF_INET6 "::1") @result{} 1
@end lisp
@end deffn
inet-ntop
@c snarfed from socket.c:388
@deffn {Scheme Procedure} inet-ntop family address
@deffnx {C Function} scm_inet_ntop (family, address)
Convert a network address into a printable string.
Note that unlike the C version of this function,
the input is an integer with normal host byte ordering.
@var{family} can be @code{AF_INET} or @code{AF_INET6}. E.g.,
@lisp
(inet-ntop AF_INET 2130706433) @result{} "127.0.0.1"
(inet-ntop AF_INET6 (- (expt 2 128) 1))
@result{} "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"
@end lisp
@end deffn
socket
@c snarfed from socket.c:430
@deffn {Scheme Procedure} socket family style proto
@deffnx {C Function} scm_socket (family, style, proto)
Return a new socket port of the type specified by @var{family},
@var{style} and @var{proto}. All three parameters are
integers. Supported values for @var{family} are
@code{AF_UNIX}, @code{AF_INET} and @code{AF_INET6}.
Typical values for @var{style} are @code{SOCK_STREAM},
@code{SOCK_DGRAM} and @code{SOCK_RAW}.
@var{proto} can be obtained from a protocol name using
@code{getprotobyname}. A value of zero specifies the default
protocol, which is usually right.
A single socket port cannot by used for communication until it
has been connected to another socket.
@end deffn
socketpair
@c snarfed from socket.c:451
@deffn {Scheme Procedure} socketpair family style proto
@deffnx {C Function} scm_socketpair (family, style, proto)
Return a pair of connected (but unnamed) socket ports of the
type specified by @var{family}, @var{style} and @var{proto}.
Many systems support only socket pairs of the @code{AF_UNIX}
family. Zero is likely to be the only meaningful value for
@var{proto}.
@end deffn
getsockopt
@c snarfed from socket.c:476
@deffn {Scheme Procedure} getsockopt sock level optname
@deffnx {C Function} scm_getsockopt (sock, level, optname)
Return the value of a particular socket option for the socket
port @var{sock}. @var{level} is an integer code for type of
option being requested, e.g., @code{SOL_SOCKET} for
socket-level options. @var{optname} is an integer code for the
option required and should be specified using one of the
symbols @code{SO_DEBUG}, @code{SO_REUSEADDR} etc.
The returned value is typically an integer but @code{SO_LINGER}
returns a pair of integers.
@end deffn
setsockopt
@c snarfed from socket.c:544
@deffn {Scheme Procedure} setsockopt sock level optname value
@deffnx {C Function} scm_setsockopt (sock, level, optname, value)
Set the value of a particular socket option for the socket
port @var{sock}. @var{level} is an integer code for type of option
being set, e.g., @code{SOL_SOCKET} for socket-level options.
@var{optname} is an
integer code for the option to set and should be specified using one of
the symbols @code{SO_DEBUG}, @code{SO_REUSEADDR} etc.
@var{value} is the value to which the option should be set. For
most options this must be an integer, but for @code{SO_LINGER} it must
be a pair.
The return value is unspecified.
@end deffn
shutdown
@c snarfed from socket.c:646
@deffn {Scheme Procedure} shutdown sock how
@deffnx {C Function} scm_shutdown (sock, how)
Sockets can be closed simply by using @code{close-port}. The
@code{shutdown} procedure allows reception or transmission on a
connection to be shut down individually, according to the parameter
@var{how}:
@table @asis
@item 0
Stop receiving data for this socket. If further data arrives, reject it.
@item 1
Stop trying to transmit data from this socket. Discard any
data waiting to be sent. Stop looking for acknowledgement of
data already sent; don't retransmit it if it is lost.
@item 2
Stop both reception and transmission.
@end table
The return value is unspecified.
@end deffn
connect
@c snarfed from socket.c:789
@deffn {Scheme Procedure} connect sock fam address . args
@deffnx {C Function} scm_connect (sock, fam, address, args)
Initiate a connection from a socket using a specified address
family to the address
specified by @var{address} and possibly @var{args}.
The format required for @var{address}
and @var{args} depends on the family of the socket.
For a socket of family @code{AF_UNIX},
only @var{address} is specified and must be a string with the
filename where the socket is to be created.
For a socket of family @code{AF_INET},
@var{address} must be an integer IPv4 host address and
@var{args} must be a single integer port number.
For a socket of family @code{AF_INET6},
@var{address} must be an integer IPv6 host address and
@var{args} may be up to three integers:
port [flowinfo] [scope_id],
where flowinfo and scope_id default to zero.
The return value is unspecified.
@end deffn
bind
@c snarfed from socket.c:848
@deffn {Scheme Procedure} bind sock fam address . args
@deffnx {C Function} scm_bind (sock, fam, address, args)
Assign an address to the socket port @var{sock}.
Generally this only needs to be done for server sockets,
so they know where to look for incoming connections. A socket
without an address will be assigned one automatically when it
starts communicating.
The format of @var{address} and @var{args} depends
on the family of the socket.
For a socket of family @code{AF_UNIX}, only @var{address}
is specified and must be a string with the filename where
the socket is to be created.
For a socket of family @code{AF_INET}, @var{address}
must be an integer IPv4 address and @var{args}
must be a single integer port number.
The values of the following variables can also be used for
@var{address}:
@defvar INADDR_ANY
Allow connections from any address.
@end defvar
@defvar INADDR_LOOPBACK
The address of the local host using the loopback device.
@end defvar
@defvar INADDR_BROADCAST
The broadcast address on the local network.
@end defvar
@defvar INADDR_NONE
No address.
@end defvar
For a socket of family @code{AF_INET6}, @var{address}
must be an integer IPv6 address and @var{args}
may be up to three integers:
port [flowinfo] [scope_id],
where flowinfo and scope_id default to zero.
The return value is unspecified.
@end deffn
listen
@c snarfed from socket.c:881
@deffn {Scheme Procedure} listen sock backlog
@deffnx {C Function} scm_listen (sock, backlog)
Enable @var{sock} to accept connection
requests. @var{backlog} is an integer specifying
the maximum length of the queue for pending connections.
If the queue fills, new clients will fail to connect until
the server calls @code{accept} to accept a connection from
the queue.
The return value is unspecified.
@end deffn
accept
@c snarfed from socket.c:993
@deffn {Scheme Procedure} accept sock
@deffnx {C Function} scm_accept (sock)
Accept a connection on a bound, listening socket.
If there
are no pending connections in the queue, wait until
one is available unless the non-blocking option has been
set on the socket.
The return value is a
pair in which the @emph{car} is a new socket port for the
connection and
the @emph{cdr} is an object with address information about the
client which initiated the connection.
@var{sock} does not become part of the
connection and will continue to accept new requests.
@end deffn
getsockname
@c snarfed from socket.c:1020
@deffn {Scheme Procedure} getsockname sock
@deffnx {C Function} scm_getsockname (sock)
Return the address of @var{sock}, in the same form as the
object returned by @code{accept}. On many systems the address
of a socket in the @code{AF_FILE} namespace cannot be read.
@end deffn
getpeername
@c snarfed from socket.c:1042
@deffn {Scheme Procedure} getpeername sock
@deffnx {C Function} scm_getpeername (sock)
Return the address that @var{sock}
is connected to, in the same form as the object returned by
@code{accept}. On many systems the address of a socket in the
@code{AF_FILE} namespace cannot be read.
@end deffn
recv!
@c snarfed from socket.c:1077
@deffn {Scheme Procedure} recv! sock buf [flags]
@deffnx {C Function} scm_recv (sock, buf, flags)
Receive data from a socket port.
@var{sock} must already
be bound to the address from which data is to be received.
@var{buf} is a string into which
the data will be written. The size of @var{buf} limits
the amount of
data which can be received: in the case of packet
protocols, if a packet larger than this limit is encountered
then some data
will be irrevocably lost.
The optional @var{flags} argument is a value or
bitwise OR of MSG_OOB, MSG_PEEK, MSG_DONTROUTE etc.
The value returned is the number of bytes read from the
socket.
Note that the data is read directly from the socket file
descriptor:
any unread buffered port data is ignored.
@end deffn
send
@c snarfed from socket.c:1120
@deffn {Scheme Procedure} send sock message [flags]
@deffnx {C Function} scm_send (sock, message, flags)
Transmit the string @var{message} on a socket port @var{sock}.
@var{sock} must already be bound to a destination address. The
value returned is the number of bytes transmitted --
it's possible for
this to be less than the length of @var{message}
if the socket is
set to be non-blocking. The optional @var{flags} argument
is a value or
bitwise OR of MSG_OOB, MSG_PEEK, MSG_DONTROUTE etc.
Note that the data is written directly to the socket
file descriptor:
any unflushed buffered port data is ignored.
@end deffn
recvfrom!
@c snarfed from socket.c:1171
@deffn {Scheme Procedure} recvfrom! sock str [flags [start [end]]]
@deffnx {C Function} scm_recvfrom (sock, str, flags, start, end)
Return data from the socket port @var{sock} and also
information about where the data was received from.
@var{sock} must already be bound to the address from which
data is to be received. @code{str}, is a string into which the
data will be written. The size of @var{str} limits the amount
of data which can be received: in the case of packet protocols,
if a packet larger than this limit is encountered then some
data will be irrevocably lost.
The optional @var{flags} argument is a value or bitwise OR of
@code{MSG_OOB}, @code{MSG_PEEK}, @code{MSG_DONTROUTE} etc.
The value returned is a pair: the @emph{car} is the number of
bytes read from the socket and the @emph{cdr} an address object
in the same form as returned by @code{accept}. The address
will given as @code{#f} if not available, as is usually the
case for stream sockets.
The @var{start} and @var{end} arguments specify a substring of
@var{str} to which the data should be written.
Note that the data is read directly from the socket file
descriptor: any unread buffered port data is ignored.
@end deffn
sendto
@c snarfed from socket.c:1236
@deffn {Scheme Procedure} sendto sock message fam address . args_and_flags
@deffnx {C Function} scm_sendto (sock, message, fam, address, args_and_flags)
Transmit the string @var{message} on the socket port
@var{sock}. The
destination address is specified using the @var{fam},
@var{address} and
@var{args_and_flags} arguments, in a similar way to the
@code{connect} procedure. @var{args_and_flags} contains
the usual connection arguments optionally followed by
a flags argument, which is a value or
bitwise OR of MSG_OOB, MSG_PEEK, MSG_DONTROUTE etc.
The value returned is the number of bytes transmitted --
it's possible for
this to be less than the length of @var{message} if the
socket is
set to be non-blocking.
Note that the data is written directly to the socket
file descriptor:
any unflushed buffered port data is ignored.
@end deffn
regexp?
@c snarfed from regex-posix.c:106
@deffn {Scheme Procedure} regexp? obj
@deffnx {C Function} scm_regexp_p (obj)
Return @code{#t} if @var{obj} is a compiled regular expression,
or @code{#f} otherwise.
@end deffn
make-regexp
@c snarfed from regex-posix.c:151
@deffn {Scheme Procedure} make-regexp pat . flags
@deffnx {C Function} scm_make_regexp (pat, flags)
Compile the regular expression described by @var{pat}, and
return the compiled regexp structure. If @var{pat} does not
describe a legal regular expression, @code{make-regexp} throws
a @code{regular-expression-syntax} error.
The @var{flags} arguments change the behavior of the compiled
regular expression. The following flags may be supplied:
@table @code
@item regexp/icase
Consider uppercase and lowercase letters to be the same when
matching.
@item regexp/newline
If a newline appears in the target string, then permit the
@samp{^} and @samp{$} operators to match immediately after or
immediately before the newline, respectively. Also, the
@samp{.} and @samp{[^...]} operators will never match a newline
character. The intent of this flag is to treat the target
string as a buffer containing many lines of text, and the
regular expression as a pattern that may match a single one of
those lines.
@item regexp/basic
Compile a basic (``obsolete'') regexp instead of the extended
(``modern'') regexps that are the default. Basic regexps do
not consider @samp{|}, @samp{+} or @samp{?} to be special
characters, and require the @samp{@{...@}} and @samp{(...)}
metacharacters to be backslash-escaped (@pxref{Backslash
Escapes}). There are several other differences between basic
and extended regular expressions, but these are the most
significant.
@item regexp/extended
Compile an extended regular expression rather than a basic
regexp. This is the default behavior; this flag will not
usually be needed. If a call to @code{make-regexp} includes
both @code{regexp/basic} and @code{regexp/extended} flags, the
one which comes last will override the earlier one.
@end table
@end deffn
regexp-exec
@c snarfed from regex-posix.c:217
@deffn {Scheme Procedure} regexp-exec rx str [start [flags]]
@deffnx {C Function} scm_regexp_exec (rx, str, start, flags)
Match the compiled regular expression @var{rx} against
@code{str}. If the optional integer @var{start} argument is
provided, begin matching from that position in the string.
Return a match structure describing the results of the match,
or @code{#f} if no match could be found.
The @var{flags} arguments change the matching behavior.
The following flags may be supplied:
@table @code
@item regexp/notbol
Operator @samp{^} always fails (unless @code{regexp/newline}
is used). Use this when the beginning of the string should
not be considered the beginning of a line.
@item regexp/noteol
Operator @samp{$} always fails (unless @code{regexp/newline}
is used). Use this when the end of the string should not be
considered the end of a line.
@end table
@end deffn
|