Add diclaimer of copyright to _osname() manual page.
[unix-history] / gnu / usr.bin / cvs / mkmodules / xxx
CommitLineData
95f8d34b
JH
1# 1 "/usr/src/gnu/cvs/mkmodules/mkmodules.c"
2
3
4
5
6
7
8
9
10
11
12
13
14
15# 1 "/usr/include/sys/syslimits.h" 1
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# 14 "/usr/src/gnu/cvs/mkmodules/mkmodules.c" 2
71
72# 1 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h" 1
73
74
75# 1 "/usr/src/gnu/cvs/mkmodules/../lib/system.h" 1
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95# 1 "/usr/include/sys/types.h" 1
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
134typedef unsigned char u_char;
135typedef unsigned short u_short;
136typedef unsigned int u_int;
137typedef unsigned long u_long;
138typedef unsigned short ushort;
139
140typedef char * caddr_t;
141typedef long daddr_t;
142typedef short dev_t;
143typedef u_long ino_t;
144typedef long off_t;
145typedef u_short nlink_t;
146typedef long swblk_t;
147typedef long segsz_t;
148typedef u_short uid_t;
149typedef u_short gid_t;
150typedef short pid_t;
151typedef u_short mode_t;
152typedef u_long fixpt_t;
153
154
155typedef struct _uquad { u_long val[2]; } u_quad;
156typedef struct _quad { long val[2]; } quad;
157typedef long * qaddr_t;
158
159
160
161
162
163
164# 1 "/usr/include/machine/ansi.h" 1
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# 69 "/usr/include/sys/types.h" 2
223
224
225# 1 "/usr/include/machine/types.h" 1
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
264typedef struct _physadr {
265 int r[1];
266} *physadr;
267
268typedef struct label_t {
269 int val[6];
270} label_t;
271
272typedef u_long vm_offset_t;
273typedef u_long vm_size_t;
274
275
276# 71 "/usr/include/sys/types.h" 2
277
278
279
280
281typedef unsigned long clock_t;
282
283
284
285
286typedef unsigned int size_t;
287
288
289
290
291typedef long time_t;
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308typedef long fd_mask;
309
310
311
312
313
314
315typedef struct fd_set {
316 fd_mask fds_bits[(((256 )+(( (sizeof(fd_mask) * 8 ) )-1))/( (sizeof(fd_mask) * 8 ) )) ];
317} fd_set;
318
319
320
321
322
323
324# 132 "/usr/include/sys/types.h"
325
326
327
328
329# 20 "/usr/src/gnu/cvs/mkmodules/../lib/system.h" 2
330
331# 1 "/usr/include/sys/stat.h" 1
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
367struct stat
368{
369 dev_t st_dev;
370 ino_t st_ino;
371 mode_t st_mode;
372 nlink_t st_nlink;
373 uid_t st_uid;
374 gid_t st_gid;
375 dev_t st_rdev;
376 off_t st_size;
377 time_t st_atime;
378 long st_spare1;
379 time_t st_mtime;
380 long st_spare2;
381 time_t st_ctime;
382 long st_spare3;
383 long st_blksize;
384 long st_blocks;
385 u_long st_flags;
386 u_long st_gen;
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# 1 "/usr/include/sys/cdefs.h" 1
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# 76 "/usr/include/sys/cdefs.h"
505
506
507
508# 114 "/usr/include/sys/stat.h" 2
509
510
511
512mode_t umask (mode_t) ;
513int chmod (const char *, mode_t) ;
514int fstat (int, struct stat *) ;
515int mkdir (const char *, mode_t) ;
516int mkfifo (const char *, mode_t) ;
517int stat (const char *, struct stat *) ;
518
519int fchmod (int, mode_t) ;
520int lstat (const char *, struct stat *) ;
521
522
523
524# 21 "/usr/src/gnu/cvs/mkmodules/../lib/system.h" 2
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
570off_t lseek ();
571
572
573
574
575
576# 1 "/usr/include/time.h" 1
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# 1 "/usr/include/machine/ansi.h" 1
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# 57 "/usr/include/machine/ansi.h"
652
653# 39 "/usr/include/time.h" 2
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675struct tm {
676 int tm_sec;
677 int tm_min;
678 int tm_hour;
679 int tm_mday;
680 int tm_mon;
681 int tm_year;
682 int tm_wday;
683 int tm_yday;
684 int tm_isdst;
685 long tm_gmtoff;
686 char *tm_zone;
687};
688
689# 1 "/usr/include/sys/cdefs.h" 1
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# 78 "/usr/include/sys/cdefs.h"
726
727# 74 "/usr/include/time.h" 2
728
729
730
731char *asctime (const struct tm *) ;
732clock_t clock (void) ;
733char *ctime (const time_t *) ;
734double difftime (time_t, time_t) ;
735struct tm *gmtime (const time_t *) ;
736struct tm *localtime (const time_t *) ;
737time_t mktime (struct tm *) ;
738size_t strftime (char *, size_t, const char *, const struct tm *) ;
739time_t time (time_t *) ;
740
741
742void tzset (void) ;
743
744
745
746char *timezone (int, int) ;
747void tzsetwall (void) ;
748
749
750
751
752# 72 "/usr/src/gnu/cvs/mkmodules/../lib/system.h" 2
753
754
755
756# 86 "/usr/src/gnu/cvs/mkmodules/../lib/system.h"
757
758# 1 "/usr/include/sys/timeb.h" 1
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
795struct timeb {
796 time_t time;
797 unsigned short millitm;
798 short timezone;
799 short dstflag;
800};
801# 87 "/usr/src/gnu/cvs/mkmodules/../lib/system.h" 2
802
803
804
805
806
807
808
809
810
811
812# 1 "/usr/include/sys/param.h" 1
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# 1 "/usr/include/sys/types.h" 1
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# 135 "/usr/include/sys/types.h"
895
896# 46 "/usr/include/sys/param.h" 2
897
898
899
900
901
902
903
904
905
906
907# 1 "/usr/include/sys/syslimits.h" 1
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# 56 "/usr/include/sys/param.h" 2
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986# 1 "/usr/include/sys/signal.h" 1
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# 1 "/usr/include/machine/trap.h" 1
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# 42 "/usr/include/sys/signal.h" 2
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# 1 "/usr/include/sys/cdefs.h" 1
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# 78 "/usr/include/sys/cdefs.h"
1211
1212# 90 "/usr/include/sys/signal.h" 2
1213
1214
1215
1216typedef void (*sig_t) (int) ;
1217
1218
1219typedef void (*__sighandler_t) (int) ;
1220typedef unsigned int sigset_t;
1221
1222
1223int sigaddset (sigset_t *, int) ;
1224int sigdelset (sigset_t *, int) ;
1225int sigemptyset (sigset_t *) ;
1226int sigfillset (sigset_t *) ;
1227int sigismember (const sigset_t *, int) ;
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239struct sigaction {
1240 __sighandler_t sa_handler;
1241 sigset_t sa_mask;
1242 int sa_flags;
1243};
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262struct sigvec {
1263 void (*sv_handler)();
1264 int sv_mask;
1265 int sv_flags;
1266};
1267
1268
1269
1270
1271
1272
1273
1274struct sigaltstack {
1275 char *ss_base;
1276 int ss_len;
1277 int ss_onstack;
1278};
1279
1280
1281
1282
1283struct sigstack {
1284 char *ss_sp;
1285 int ss_onstack;
1286};
1287
1288
1289
1290
1291
1292
1293
1294
1295struct sigcontext {
1296 int sc_onstack;
1297 int sc_mask;
1298 int sc_sp;
1299 int sc_fp;
1300 int sc_ap;
1301 int sc_pc;
1302 int sc_ps;
1303};
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318# 1 "/usr/include/sys/types.h" 1
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# 135 "/usr/include/sys/types.h"
1355
1356# 195 "/usr/include/sys/signal.h" 2
1357
1358
1359
1360
1361__sighandler_t signal (int, __sighandler_t) ;
1362int raise (int) ;
1363
1364int kill (pid_t, int) ;
1365int sigaction (int, const struct sigaction *, struct sigaction *) ;
1366int sigpending (sigset_t *) ;
1367int sigprocmask (int, const sigset_t *, sigset_t *) ;
1368int sigsuspend (const sigset_t *) ;
1369
1370
1371int killpg (pid_t, int) ;
1372void psignal (unsigned, const char *) ;
1373int sigblock (int) ;
1374int siginterrupt (int, int) ;
1375int sigpause (int) ;
1376int sigreturn (struct sigcontext *) ;
1377int sigsetmask (int) ;
1378int sigstack (const struct sigstack *, struct sigstack *) ;
1379int sigvec (int, struct sigvec *, struct sigvec *) ;
1380
1381
1382
1383
1384
1385# 79 "/usr/include/sys/param.h" 2
1386
1387
1388
1389# 1 "/usr/include/machine/param.h" 1
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# 82 "/usr/include/sys/param.h" 2
1555
1556# 1 "/usr/include/machine/endian.h" 1
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# 1 "/usr/include/sys/cdefs.h" 1
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# 78 "/usr/include/sys/cdefs.h"
1648
1649# 55 "/usr/include/machine/endian.h" 2
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659# 77 "/usr/include/machine/endian.h"
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678# 106 "/usr/include/machine/endian.h"
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691# 83 "/usr/include/sys/param.h" 2
1692
1693# 1 "/usr/include/machine/limits.h" 1
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# 84 "/usr/include/sys/param.h" 2
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# 97 "/usr/src/gnu/cvs/mkmodules/../lib/system.h" 2
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905struct utimbuf
1906{
1907 long actime;
1908 long modtime;
1909};
1910
1911int utime ();
1912
1913
1914# 145 "/usr/src/gnu/cvs/mkmodules/../lib/system.h"
1915
1916# 1 "/usr/include/strings.h" 1
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# 1 "/usr/include/string.h" 1
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# 1 "/usr/include/machine/ansi.h" 1
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# 57 "/usr/include/machine/ansi.h"
2027
2028# 38 "/usr/include/string.h" 2
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040# 1 "/usr/include/sys/cdefs.h" 1
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# 78 "/usr/include/sys/cdefs.h"
2077
2078# 49 "/usr/include/string.h" 2
2079
2080
2081
2082void *memchr (const void *, int, size_t) ;
2083int memcmp (const void *, const void *, size_t) ;
2084void *memcpy (void *, const void *, size_t) ;
2085void *memmove (void *, const void *, size_t) ;
2086void *memset (void *, int, size_t) ;
2087char *strcat (char *, const char *) ;
2088char *strchr (const char *, int) ;
2089int strcmp (const char *, const char *) ;
2090int strcoll (const char *, const char *) ;
2091char *strcpy (char *, const char *) ;
2092size_t strcspn (const char *, const char *) ;
2093char *strerror (int) ;
2094size_t strlen (const char *) ;
2095char *strncat (char *, const char *, size_t) ;
2096int strncmp (const char *, const char *, size_t) ;
2097char *strncpy (char *, const char *, size_t) ;
2098char *strpbrk (const char *, const char *) ;
2099char *strrchr (const char *, int) ;
2100size_t strspn (const char *, const char *) ;
2101char *strstr (const char *, const char *) ;
2102char *strtok (char *, const char *) ;
2103size_t strxfrm (char *, const char *, size_t) ;
2104
2105
2106
2107int bcmp (const void *, const void *, size_t) ;
2108void bcopy (const void *, void *, size_t) ;
2109void bzero (void *, size_t) ;
2110int ffs (int) ;
2111char *index (const char *, int) ;
2112void *memccpy (void *, const void *, int, size_t) ;
2113char *rindex (const char *, int) ;
2114int strcasecmp (const char *, const char *) ;
2115char *strdup (const char *) ;
2116void strmode (int, char *) ;
2117int strncasecmp (const char *, const char *, size_t) ;
2118char *strsep (char **, const char *) ;
2119void swab (const void *, void *, size_t) ;
2120
2121
2122
2123
2124# 36 "/usr/include/strings.h" 2
2125
2126# 146 "/usr/src/gnu/cvs/mkmodules/../lib/system.h" 2
2127
2128
2129
2130# 1 "/usr/include/errno.h" 1
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
2167extern int errno;
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# 149 "/usr/src/gnu/cvs/mkmodules/../lib/system.h" 2
2285
2286
2287
2288
2289char *getenv ();
2290char *malloc ();
2291char *realloc ();
2292char *calloc ();
2293extern int errno;
2294
2295
2296
2297
2298
2299
2300# 173 "/usr/src/gnu/cvs/mkmodules/../lib/system.h"
2301
2302
2303
2304
2305
2306
2307# 1 "/usr/include/sys/file.h" 1
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# 1 "/usr/include/sys/fcntl.h" 1
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# 1 "/usr/include/sys/types.h" 1
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# 135 "/usr/include/sys/types.h"
2426
2427# 46 "/usr/include/sys/fcntl.h" 2
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# 99 "/usr/include/sys/fcntl.h"
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
2524struct flock {
2525 short l_type;
2526 short l_whence;
2527 off_t l_start;
2528 off_t l_len;
2529 pid_t l_pid;
2530};
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543# 1 "/usr/include/sys/cdefs.h" 1
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# 78 "/usr/include/sys/cdefs.h"
2580
2581# 169 "/usr/include/sys/fcntl.h" 2
2582
2583
2584
2585int open (const char *, int, ...) ;
2586int creat (const char *, mode_t) ;
2587int fcntl (int, int, ...) ;
2588
2589int flock (int, int) ;
2590
2591
2592
2593
2594
2595# 36 "/usr/include/sys/file.h" 2
2596
2597# 1 "/usr/include/sys/unistd.h" 1
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# 37 "/usr/include/sys/file.h" 2
2690
2691
2692# 73 "/usr/include/sys/file.h"
2693
2694# 179 "/usr/src/gnu/cvs/mkmodules/../lib/system.h" 2
2695
2696char *getwd ();
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# 1 "/usr/include/sys/dir.h" 1
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# 1 "/usr/include/dirent.h" 1
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
2815struct dirent {
2816 u_long d_fileno;
2817 u_short d_reclen;
2818 u_short d_namlen;
2819
2820
2821
2822
2823 char d_name[255 + 1];
2824
2825};
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837typedef struct _dirdesc {
2838 int dd_fd;
2839 long dd_loc;
2840 long dd_size;
2841 char *dd_buf;
2842 int dd_len;
2843 long dd_seek;
2844} DIR;
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856# 1 "/usr/include/sys/cdefs.h" 1
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# 78 "/usr/include/sys/cdefs.h"
2893
2894# 88 "/usr/include/dirent.h" 2
2895
2896
2897
2898DIR *opendir (const char *) ;
2899struct dirent *readdir (DIR *) ;
2900void rewinddir (DIR *) ;
2901int closedir (DIR *) ;
2902
2903long telldir (const DIR *) ;
2904void seekdir (DIR *, long) ;
2905int scandir (const char *, struct dirent ***,
2906 int (*)(struct dirent *), int (*)(const void *, const void *)) ;
2907int alphasort (const void *, const void *) ;
2908int getdirentries (int, char *, int, long *) ;
2909
2910
2911
2912
2913
2914
2915# 44 "/usr/include/sys/dir.h" 2
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934# 208 "/usr/src/gnu/cvs/mkmodules/../lib/system.h" 2
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951# 3 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h" 2
2952
2953# 1 "/usr/include/stdio.h" 1
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# 1 "/usr/include/sys/cdefs.h" 1
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# 78 "/usr/include/sys/cdefs.h"
3032
3033# 42 "/usr/include/stdio.h" 2
3034
3035
3036# 1 "/usr/include/machine/ansi.h" 1
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# 57 "/usr/include/machine/ansi.h"
3073
3074# 44 "/usr/include/stdio.h" 2
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085typedef long fpos_t;
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096struct __sbuf {
3097 unsigned char *_base;
3098 int _size;
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
3125typedef struct __sFILE {
3126 unsigned char *_p;
3127 int _r;
3128 int _w;
3129 short _flags;
3130 short _file;
3131 struct __sbuf _bf;
3132 int _lbfsize;
3133
3134
3135 void *_cookie;
3136 int (*_close) (void *) ;
3137 int (*_read) (void *, char *, int) ;
3138 fpos_t (*_seek) (void *, fpos_t, int) ;
3139 int (*_write) (void *, const char *, int) ;
3140
3141
3142 struct __sbuf _ub;
3143 unsigned char *_up;
3144 int _ur;
3145
3146
3147 unsigned char _ubuf[3];
3148 unsigned char _nbuf[1];
3149
3150
3151 struct __sbuf _lb;
3152
3153
3154 int _blksize;
3155 int _offset;
3156} FILE;
3157
3158
3159extern FILE __sF[];
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
3227void clearerr (FILE *) ;
3228int fclose (FILE *) ;
3229int feof (FILE *) ;
3230int ferror (FILE *) ;
3231int fflush (FILE *) ;
3232int fgetc (FILE *) ;
3233int fgetpos (FILE *, fpos_t *) ;
3234char *fgets (char *, size_t, FILE *) ;
3235FILE *fopen (const char *, const char *) ;
3236int fprintf (FILE *, const char *, ...) ;
3237int fputc (int, FILE *) ;
3238int fputs (const char *, FILE *) ;
3239int fread (void *, size_t, size_t, FILE *) ;
3240FILE *freopen (const char *, const char *, FILE *) ;
3241int fscanf (FILE *, const char *, ...) ;
3242int fseek (FILE *, long, int) ;
3243int fsetpos (FILE *, const fpos_t *) ;
3244long ftell (const FILE *) ;
3245int fwrite (const void *, size_t, size_t, FILE *) ;
3246int getc (FILE *) ;
3247int getchar (void) ;
3248char *gets (char *) ;
3249
3250extern int sys_nerr;
3251extern char *sys_errlist[];
3252
3253void perror (const char *) ;
3254int printf (const char *, ...) ;
3255int putc (int, FILE *) ;
3256int putchar (int) ;
3257int puts (const char *) ;
3258int remove (const char *) ;
3259int rename (const char *, const char *) ;
3260void rewind (FILE *) ;
3261int scanf (const char *, ...) ;
3262void setbuf (FILE *, char *) ;
3263int setvbuf (FILE *, char *, int, size_t) ;
3264int sprintf (char *, const char *, ...) ;
3265int sscanf (char *, const char *, ...) ;
3266FILE *tmpfile (void) ;
3267char *tmpnam (char *) ;
3268int ungetc (int, FILE *) ;
3269int vfprintf (FILE *, const char *, char * ) ;
3270int vprintf (const char *, char * ) ;
3271int vsprintf (char *, const char *, char * ) ;
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282char *ctermid (char *) ;
3283FILE *fdopen (int, const char *) ;
3284int fileno (FILE *) ;
3285
3286
3287
3288
3289
3290
3291
3292
3293char *fgetline (FILE *, size_t *) ;
3294int fpurge (FILE *) ;
3295int getw (FILE *) ;
3296int pclose (FILE *) ;
3297FILE *popen (const char *, const char *) ;
3298int putw (int, FILE *) ;
3299void setbuffer (FILE *, char *, int) ;
3300int setlinebuf (FILE *) ;
3301char *tempnam (const char *, const char *) ;
3302int snprintf (char *, size_t, const char *, ...) ;
3303int vsnprintf (char *, size_t, const char *, char * ) ;
3304int vscanf (const char *, char * ) ;
3305int vsscanf (const char *, const char *, char * ) ;
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319FILE *funopen (const void *,
3320 int (*)(void *, char *, int),
3321 int (*)(void *, const char *, int),
3322 fpos_t (*)(void *, fpos_t, int),
3323 int (*)(void *)) ;
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333int __srget (FILE *) ;
3334int __svfscanf (FILE *, const char *, char * ) ;
3335int __swbuf (int, FILE *) ;
3336
3337
3338
3339
3340
3341
3342
3343
3344static inline int __sputc(int _c, FILE *_p) {
3345 if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n'))
3346 return (*_p->_p++ = _c);
3347 else
3348 return (__swbuf(_c, _p));
3349}
3350# 331 "/usr/include/stdio.h"
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374# 4 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h" 2
3375
3376# 1 "/usr/include/ctype.h" 1
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
3424extern char _ctype_[];
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443# 5 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h" 2
3444
3445# 1 "/usr/include/pwd.h" 1
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# 1 "/usr/include/sys/types.h" 1
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# 135 "/usr/include/sys/types.h"
3521
3522# 39 "/usr/include/pwd.h" 2
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543struct passwd {
3544 char *pw_name;
3545 char *pw_passwd;
3546 int pw_uid;
3547 int pw_gid;
3548 time_t pw_change;
3549 char *pw_class;
3550 char *pw_gecos;
3551 char *pw_dir;
3552 char *pw_shell;
3553 time_t pw_expire;
3554};
3555
3556# 1 "/usr/include/sys/cdefs.h" 1
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# 78 "/usr/include/sys/cdefs.h"
3593
3594# 72 "/usr/include/pwd.h" 2
3595
3596
3597
3598struct passwd *getpwuid (uid_t) ;
3599struct passwd *getpwnam (const char *) ;
3600
3601struct passwd *getpwent (void) ;
3602int setpassent (int) ;
3603int setpwent (void) ;
3604void endpwent (void) ;
3605
3606
3607
3608
3609# 6 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h" 2
3610
3611# 1 "/usr/include/signal.h" 1
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# 222 "/usr/include/signal.h"
3648
3649# 7 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h" 2
3650
3651# 1 "/usr/src/gnu/cvs/mkmodules/../cvs/hash.h" 1
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670enum ntype
3671{
3672 UNKNOWN, HEADER, ENTRIES, FILES, LIST, RCSNODE,
3673 RCSVERS, DIRS, UPDATE, LOCK, NDBMNODE
3674};
3675typedef enum ntype Ntype;
3676
3677struct node
3678{
3679 Ntype type;
3680 struct node *next;
3681 struct node *prev;
3682 struct node *hashnext;
3683 struct node *hashprev;
3684 char *key;
3685 char *data;
3686 void (*delproc) ();
3687};
3688typedef struct node Node;
3689
3690struct list
3691{
3692 Node *list;
3693 Node *hasharray[151 ];
3694 struct list *next;
3695};
3696typedef struct list List;
3697
3698struct entnode
3699{
3700 char *version;
3701 char *timestamp;
3702 char *options;
3703 char *tag;
3704 char *date;
3705};
3706typedef struct entnode Entnode;
3707
3708
3709List *getlist (void);
3710Node *findnode (List * list, char *key);
3711Node *getnode (void);
3712int addnode (List * list, Node * p);
3713int walklist (List * list, int (*proc) ());
3714void dellist (List ** listp);
3715void delnode (Node * p);
3716void freenode (Node * p);
3717void sortlist (List * list, int (*comp) ());
3718# 77 "/usr/src/gnu/cvs/mkmodules/../cvs/hash.h"
3719
3720# 8 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h" 2
3721
3722# 1 "/usr/src/gnu/cvs/mkmodules/../cvs/rcs.h" 1
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
3757struct rcsnode
3758{
3759 int refcount;
3760 int flags;
3761 char *path;
3762 char *head;
3763 char *branch;
3764 List *symbols;
3765 List *versions;
3766 List *dates;
3767};
3768typedef struct rcsnode RCSNode;
3769
3770struct rcsversnode
3771{
3772 char *version;
3773 char *date;
3774 char *next;
3775 List *branches;
3776};
3777typedef struct rcsversnode RCSVers;
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792List *RCS_parsefiles (List * files, char *xrepos);
3793RCSNode *RCS_parse (char *file, char *repos);
3794RCSNode *RCS_parsercsfile (char *rcsfile);
3795char *RCS_check_kflag (char *arg);
3796char *RCS_getdate (RCSNode * rcs, char *date, int force_tag_match);
3797char *RCS_gettag (RCSNode * rcs, char *tag, int force_tag_match);
3798char *RCS_getversion (RCSNode * rcs, char *tag, char *date,
3799 int force_tag_match);
3800char *RCS_magicrev (RCSNode *rcs, char *rev);
3801int RCS_isbranch (char *file, char *rev, List *srcfiles);
3802char *RCS_whatbranch (char *file, char *tag, List *srcfiles);
3803char *RCS_head (RCSNode * rcs);
3804int RCS_datecmp (char *date1, char *date2);
3805time_t RCS_getrevtime (RCSNode * rcs, char *rev, char *date, int fudge);
3806void RCS_check_tag (char *tag);
3807void freercsnode (RCSNode ** rnodep);
3808# 102 "/usr/src/gnu/cvs/mkmodules/../cvs/rcs.h"
3809
3810# 9 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h" 2
3811
3812# 1 "/usr/src/gnu/cvs/mkmodules/../lib/regex.h" 1
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
3842typedef unsigned reg_syntax_t;
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
3964extern reg_syntax_t obscure_syntax;
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\f
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
4044typedef enum
4045{
4046 REG_NOERROR = 0,
4047 REG_NOMATCH,
4048
4049
4050
4051 REG_BADPAT,
4052 REG_ECOLLATE,
4053 REG_ECTYPE,
4054 REG_EESCAPE,
4055 REG_ESUBREG,
4056 REG_EBRACK,
4057 REG_EPAREN,
4058 REG_EBRACE,
4059 REG_BADBR,
4060 REG_ERANGE,
4061 REG_ESPACE,
4062 REG_BADRPT,
4063
4064
4065 REG_EEND,
4066 REG_ESIZE,
4067 REG_ERPAREN
4068} reg_errcode_t;
4069
4070
4071
4072\f
4073
4074
4075
4076
4077
4078
4079struct re_pattern_buffer
4080{
4081
4082
4083
4084
4085 unsigned char *buffer;
4086
4087
4088 unsigned long allocated;
4089
4090
4091 unsigned long used;
4092
4093
4094 reg_syntax_t syntax;
4095
4096
4097
4098
4099 char *fastmap;
4100
4101
4102
4103
4104
4105 char *translate;
4106
4107
4108 size_t re_nsub;
4109
4110
4111
4112
4113
4114
4115 unsigned can_be_null : 2;
4116
4117
4118
4119 unsigned fastmap_accurate : 1;
4120
4121
4122
4123 unsigned no_sub : 1;
4124
4125
4126
4127 unsigned not_bol : 1;
4128
4129
4130 unsigned not_eol : 1;
4131
4132
4133 unsigned newline_anchor : 1;
4134
4135
4136
4137
4138 unsigned caller_allocated_regs : 1;
4139
4140};
4141
4142typedef struct re_pattern_buffer regex_t;
4143
4144
4145
4146
4147
4148
4149
4150
4151\f
4152
4153
4154typedef int regoff_t;
4155
4156
4157
4158
4159struct re_registers
4160{
4161 unsigned num_regs;
4162 regoff_t *start;
4163 regoff_t *end;
4164};
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177typedef struct
4178{
4179 regoff_t rm_so;
4180 regoff_t rm_eo;
4181} regmatch_t;
4182
4183
4184
4185\f
4186
4187
4188
4189
4190
4191
4192extern reg_syntax_t re_set_syntax (reg_syntax_t syntax);
4193
4194
4195
4196
4197extern const char *re_compile_pattern (const char *pattern, int length,
4198 struct re_pattern_buffer *buffer);
4199
4200
4201
4202
4203
4204extern int re_compile_fastmap (struct re_pattern_buffer *buffer);
4205
4206
4207
4208
4209
4210
4211
4212extern int re_search (struct re_pattern_buffer *buffer,
4213 const char *string, int length,
4214 int start, int range,
4215 struct re_registers *regs);
4216
4217
4218
4219
4220extern int re_search_2 (struct re_pattern_buffer *buffer,
4221 const char *string1, int length1,
4222 const char *string2, int length2,
4223 int start, int range,
4224 struct re_registers *regs,
4225 int stop);
4226
4227
4228
4229
4230extern int re_match (const struct re_pattern_buffer *buffer,
4231 const char *string, int length,
4232 int start, struct re_registers *regs);
4233
4234
4235
4236extern int re_match_2 (const struct re_pattern_buffer *buffer,
4237 const char *string1, int length1,
4238 const char *string2, int length2,
4239 int start,
4240 struct re_registers *regs,
4241 int stop);
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253extern int regcomp (regex_t *preg, const char *pattern, int cflags);
4254extern int regexec (const regex_t *preg, const char *string, size_t nmatch,
4255 regmatch_t pmatch[], int eflags);
4256extern size_t regerror (int errcode, const regex_t *preg, char *errbuf,
4257 size_t errbuf_size);
4258extern void regfree (regex_t *preg);
4259
4260# 468 "/usr/src/gnu/cvs/mkmodules/../lib/regex.h"
4261
4262
4263
4264
4265\f
4266
4267
4268
4269
4270
4271
4272
4273# 10 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h" 2
4274
4275# 1 "/usr/src/gnu/cvs/mkmodules/../lib/fnmatch.h" 1
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
4315extern int fnmatch (const char *pattern, const char *string, int flags);
4316
4317
4318
4319
4320
4321# 11 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h" 2
4322
4323# 1 "/usr/src/gnu/cvs/mkmodules/../lib/getopt.h" 1
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
4349extern char *optarg;
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363extern int optind;
4364
4365
4366
4367
4368extern int opterr;
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390struct option
4391{
4392 char *name;
4393 int has_arg;
4394 int *flag;
4395 int val;
4396};
4397
4398
4399extern const struct option *_getopt_long_options;
4400
4401
4402
4403
4404
4405
4406
4407extern int _getopt_long_only;
4408
4409
4410
4411
4412
4413extern int option_index;
4414
4415
4416int gnu_getopt (int argc, char **argv, const char *shortopts);
4417int gnu_getopt_long (int argc, char **argv, const char *shortopts,
4418 const struct option *longopts, int *longind);
4419int gnu_getopt_long_only (int argc, char **argv, const char *shortopts,
4420 const struct option *longopts, int *longind);
4421
4422
4423
4424
4425
4426# 12 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h" 2
4427
4428# 1 "/usr/src/gnu/cvs/mkmodules/../lib/wait.h" 1
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# 13 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h" 2
4459
4460# 1 "/usr/src/gnu/cvs/mkmodules/../cvs/config.h" 1
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
4658extern void exit ();
4659
4660
4661
4662extern char *getwd ();
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678# 14 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h" 2
4679
4680
4681# 1 "/usr/src/gnu/cvs/mkmodules/../cvs/myndbm.h" 1
4682
4683
4684
4685
4686
4687
4688typedef struct
4689{
4690 List *dbm_list;
4691 Node *dbm_next;
4692} DBM;
4693
4694typedef struct
4695{
4696 char *dptr;
4697 int dsize;
4698} datum;
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712DBM *mydbm_open (char *file, int flags, int mode);
4713void mydbm_close (DBM * db);
4714datum mydbm_fetch (DBM * db, datum key);
4715datum mydbm_firstkey (DBM * db);
4716datum mydbm_nextkey (DBM * db);
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726# 16 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h" 2
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
4872enum mtype
4873{
4874 CHECKOUT, TAG, PATCH
4875};
4876
4877
4878
4879
4880
4881
4882enum classify_type
4883{
4884 T_UNKNOWN = 1,
4885 T_CONFLICT,
4886 T_NEEDS_MERGE,
4887 T_MODIFIED,
4888 T_CHECKOUT,
4889 T_ADDED,
4890 T_REMOVED,
4891 T_REMOVE_ENTRY,
4892 T_UPTODATE,
4893 T_TITLE
4894};
4895typedef enum classify_type Ctype;
4896
4897
4898
4899
4900
4901
4902
4903
4904struct vers_ts
4905{
4906 char *vn_user;
4907
4908
4909
4910
4911
4912 char *vn_rcs;
4913
4914 char *ts_user;
4915 char *ts_rcs;
4916 char *options;
4917
4918 char *tag;
4919 char *date;
4920 Entnode *entdata;
4921 RCSNode *srcfile;
4922};
4923typedef struct vers_ts Vers_TS;
4924
4925
4926
4927
4928
4929struct stickydirtag
4930{
4931 int aflag;
4932 char *tag;
4933 char *date;
4934 char *options;
4935};
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952enum direnter_type
4953{
4954 R_PROCESS = 1,
4955 R_SKIP_FILES,
4956 R_SKIP_DIRS,
4957 R_SKIP_ALL
4958};
4959typedef enum direnter_type Dtype;
4960
4961extern char *program_name, *command_name;
4962extern char *Rcsbin, *Editor, *CVSroot;
4963extern char *CurDir;
4964extern int really_quiet, quiet;
4965extern int use_editor;
4966extern int cvswrite;
4967
4968extern int trace;
4969extern int noexec;
4970extern int logoff;
4971
4972
4973
4974int Reader_Lock (char *xrepository);
4975DBM *open_module (void);
4976FILE *Fopen (char *name, char *mode);
4977FILE *open_file (char *name, char *mode);
4978List *Find_Dirs (char *repository, int which);
4979List *ParseEntries (int aflag);
4980char *Make_Date (char *rawdate);
4981char *Name_Repository (char *dir, char *update_dir);
4982char *Short_Repository (char *repository);
4983char *getcaller (void);
4984char *time_stamp (char *file);
4985char *xmalloc (int bytes);
4986char *xrealloc (char *ptr, int bytes);
4987char *xstrdup (char *str);
4988int No_Difference (char *file, Vers_TS * vers, List * entries);
4989int Parse_Info (char *infofile, char *repository, int (*callproc) (), int all);
4990int Reader_Lock (char *xrepository);
4991int SIG_register (int sig, void (*fn) ());
4992int Writer_Lock (List * list);
4993int gethostname (char *name, int namelen);
4994int ign_name (char *name);
4995int isdir (char *file);
4996int isfile (char *file);
4997int islink (char *file);
4998int isreadable (char *file);
4999int iswritable (char *file);
5000int link_file (char *from, char *to);
5001int numdots (char *s);
5002int run_exec (char *stin, char *stout, char *sterr, int flags);
5003int unlink_file (char *f);
5004int update (int argc, char *argv[]);
5005int xcmp (char *file1, char *file2);
5006int yesno (void);
5007time_t get_date (char *date, struct timeb *now);
5008void Create_Admin (char *dir, char *repository, char *tag, char *date);
5009void Lock_Cleanup (void);
5010void ParseTag (char **tagp, char **datep);
5011void Scratch_Entry (List * list, char *fname);
5012void WriteTag (char *dir, char *tag, char *date);
5013void cat_module (int status);
5014void check_entries (char *dir);
5015void close_module (DBM * db);
5016void copy_file (char *from, char *to);
5017void error (int status, int errnum, char *message,...);
5018void fperror (FILE * fp, int status, int errnum, char *message,...);
5019void free_names (int *pargc, char *argv[]);
5020void freevers_ts (Vers_TS ** versp);
5021void ign_add (char *ign, int hold);
5022void ign_add_file (char *file, int hold);
5023void ign_setup (void);
5024void line2argv (int *pargc, char *argv[], char *line);
5025void make_directories (char *name);
5026void make_directory (char *name);
5027void rename_file (char *from, char *to);
5028void run_arg (char *s);
5029void run_args (char *fmt,...);
5030void run_print (FILE * fp);
5031void run_setup (char *fmt,...);
5032void strip_path (char *path);
5033void update_delproc (Node * p);
5034void usage (char **cpp);
5035void xchmod (char *fname, int writable);
5036int Checkin (int type, char *file, char *repository, char *rcs, char *rev,
5037 char *tag, char *message, List * entries);
5038Ctype Classify_File (char *file, char *tag, char *date, char *options,
5039 int force_tag_match, int aflag, char *repository,
5040 List *entries, List *srcfiles, Vers_TS **versp);
5041List *Find_Names (char *repository, int which, int aflag,
5042 List ** optentries);
5043void Register (List * list, char *fname, char *vn, char *ts,
5044 char *options, char *tag, char *date);
5045void Update_Logfile (char *repository, char *xmessage, char *xrevision,
5046 FILE * xlogfp, List * xchanges);
5047Vers_TS *Version_TS (char *repository, char *options, char *tag,
5048 char *date, char *user, int force_tag_match,
5049 int set_time, List * entries, List * xfiles);
5050void do_editor (char *dir, char *message, char *repository,
5051 List * changes);
5052int do_module (DBM * db, char *mname, enum mtype m_type, char *msg,
5053 int (*callback_proc) (), char *where, int shorten,
5054 int local_specified, int run_module_prog, char *extra_arg);
5055int do_recursion (int (*xfileproc) (), int (*xfilesdoneproc) (),
5056 Dtype (*xdirentproc) (), int (*xdirleaveproc) (),
5057 Dtype xflags, int xwhich, int xaflag, int xreadlock,
5058 int xdosrcs);
5059int do_update (int argc, char *argv[], char *xoptions, char *xtag,
5060 char *xdate, int xforce, int local, int xbuild,
5061 int xaflag, int xprune, int xpipeout, int which,
5062 char *xjoin_rev1, char *xjoin_rev2, char *preload_update_dir);
5063void history_write (int type, char *update_dir, char *revs, char *name,
5064 char *repository);
5065int start_recursion (int (*fileproc) (), int (*filesdoneproc) (),
5066 Dtype (*direntproc) (), int (*dirleaveproc) (),
5067 int argc, char *argv[], int local, int which,
5068 int aflag, int readlock, char *update_preload,
5069 int dosrcs);
5070void SIG_beginCrSect ();
5071void SIG_endCrSect ();
5072# 438 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h"
5073
5074# 15 "/usr/src/gnu/cvs/mkmodules/mkmodules.c" 2
5075
5076
5077
5078
5079
5080
5081PATH_MAX +2
5082
5083
5084static char rcsid[] = "@(#)mkmodules.c 1.39 92/03/31";
5085
5086
5087
5088
5089
5090
5091char *program_name, *command_name;
5092
5093char *Rcsbin = "" ;
5094int noexec = 0;
5095int trace = 0;
5096
5097
5098static int checkout_file (char *file, char *temp);
5099static void make_tempfile (char *temp);
5100static void mkmodules_usage (void);
5101static void rename_rcsfile (char *temp, char *real);
5102
5103
5104
5105
5106
5107
5108# 60 "/usr/src/gnu/cvs/mkmodules/mkmodules.c"
5109
5110
5111int
5112main (argc, argv)
5113 int argc;
5114 char *argv[];
5115{
5116 extern char *getenv ();
5117 char temp[PATH_MAX +2 ];
5118 char *cp;
5119
5120 DBM *db;
5121
5122
5123
5124
5125
5126 if ((program_name = rindex (argv[0], '/')) == 0 )
5127 program_name = argv[0];
5128 else
5129 program_name++;
5130
5131 if (argc != 2)
5132 mkmodules_usage ();
5133
5134 if ((cp = getenv ("RCSBIN" )) != 0 )
5135 Rcsbin = cp;
5136
5137
5138
5139
5140
5141 if (Rcsbin[0] != '\0')
5142 {
5143 int len = strlen (Rcsbin);
5144 char *rcsbin;
5145
5146 if (Rcsbin[len - 1] != '/')
5147 {
5148 rcsbin = Rcsbin;
5149 Rcsbin = xmalloc (len + 2);
5150 (void) strcpy (Rcsbin, rcsbin);
5151 (void) strcat (Rcsbin, "/");
5152 }
5153 }
5154
5155 if (chdir (argv[1]) < 0)
5156 error (1, errno, "cannot chdir to %s", argv[1]);
5157
5158
5159
5160
5161 make_tempfile (temp);
5162 switch (checkout_file ("modules" , temp))
5163 {
5164
5165 case 0:
5166
5167
5168 if ((db = mydbm_open (temp, 0x0000 , 0666)) != 0 )
5169 mydbm_close (db);
5170
5171
5172
5173
5174 rename_rcsfile (temp, "modules" );
5175 break;
5176
5177 case -1:
5178 (void) unlink_file (temp);
5179 exit (1);
5180
5181
5182 default:
5183 error (0, 0,
5184 "'cvs checkout' is less functional without a %s file",
5185 "modules" );
5186 break;
5187 }
5188
5189 (void) unlink_file (temp);
5190
5191
5192
5193
5194
5195 make_tempfile (temp);
5196 if (checkout_file ("loginfo" , temp) == 0)
5197 rename_rcsfile (temp, "loginfo" );
5198 else
5199 error (0, 0,
5200 "no logging of 'cvs commit' messages is done without a %s file",
5201 "loginfo" );
5202 (void) unlink_file (temp);
5203
5204
5205
5206
5207
5208 make_tempfile (temp);
5209 if (checkout_file ("rcsinfo" , temp) == 0)
5210 rename_rcsfile (temp, "rcsinfo" );
5211 else
5212 error (0, 0,
5213 "a %s file can be used to configure 'cvs commit' templates",
5214 "rcsinfo" );
5215 (void) unlink_file (temp);
5216
5217
5218
5219
5220
5221 make_tempfile (temp);
5222 if (checkout_file ("editinfo" , temp) == 0)
5223 rename_rcsfile (temp, "editinfo" );
5224 else
5225 error (0, 0,
5226 "a %s file can be used to validate log messages",
5227 "editinfo" );
5228 (void) unlink_file (temp);
5229
5230
5231
5232
5233
5234 make_tempfile (temp);
5235 if (checkout_file ("commitinfo" , temp) == 0)
5236 rename_rcsfile (temp, "commitinfo" );
5237 else
5238 error (0, 0,
5239 "a %s file can be used to configure 'cvs commit' checking",
5240 "commitinfo" );
5241 (void) unlink_file (temp);
5242 return (0);
5243}
5244
5245
5246
5247
5248static void
5249make_tempfile (temp)
5250 char *temp;
5251{
5252 static int seed = 0;
5253 int fd;
5254
5255 if (seed == 0)
5256 seed = getpid ();
5257 while (1)
5258 {
5259 (void) sprintf (temp, "%s%d", ".#" , seed++);
5260 if ((fd = open (temp, 0x0200 | 0x0800 | 0x0002 , 0666)) != -1)
5261 break;
5262 if (errno != 17 )
5263 error (1, errno, "cannot create temporary file %s", temp);
5264 }
5265 if (close(fd) < 0)
5266 error(1, errno, "cannot close temporary file %s", temp);
5267}
5268
5269static int
5270checkout_file (file, temp)
5271 char *file;
5272 char *temp;
5273{
5274 char rcs[PATH_MAX +2 ];
5275 int retcode = 0;
5276
5277 (void) sprintf (rcs, "%s%s", file, ",v" );
5278 if (!isfile (rcs))
5279 return (1);
5280 run_setup ("%s%s -q -p", Rcsbin, "co" );
5281 run_arg (rcs);
5282 if ((retcode = run_exec ( (char *)0 , temp, (char *)0 , 0x0000 )) != 0)
5283 {
5284 error (0, retcode == -1 ? errno : 0, "failed to check out %s file", file);
5285 }
5286 return (retcode);
5287}
5288
5289# 369 "/usr/src/gnu/cvs/mkmodules/mkmodules.c"
5290
5291
5292static void
5293rename_rcsfile (temp, real)
5294 char *temp;
5295 char *real;
5296{
5297 char bak[50];
5298
5299 if (chmod (temp, 0444) < 0)
5300 error (0, errno, "warning: cannot chmod %s", temp);
5301 (void) sprintf (bak, "%s%s", ".#" , real);
5302 (void) unlink_file (bak);
5303 (void) rename (real, bak);
5304 (void) rename (temp, real);
5305}
5306
5307
5308
5309
5310void
5311Lock_Cleanup ()
5312{
5313}
5314
5315static void
5316mkmodules_usage ()
5317{
5318 (void) fprintf ((&__sF[2]) , "Usage: %s modules-directory\n", program_name);
5319 exit (1);
5320}