rh

Check-in [d10742d6cc]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Start supporting large files
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:d10742d6cc6e3a62bbeca02620542d2e012e71220e6a14282c8b5eec120ae59d
User & Date: ajv-899-334-8894@vsta.org 2010-04-23 03:11:06
Context
2011-01-03
21:46
Note changes by Andy Valencia check-in: 4814501163 user: ajv-899-334-8894@vsta.org tags: master, trunk
2010-04-23
03:11
Start supporting large files check-in: d10742d6cc user: ajv-899-334-8894@vsta.org tags: master, trunk
2010-04-22
03:03
Add access to allocated blocks, so I can find files with allocation holes check-in: 6827c7f100 user: ajv-899-334-8894@vsta.org tags: master, trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to rh.c.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 *
 * Static Functions: printhelp, max_descriptors, fmt_req_stat,
 *		     prog_req_stat, execute, exam1, exam2,
 *		     exam3, exam4, get_rhpath, get_func,
 *		     push_instr, write_tree, write_functions
 */

#if !defined(lint)
static char rcsid[] = "$Id: rh.c,v 1.3 1994/01/26 16:18:29 rick Exp $";
#endif

#include "rh.h"
#include "rhcmds.h"
#include "rhdata.h"
#include "rhgram.h"
#include "alloc.h"
#include "errmsg.h"








|
<
<
<







8
9
10
11
12
13
14
15



16
17
18
19
20
21
22
 *
 * Static Functions: printhelp, max_descriptors, fmt_req_stat,
 *		     prog_req_stat, execute, exam1, exam2,
 *		     exam3, exam4, get_rhpath, get_func,
 *		     push_instr, write_tree, write_functions
 */

#define _FILE_OFFSET_BITS 64



#include "rh.h"
#include "rhcmds.h"
#include "rhdata.h"
#include "rhgram.h"
#include "alloc.h"
#include "errmsg.h"

Changes to rhdir.c.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
...
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
...
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
...
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
...
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
...
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
 * directories.
 *
 * Global Functions: ftrw, graphic, printentry, printformat
 *
 * Static Functions: fwt1, handle_file, ls_date
 */

#if !defined(lint)
static char rcsid[] = "$Id: rhdir.c,v 1.2 2009/10/02 15:28:48 vandys Exp vandys $";
#endif

#include <ctype.h>
#include "rh.h"
#include "rhdata.h"
#include "errmsg.h"
#include "sysinfo.h"

#define user_index(b)	((000777 & (b)) >> 6) + ((b) & S_ISUID ? 8 : 0) 
................................................................................
	    
	case 'A':	/* atime in seconds */
	    (void) printf("%10lu", (u_long) buf->st_atime);
	    break;

#if BSD
	case 'b':	/* number blocks allocated to file */
	    (void) printf("%10ld", buf->st_blocks);
	    break;
	    
	case 'B':	/* optimal block size for file system i/o */
	    (void) printf("%6ld", buf->st_blksize);
	    break;
#endif
	    
................................................................................
	    }
	    else {
		(void) printf("%-8.8s", gi->name);
	    }
	    break;
	    
	case 'i':	/* inode number */
	    (void) printf("%6lu", buf->st_ino);
	    break;
	    
	case 'l':	/* number of links */
	    (void) printf("%3d", buf->st_nlink);
	    break;
	    
	case 'm':	/* mtime as ls date */
................................................................................
	    break;
	    
	case 'y':	/* numeric device of device where file resides */
	    (void) printf("%04x", (u_int) buf->st_dev);
	    break;
	    
	case 'z':	/* file size in bytes */
	    (void) printf("%9ld", buf->st_size);
	    break;
	    
	default:
	    (void) putc(*fp, stdout);
	    break;
	}
    }
................................................................................
			  gid_buf,
			  major(buf->st_rdev),
			  minor(buf->st_rdev),
			  ls_date(buf->st_mtime, full_date),
			  attr.graphic ? graphic(name) : name);
	}
	else {
	    (void) printf("%s%s%s%s %s %s %9ld %s %s\n",
			  ftype[ftype_index(buf->st_mode)],
			  perm[user_index(buf->st_mode)],
			  perm[group_index(buf->st_mode)],
			  perm2[all_index(buf->st_mode)],
			  uid_buf,
			  gid_buf,
			  buf->st_size,
................................................................................
			  perm[group_index(buf->st_mode)],
			  perm2[all_index(buf->st_mode)],
			  major(buf->st_rdev),
			  minor(buf->st_rdev),
			  attr.graphic ? graphic(name) : name);
	}
	else {
	    (void) printf("%s%s%s%s %9ld %s\n",
			  ftype[ftype_index(buf->st_mode)],
			  perm[user_index(buf->st_mode)],
			  perm[group_index(buf->st_mode)],
			  perm2[all_index(buf->st_mode)],
			  buf->st_size,
			  attr.graphic ? graphic(name) : name);
	}







|
<
<
<







 







|







 







|







 







|







 







|







 







|







8
9
10
11
12
13
14
15



16
17
18
19
20
21
22
...
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
...
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
...
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
...
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
...
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
 * directories.
 *
 * Global Functions: ftrw, graphic, printentry, printformat
 *
 * Static Functions: fwt1, handle_file, ls_date
 */

#define _FILE_OFFSET_BITS 64



#include <ctype.h>
#include "rh.h"
#include "rhdata.h"
#include "errmsg.h"
#include "sysinfo.h"

#define user_index(b)	((000777 & (b)) >> 6) + ((b) & S_ISUID ? 8 : 0) 
................................................................................
	    
	case 'A':	/* atime in seconds */
	    (void) printf("%10lu", (u_long) buf->st_atime);
	    break;

#if BSD
	case 'b':	/* number blocks allocated to file */
	    (void) printf("%10lld", buf->st_blocks);
	    break;
	    
	case 'B':	/* optimal block size for file system i/o */
	    (void) printf("%6ld", buf->st_blksize);
	    break;
#endif
	    
................................................................................
	    }
	    else {
		(void) printf("%-8.8s", gi->name);
	    }
	    break;
	    
	case 'i':	/* inode number */
	    (void) printf("%6llu", buf->st_ino);
	    break;
	    
	case 'l':	/* number of links */
	    (void) printf("%3d", buf->st_nlink);
	    break;
	    
	case 'm':	/* mtime as ls date */
................................................................................
	    break;
	    
	case 'y':	/* numeric device of device where file resides */
	    (void) printf("%04x", (u_int) buf->st_dev);
	    break;
	    
	case 'z':	/* file size in bytes */
	    (void) printf("%9lld", buf->st_size);
	    break;
	    
	default:
	    (void) putc(*fp, stdout);
	    break;
	}
    }
................................................................................
			  gid_buf,
			  major(buf->st_rdev),
			  minor(buf->st_rdev),
			  ls_date(buf->st_mtime, full_date),
			  attr.graphic ? graphic(name) : name);
	}
	else {
	    (void) printf("%s%s%s%s %s %s %9lld %s %s\n",
			  ftype[ftype_index(buf->st_mode)],
			  perm[user_index(buf->st_mode)],
			  perm[group_index(buf->st_mode)],
			  perm2[all_index(buf->st_mode)],
			  uid_buf,
			  gid_buf,
			  buf->st_size,
................................................................................
			  perm[group_index(buf->st_mode)],
			  perm2[all_index(buf->st_mode)],
			  major(buf->st_rdev),
			  minor(buf->st_rdev),
			  attr.graphic ? graphic(name) : name);
	}
	else {
	    (void) printf("%s%s%s%s %9lld %s\n",
			  ftype[ftype_index(buf->st_mode)],
			  perm[user_index(buf->st_mode)],
			  perm[group_index(buf->st_mode)],
			  perm2[all_index(buf->st_mode)],
			  buf->st_size,
			  attr.graphic ? graphic(name) : name);
	}

Changes to rhlex.c.

180
181
182
183
184
185
186







187

188
189
190
191
192
193
194
...
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
...
674
675
676
677
678
679
680
681
682
683
684
685

686
687
688
689
690
691
692
...
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
...
851
852
853
854
855
856
857




858

859
860
861
862
863
864
865
...
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
....
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
....
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
....
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
....
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
....
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
....
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
....
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
....
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
....
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
....
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
....
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
....
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE yyrestart(yyin  )

#define YY_END_OF_BUFFER_CHAR 0

/* Size of default input buffer. */
#ifndef YY_BUF_SIZE







#define YY_BUF_SIZE 16384

#endif

/* The state buf must be large enough to hold one state per character in the main buffer.
 */
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

#ifndef YY_TYPEDEF_YY_BUFFER_STATE
................................................................................
static char *yy_last_accepting_cpos;

extern int yy_flex_debug;
int yy_flex_debug = 1;

static yyconst flex_int16_t yy_rule_linenum[70] =
    {   0,
       80,   90,  102,  148,  158,  160,  162,  164,  166,  178,
      180,  182,  184,  206,  216,  218,  220,  222,  235,  245,
      247,  249,  251,  268,  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,  307,  313,  328,  334,  349,  388,  394,  400,
      405,  411,  426,  434,  436,  442,  460,  466,  468
    } ;

/* The intent behind this definition is that it'll catch
 * any uses of REJECT which flex missed.
 */
#define REJECT reject_used_but_not_detected
static int yy_more_flag = 0;
................................................................................
#line 4 "rhlex.l"

/*
 * rhlex.l
 *
 * Written by:	Rick Ohnemus	(rick@sterling.com)
 */

#if !defined(lint)
static char rcsid[] = "$Id: rhlex.l,v 1.1 1994/01/12 19:39:35 rick Exp $";
#endif


#include <memory.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/timeb.h>
#include <errno.h>

#if defined(DEBUG)
................................................................................







#line 742 "<stdout>"

#define INITIAL 0
#define COMMENT 1
#define DATE_SPEC 2
#define FILE_NAME 3
#define FILE_TIME 4
#define FIRST_LINE 5
................................................................................

/* %if-c-only */

/* %endif */

/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE




#define YY_READ_BUF_SIZE 8192

#endif

/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* %if-c-only Standard (non-C++) definition */
/* This used to be an fputs(), but since the string might contain NUL's,
 * we now use fwrite().
................................................................................
YY_DECL
{
	register yy_state_type yy_current_state;
	register char *yy_cp, *yy_bp;
	register int yy_act;
    
/* %% [7.0] user's declarations go here */
#line 73 "rhlex.l"


    if (First_line) {
	BEGIN(FIRST_LINE);
	First_line = 0;
    }

#line 998 "<stdout>"

	if ( !(yy_init) )
		{
		(yy_init) = 1;

#ifdef YY_USER_INIT
		YY_USER_INIT;
................................................................................
			*yy_cp = (yy_hold_char);
			yy_cp = (yy_last_accepting_cpos);
			yy_current_state = (yy_last_accepting_state);
			goto yy_find_action;

case 1:
YY_RULE_SETUP
#line 80 "rhlex.l"
{
			    Line = ALLOCATE(yyleng + 1);
			    (void) strcpy(Line, yytext);
			    Line_len = yyleng;
			    Line_num = 1;
			    Line_pos = 0;
			    BEGIN(INITIAL);
			    yyless(0);
			}
	YY_BREAK
case 2:
/* rule 2 can match eol */
YY_RULE_SETUP
#line 90 "rhlex.l"
{
			    Line = ALLOCATE(81);
			    *Line = '\0';
			    Line_len = 80;
			    Line_num = 1;
			    Line_pos = 0;
			    BEGIN(INITIAL);
			    yyless(0);
			}
	YY_BREAK
case YY_STATE_EOF(FIRST_LINE):
#line 100 "rhlex.l"
{ yyterminate(); }
	YY_BREAK
case 3:
YY_RULE_SETUP
#line 102 "rhlex.l"
{
			    int adjustment = 0;
			    int len;
			    int lp;
			    char *from;
			    char *to;

................................................................................
			    BEGIN(OldSC);
			    yyless(0);
			}
	YY_BREAK
case 4:
/* rule 4 can match eol */
YY_RULE_SETUP
#line 148 "rhlex.l"
{ *Line = '\0'; Line_num++; Line_pos = 0; }
	YY_BREAK
case YY_STATE_EOF(NEW_LINE):
#line 150 "rhlex.l"
{
			    if (OldSC == COMMENT) {
				lex_error(Start_line, Start_line_num,
					  "unterminated comment");
			    }
			    yyterminate();
			}
	YY_BREAK
case 5:
YY_RULE_SETUP
#line 158 "rhlex.l"
{ Line_pos += yyleng; }
	YY_BREAK
case 6:
/* rule 6 can match eol */
YY_RULE_SETUP
#line 160 "rhlex.l"
{ OldSC = COMMENT; BEGIN(NEW_LINE); }
	YY_BREAK
case 7:
YY_RULE_SETUP
#line 162 "rhlex.l"
{ Line_pos += yyleng; }
	YY_BREAK
case 8:
/* rule 8 can match eol */
YY_RULE_SETUP
#line 164 "rhlex.l"
{ OldSC = COMMENT; BEGIN(NEW_LINE); }
	YY_BREAK
case 9:
YY_RULE_SETUP
#line 166 "rhlex.l"
{
			    Line_pos += yyleng;
			    free(Start_line);
			    Start_line = (char *) NULL;
			    BEGIN(INITIAL);
			}
	YY_BREAK
case YY_STATE_EOF(COMMENT):
#line 173 "rhlex.l"
{
			    lex_error(Start_line, Start_line_num,
				      "unterminated comment");
			}
	YY_BREAK
case 10:
YY_RULE_SETUP
#line 178 "rhlex.l"
{ yymore(); }
	YY_BREAK
case 11:
YY_RULE_SETUP
#line 180 "rhlex.l"
{ yymore(); }
	YY_BREAK
case 12:
YY_RULE_SETUP
#line 182 "rhlex.l"
{ yymore(); }
	YY_BREAK
case 13:
YY_RULE_SETUP
#line 184 "rhlex.l"
{
			    char *date_str;

			    if (yyleng == 1) {
				lex_error(Line, Line_num,
					  "empty date specification");
			    }
................................................................................
			    BEGIN(INITIAL);
			    return DATESPEC;
			}
	YY_BREAK
case 14:
/* rule 14 can match eol */
YY_RULE_SETUP
#line 206 "rhlex.l"
{
			    lex_error(Line, Line_num,
				      "unterminated date specification");
			}
	YY_BREAK
case YY_STATE_EOF(DATE_SPEC):
#line 211 "rhlex.l"
{
			    lex_error(Line, Line_num,
				      "unterminated date specification");
			}
	YY_BREAK
case 15:
YY_RULE_SETUP
#line 216 "rhlex.l"
{ yymore(); }
	YY_BREAK
case 16:
YY_RULE_SETUP
#line 218 "rhlex.l"
{ yymore(); }
	YY_BREAK
case 17:
YY_RULE_SETUP
#line 220 "rhlex.l"
{ yymore(); }
	YY_BREAK
case 18:
YY_RULE_SETUP
#line 222 "rhlex.l"
{
			    if (yyleng == 1) {
				lex_error(Line, Line_num,
					  "empty file name pattern");
			    }
			    Line_pos += yyleng;
			    rh_lval.str = SAVESTR(yytext);
................................................................................
			    remove_escapes(rh_lval.str);
			    return FILENAME_PATTERN;
			}
	YY_BREAK
case 19:
/* rule 19 can match eol */
YY_RULE_SETUP
#line 235 "rhlex.l"
{
			    lex_error(Line, Line_num,
				      "unterminated file name pattern");
			}
	YY_BREAK
case YY_STATE_EOF(FILE_NAME):
#line 240 "rhlex.l"
{
			    lex_error(Line, Line_num,
				      "unterminated file name pattern");
			}
	YY_BREAK
case 20:
YY_RULE_SETUP
#line 245 "rhlex.l"
{ yymore(); }
	YY_BREAK
case 21:
YY_RULE_SETUP
#line 247 "rhlex.l"
{ yymore(); }
	YY_BREAK
case 22:
YY_RULE_SETUP
#line 249 "rhlex.l"
{ yymore(); }
	YY_BREAK
case 23:
YY_RULE_SETUP
#line 251 "rhlex.l"
{
			    char *ftspec;

			    if (yyleng == 1) {
				lex_error(Line, Line_num,
					  "empty file time operator");
			    }
................................................................................
			    BEGIN(INITIAL);
			    return FILETIME_FIELD;
			}
	YY_BREAK
case 24:
/* rule 24 can match eol */
YY_RULE_SETUP
#line 268 "rhlex.l"
{
			    lex_error(Line, Line_num,
				      "unterminated file time operator");
			}
	YY_BREAK
case YY_STATE_EOF(FILE_TIME):
#line 273 "rhlex.l"
{
			    lex_error(Line, Line_num,
				      "unterminated file time operator");
			}
	YY_BREAK
case 25:
YY_RULE_SETUP
#line 278 "rhlex.l"
{ Line_pos += yyleng; return '!'; }
	YY_BREAK
case 26:
YY_RULE_SETUP
#line 279 "rhlex.l"
{ Line_pos += yyleng; return NE; }
	YY_BREAK
case 27:
YY_RULE_SETUP
#line 280 "rhlex.l"
{ Line_pos += yyleng; return '%'; }
	YY_BREAK
case 28:
YY_RULE_SETUP
#line 281 "rhlex.l"
{ Line_pos += yyleng; return '&'; }
	YY_BREAK
case 29:
YY_RULE_SETUP
#line 282 "rhlex.l"
{ Line_pos += yyleng; return LOGAND; }
	YY_BREAK
case 30:
YY_RULE_SETUP
#line 283 "rhlex.l"
{ Line_pos += yyleng; return '('; }
	YY_BREAK
case 31:
YY_RULE_SETUP
#line 284 "rhlex.l"
{ Line_pos += yyleng; return ')'; }
	YY_BREAK
case 32:
YY_RULE_SETUP
#line 285 "rhlex.l"
{ Line_pos += yyleng; return '*'; }
	YY_BREAK
case 33:
YY_RULE_SETUP
#line 286 "rhlex.l"
{ Line_pos += yyleng; return '+'; }
	YY_BREAK
case 34:
YY_RULE_SETUP
#line 287 "rhlex.l"
{ Line_pos += yyleng; return ','; }
	YY_BREAK
case 35:
YY_RULE_SETUP
#line 288 "rhlex.l"
{ Line_pos += yyleng; return '-'; }
	YY_BREAK
case 36:
YY_RULE_SETUP
#line 289 "rhlex.l"
{ Line_pos += yyleng; return '/'; }
	YY_BREAK
case 37:
YY_RULE_SETUP
#line 290 "rhlex.l"
{ Line_pos += yyleng; return ':'; }
	YY_BREAK
case 38:
YY_RULE_SETUP
#line 291 "rhlex.l"
{ Line_pos += yyleng; return ';'; }
	YY_BREAK
case 39:
YY_RULE_SETUP
#line 292 "rhlex.l"
{ Line_pos += yyleng; return '<'; }
	YY_BREAK
case 40:
YY_RULE_SETUP
#line 293 "rhlex.l"
{ Line_pos += yyleng; return LSHIFT; }
	YY_BREAK
case 41:
YY_RULE_SETUP
#line 294 "rhlex.l"
{ Line_pos += yyleng; return LE; }
	YY_BREAK
case 42:
YY_RULE_SETUP
#line 295 "rhlex.l"
{ Line_pos += yyleng; return EQ; }
	YY_BREAK
case 43:
YY_RULE_SETUP
#line 296 "rhlex.l"
{ Line_pos += yyleng; return '>'; }
	YY_BREAK
case 44:
YY_RULE_SETUP
#line 297 "rhlex.l"
{ Line_pos += yyleng; return GE; }
	YY_BREAK
case 45:
YY_RULE_SETUP
#line 298 "rhlex.l"
{ Line_pos += yyleng; return RSHIFT; }
	YY_BREAK
case 46:
YY_RULE_SETUP
#line 299 "rhlex.l"
{ Line_pos += yyleng; return '?'; }
	YY_BREAK
case 47:
YY_RULE_SETUP
#line 300 "rhlex.l"
{ Line_pos += yyleng; return '^'; }
	YY_BREAK
case 48:
YY_RULE_SETUP
#line 301 "rhlex.l"
{ Line_pos += yyleng; return '{'; }
	YY_BREAK
case 49:
YY_RULE_SETUP
#line 302 "rhlex.l"
{ Line_pos += yyleng; return '|'; }
	YY_BREAK
case 50:
YY_RULE_SETUP
#line 303 "rhlex.l"
{ Line_pos += yyleng; return LOGOR; }
	YY_BREAK
case 51:
YY_RULE_SETUP
#line 304 "rhlex.l"
{ Line_pos += yyleng; return '}'; }
	YY_BREAK
case 52:
YY_RULE_SETUP
#line 305 "rhlex.l"
{ Line_pos += yyleng; return '~'; }
	YY_BREAK
case 53:
YY_RULE_SETUP
#line 307 "rhlex.l"
{
			    Line_pos += yyleng;
			    rh_lval.value = getuid();
			    return NUMBER;
			}
	YY_BREAK
case 54:
YY_RULE_SETUP
#line 313 "rhlex.l"
{
			    user_info *uip;

			    Line_pos += yyleng;
			    if (yyleng == 1) {
				rh_error("user name missing");
			    }
................................................................................
			    }
			    rh_lval.value = uip->uid;
			    return NUMBER;
			}
	YY_BREAK
case 55:
YY_RULE_SETUP
#line 328 "rhlex.l"
{
			    Line_pos += yyleng;
			    rh_lval.value = getgid();
			    return NUMBER;
			}
	YY_BREAK
case 56:
YY_RULE_SETUP
#line 334 "rhlex.l"
{
			    group_info *gip;

			    Line_pos += yyleng;
			    if (yyleng == 1) {
				rh_error("group name missing");
			    }
................................................................................
			    }
			    rh_lval.value = gip->gid;
			    return NUMBER;
			}
	YY_BREAK
case 57:
YY_RULE_SETUP
#line 349 "rhlex.l"
{
			    char *end;

			    Line_pos += yyleng;
			    rh_lval.value = strtol(yytext, &end, 10);

			    switch (*end) {
................................................................................
				break;
			    }
			    return NUMBER;
			}
	YY_BREAK
case 58:
YY_RULE_SETUP
#line 388 "rhlex.l"
{
			    Line_pos += yyleng;
			    rh_lval.value = strtol(yytext, (char **) NULL, 0);
			    return NUMBER;
			}
	YY_BREAK
case 59:
YY_RULE_SETUP
#line 394 "rhlex.l"
{
			    Line_pos += yyleng;
			    rh_lval.value = strtol(yytext, (char **) NULL, 0);
			    return NUMBER;
			}
	YY_BREAK
case 60:
YY_RULE_SETUP
#line 400 "rhlex.l"
{
			    Line_pos += yyleng;
			    return lookup(yytext);
			}
	YY_BREAK
case 61:
YY_RULE_SETUP
#line 405 "rhlex.l"
{
			    Start_line_pos = Line_pos + 1;
			    Line_pos += yyleng;
			    BEGIN(FILE_NAME);
			}
	YY_BREAK
case 62:
YY_RULE_SETUP
#line 411 "rhlex.l"
{
			    char *p;

			    Start_line_pos = Line_pos + 1;
			    for (p = yytext; *p != '\0'; p++) {
				if (*p == '\t') {
				    Line_pos += (8 - (Line_pos + 1) % 8);
................................................................................
				}
			    }
			    BEGIN(DATE_SPEC);
			}
	YY_BREAK
case 63:
YY_RULE_SETUP
#line 426 "rhlex.l"
{
			    Start_line_pos = Line_pos + 1;
			    Start_line_num = Line_num;
			    Start_line = SAVESTR(Line);
			    Line_pos += yyleng;
			    BEGIN(COMMENT);
			}
	YY_BREAK
case 64:
YY_RULE_SETUP
#line 434 "rhlex.l"
{ }	/* simple comment - ignore to end of line */
	YY_BREAK
case 65:
YY_RULE_SETUP
#line 436 "rhlex.l"
{
			    Line_pos += yyleng;
			    rh_lval.str = SAVESTR(yytext);
			    return FSTYPE;
			}
	YY_BREAK
case 66:
YY_RULE_SETUP
#line 442 "rhlex.l"
{			/* ignore white space */
			    char *p;

			    for (p = yytext; *p != '\0'; p++) {
				if (*p == '\f') {
				    Line_num++;
				    Line_pos = 0;
................................................................................
				    Line_pos += (8 - (Line_pos + 1) % 8);
				}
			    }
			}
	YY_BREAK
case 67:
YY_RULE_SETUP
#line 460 "rhlex.l"
{
			    Start_line_pos = Line_pos + 1;
			    Line_pos += yyleng;
			    BEGIN(FILE_TIME);
			}
	YY_BREAK
case 68:
/* rule 68 can match eol */
YY_RULE_SETUP
#line 466 "rhlex.l"
{ OldSC = INITIAL; BEGIN(NEW_LINE); }
	YY_BREAK
case 69:
YY_RULE_SETUP
#line 468 "rhlex.l"
{ Line_pos += yyleng; return yytext[0]; }
	YY_BREAK
case YY_STATE_EOF(INITIAL):
#line 470 "rhlex.l"
{ yyterminate(); }
	YY_BREAK
case 70:
YY_RULE_SETUP
#line 472 "rhlex.l"
YY_FATAL_ERROR( "flex scanner jammed" );
	YY_BREAK
#line 1771 "<stdout>"

	case YY_END_OF_BUFFER:
		{
		/* Amount of text matched not including the EOB char. */
		int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;

		/* Undo the effects of YY_DO_BEFORE_ACTION. */
................................................................................
	return yy_scan_bytes(yystr,strlen(yystr) );
}
/* %endif */

/* %if-c-only */
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
 * scan from a @e copy of @a bytes.
 * @param bytes the byte buffer to scan
 * @param len the number of bytes in the buffer pointed to by @a bytes.
 * 
 * @return the newly allocated buffer state object.
 */
YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
{
	YY_BUFFER_STATE b;
	char *buf;
................................................................................
/* %if-tables-serialization definitions */
/* %define-yytables   The name for this specific scanner's tables. */
#define YYTABLES_NAME "yytables"
/* %endif */

/* %ok-for-header */

#line 472 "rhlex.l"


 
static void lex_error(const char *line, int line_num, const char *msg)
{
    (void) fprintf(stderr, "%s: %s: %d: %s\n",
		   Program_name, Input_name, line_num, msg);







>
>
>
>
>
>
>

>







 







|
|
|
|
|
|
|







 







<
<
<
<
<
>







 







|







 







>
>
>
>

>







 







|







|







 







|













|











|




|







 







|



|










|





|




|





|




|








|







|




|




|




|







 







|






|







|




|




|




|







 







|






|







|




|




|




|







 







|






|







|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|








|







 







|








|







 







|







 







|








|








|







|








|







 







|










|




|








|







 







|









|




|



|




|


|







 







|
|







 







|







180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
...
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
...
682
683
684
685
686
687
688





689
690
691
692
693
694
695
696
...
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
...
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
...
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
....
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
....
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
....
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
....
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
....
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
....
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
....
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
....
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
....
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
....
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
....
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
....
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE yyrestart(yyin  )

#define YY_END_OF_BUFFER_CHAR 0

/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k.
 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
 * Ditto for the __ia64__ case accordingly.
 */
#define YY_BUF_SIZE 32768
#else
#define YY_BUF_SIZE 16384
#endif /* __ia64__ */
#endif

/* The state buf must be large enough to hold one state per character in the main buffer.
 */
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

#ifndef YY_TYPEDEF_YY_BUFFER_STATE
................................................................................
static char *yy_last_accepting_cpos;

extern int yy_flex_debug;
int yy_flex_debug = 1;

static yyconst flex_int16_t yy_rule_linenum[70] =
    {   0,
       76,   86,   98,  144,  154,  156,  158,  160,  162,  174,
      176,  178,  180,  202,  212,  214,  216,  218,  231,  241,
      243,  245,  247,  264,  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,  303,  309,  324,  330,  345,  384,  390,  396,
      401,  407,  422,  430,  432,  438,  456,  462,  464
    } ;

/* The intent behind this definition is that it'll catch
 * any uses of REJECT which flex missed.
 */
#define REJECT reject_used_but_not_detected
static int yy_more_flag = 0;
................................................................................
#line 4 "rhlex.l"

/*
 * rhlex.l
 *
 * Written by:	Rick Ohnemus	(rick@sterling.com)
 */





#define _FILE_OFFSET_BITS 64
#include <memory.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/timeb.h>
#include <errno.h>

#if defined(DEBUG)
................................................................................







#line 746 "<stdout>"

#define INITIAL 0
#define COMMENT 1
#define DATE_SPEC 2
#define FILE_NAME 3
#define FILE_TIME 4
#define FIRST_LINE 5
................................................................................

/* %if-c-only */

/* %endif */

/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k */
#define YY_READ_BUF_SIZE 16384
#else
#define YY_READ_BUF_SIZE 8192
#endif /* __ia64__ */
#endif

/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* %if-c-only Standard (non-C++) definition */
/* This used to be an fputs(), but since the string might contain NUL's,
 * we now use fwrite().
................................................................................
YY_DECL
{
	register yy_state_type yy_current_state;
	register char *yy_cp, *yy_bp;
	register int yy_act;
    
/* %% [7.0] user's declarations go here */
#line 69 "rhlex.l"


    if (First_line) {
	BEGIN(FIRST_LINE);
	First_line = 0;
    }

#line 1007 "<stdout>"

	if ( !(yy_init) )
		{
		(yy_init) = 1;

#ifdef YY_USER_INIT
		YY_USER_INIT;
................................................................................
			*yy_cp = (yy_hold_char);
			yy_cp = (yy_last_accepting_cpos);
			yy_current_state = (yy_last_accepting_state);
			goto yy_find_action;

case 1:
YY_RULE_SETUP
#line 76 "rhlex.l"
{
			    Line = ALLOCATE(yyleng + 1);
			    (void) strcpy(Line, yytext);
			    Line_len = yyleng;
			    Line_num = 1;
			    Line_pos = 0;
			    BEGIN(INITIAL);
			    yyless(0);
			}
	YY_BREAK
case 2:
/* rule 2 can match eol */
YY_RULE_SETUP
#line 86 "rhlex.l"
{
			    Line = ALLOCATE(81);
			    *Line = '\0';
			    Line_len = 80;
			    Line_num = 1;
			    Line_pos = 0;
			    BEGIN(INITIAL);
			    yyless(0);
			}
	YY_BREAK
case YY_STATE_EOF(FIRST_LINE):
#line 96 "rhlex.l"
{ yyterminate(); }
	YY_BREAK
case 3:
YY_RULE_SETUP
#line 98 "rhlex.l"
{
			    int adjustment = 0;
			    int len;
			    int lp;
			    char *from;
			    char *to;

................................................................................
			    BEGIN(OldSC);
			    yyless(0);
			}
	YY_BREAK
case 4:
/* rule 4 can match eol */
YY_RULE_SETUP
#line 144 "rhlex.l"
{ *Line = '\0'; Line_num++; Line_pos = 0; }
	YY_BREAK
case YY_STATE_EOF(NEW_LINE):
#line 146 "rhlex.l"
{
			    if (OldSC == COMMENT) {
				lex_error(Start_line, Start_line_num,
					  "unterminated comment");
			    }
			    yyterminate();
			}
	YY_BREAK
case 5:
YY_RULE_SETUP
#line 154 "rhlex.l"
{ Line_pos += yyleng; }
	YY_BREAK
case 6:
/* rule 6 can match eol */
YY_RULE_SETUP
#line 156 "rhlex.l"
{ OldSC = COMMENT; BEGIN(NEW_LINE); }
	YY_BREAK
case 7:
YY_RULE_SETUP
#line 158 "rhlex.l"
{ Line_pos += yyleng; }
	YY_BREAK
case 8:
/* rule 8 can match eol */
YY_RULE_SETUP
#line 160 "rhlex.l"
{ OldSC = COMMENT; BEGIN(NEW_LINE); }
	YY_BREAK
case 9:
YY_RULE_SETUP
#line 162 "rhlex.l"
{
			    Line_pos += yyleng;
			    free(Start_line);
			    Start_line = (char *) NULL;
			    BEGIN(INITIAL);
			}
	YY_BREAK
case YY_STATE_EOF(COMMENT):
#line 169 "rhlex.l"
{
			    lex_error(Start_line, Start_line_num,
				      "unterminated comment");
			}
	YY_BREAK
case 10:
YY_RULE_SETUP
#line 174 "rhlex.l"
{ yymore(); }
	YY_BREAK
case 11:
YY_RULE_SETUP
#line 176 "rhlex.l"
{ yymore(); }
	YY_BREAK
case 12:
YY_RULE_SETUP
#line 178 "rhlex.l"
{ yymore(); }
	YY_BREAK
case 13:
YY_RULE_SETUP
#line 180 "rhlex.l"
{
			    char *date_str;

			    if (yyleng == 1) {
				lex_error(Line, Line_num,
					  "empty date specification");
			    }
................................................................................
			    BEGIN(INITIAL);
			    return DATESPEC;
			}
	YY_BREAK
case 14:
/* rule 14 can match eol */
YY_RULE_SETUP
#line 202 "rhlex.l"
{
			    lex_error(Line, Line_num,
				      "unterminated date specification");
			}
	YY_BREAK
case YY_STATE_EOF(DATE_SPEC):
#line 207 "rhlex.l"
{
			    lex_error(Line, Line_num,
				      "unterminated date specification");
			}
	YY_BREAK
case 15:
YY_RULE_SETUP
#line 212 "rhlex.l"
{ yymore(); }
	YY_BREAK
case 16:
YY_RULE_SETUP
#line 214 "rhlex.l"
{ yymore(); }
	YY_BREAK
case 17:
YY_RULE_SETUP
#line 216 "rhlex.l"
{ yymore(); }
	YY_BREAK
case 18:
YY_RULE_SETUP
#line 218 "rhlex.l"
{
			    if (yyleng == 1) {
				lex_error(Line, Line_num,
					  "empty file name pattern");
			    }
			    Line_pos += yyleng;
			    rh_lval.str = SAVESTR(yytext);
................................................................................
			    remove_escapes(rh_lval.str);
			    return FILENAME_PATTERN;
			}
	YY_BREAK
case 19:
/* rule 19 can match eol */
YY_RULE_SETUP
#line 231 "rhlex.l"
{
			    lex_error(Line, Line_num,
				      "unterminated file name pattern");
			}
	YY_BREAK
case YY_STATE_EOF(FILE_NAME):
#line 236 "rhlex.l"
{
			    lex_error(Line, Line_num,
				      "unterminated file name pattern");
			}
	YY_BREAK
case 20:
YY_RULE_SETUP
#line 241 "rhlex.l"
{ yymore(); }
	YY_BREAK
case 21:
YY_RULE_SETUP
#line 243 "rhlex.l"
{ yymore(); }
	YY_BREAK
case 22:
YY_RULE_SETUP
#line 245 "rhlex.l"
{ yymore(); }
	YY_BREAK
case 23:
YY_RULE_SETUP
#line 247 "rhlex.l"
{
			    char *ftspec;

			    if (yyleng == 1) {
				lex_error(Line, Line_num,
					  "empty file time operator");
			    }
................................................................................
			    BEGIN(INITIAL);
			    return FILETIME_FIELD;
			}
	YY_BREAK
case 24:
/* rule 24 can match eol */
YY_RULE_SETUP
#line 264 "rhlex.l"
{
			    lex_error(Line, Line_num,
				      "unterminated file time operator");
			}
	YY_BREAK
case YY_STATE_EOF(FILE_TIME):
#line 269 "rhlex.l"
{
			    lex_error(Line, Line_num,
				      "unterminated file time operator");
			}
	YY_BREAK
case 25:
YY_RULE_SETUP
#line 274 "rhlex.l"
{ Line_pos += yyleng; return '!'; }
	YY_BREAK
case 26:
YY_RULE_SETUP
#line 275 "rhlex.l"
{ Line_pos += yyleng; return NE; }
	YY_BREAK
case 27:
YY_RULE_SETUP
#line 276 "rhlex.l"
{ Line_pos += yyleng; return '%'; }
	YY_BREAK
case 28:
YY_RULE_SETUP
#line 277 "rhlex.l"
{ Line_pos += yyleng; return '&'; }
	YY_BREAK
case 29:
YY_RULE_SETUP
#line 278 "rhlex.l"
{ Line_pos += yyleng; return LOGAND; }
	YY_BREAK
case 30:
YY_RULE_SETUP
#line 279 "rhlex.l"
{ Line_pos += yyleng; return '('; }
	YY_BREAK
case 31:
YY_RULE_SETUP
#line 280 "rhlex.l"
{ Line_pos += yyleng; return ')'; }
	YY_BREAK
case 32:
YY_RULE_SETUP
#line 281 "rhlex.l"
{ Line_pos += yyleng; return '*'; }
	YY_BREAK
case 33:
YY_RULE_SETUP
#line 282 "rhlex.l"
{ Line_pos += yyleng; return '+'; }
	YY_BREAK
case 34:
YY_RULE_SETUP
#line 283 "rhlex.l"
{ Line_pos += yyleng; return ','; }
	YY_BREAK
case 35:
YY_RULE_SETUP
#line 284 "rhlex.l"
{ Line_pos += yyleng; return '-'; }
	YY_BREAK
case 36:
YY_RULE_SETUP
#line 285 "rhlex.l"
{ Line_pos += yyleng; return '/'; }
	YY_BREAK
case 37:
YY_RULE_SETUP
#line 286 "rhlex.l"
{ Line_pos += yyleng; return ':'; }
	YY_BREAK
case 38:
YY_RULE_SETUP
#line 287 "rhlex.l"
{ Line_pos += yyleng; return ';'; }
	YY_BREAK
case 39:
YY_RULE_SETUP
#line 288 "rhlex.l"
{ Line_pos += yyleng; return '<'; }
	YY_BREAK
case 40:
YY_RULE_SETUP
#line 289 "rhlex.l"
{ Line_pos += yyleng; return LSHIFT; }
	YY_BREAK
case 41:
YY_RULE_SETUP
#line 290 "rhlex.l"
{ Line_pos += yyleng; return LE; }
	YY_BREAK
case 42:
YY_RULE_SETUP
#line 291 "rhlex.l"
{ Line_pos += yyleng; return EQ; }
	YY_BREAK
case 43:
YY_RULE_SETUP
#line 292 "rhlex.l"
{ Line_pos += yyleng; return '>'; }
	YY_BREAK
case 44:
YY_RULE_SETUP
#line 293 "rhlex.l"
{ Line_pos += yyleng; return GE; }
	YY_BREAK
case 45:
YY_RULE_SETUP
#line 294 "rhlex.l"
{ Line_pos += yyleng; return RSHIFT; }
	YY_BREAK
case 46:
YY_RULE_SETUP
#line 295 "rhlex.l"
{ Line_pos += yyleng; return '?'; }
	YY_BREAK
case 47:
YY_RULE_SETUP
#line 296 "rhlex.l"
{ Line_pos += yyleng; return '^'; }
	YY_BREAK
case 48:
YY_RULE_SETUP
#line 297 "rhlex.l"
{ Line_pos += yyleng; return '{'; }
	YY_BREAK
case 49:
YY_RULE_SETUP
#line 298 "rhlex.l"
{ Line_pos += yyleng; return '|'; }
	YY_BREAK
case 50:
YY_RULE_SETUP
#line 299 "rhlex.l"
{ Line_pos += yyleng; return LOGOR; }
	YY_BREAK
case 51:
YY_RULE_SETUP
#line 300 "rhlex.l"
{ Line_pos += yyleng; return '}'; }
	YY_BREAK
case 52:
YY_RULE_SETUP
#line 301 "rhlex.l"
{ Line_pos += yyleng; return '~'; }
	YY_BREAK
case 53:
YY_RULE_SETUP
#line 303 "rhlex.l"
{
			    Line_pos += yyleng;
			    rh_lval.value = getuid();
			    return NUMBER;
			}
	YY_BREAK
case 54:
YY_RULE_SETUP
#line 309 "rhlex.l"
{
			    user_info *uip;

			    Line_pos += yyleng;
			    if (yyleng == 1) {
				rh_error("user name missing");
			    }
................................................................................
			    }
			    rh_lval.value = uip->uid;
			    return NUMBER;
			}
	YY_BREAK
case 55:
YY_RULE_SETUP
#line 324 "rhlex.l"
{
			    Line_pos += yyleng;
			    rh_lval.value = getgid();
			    return NUMBER;
			}
	YY_BREAK
case 56:
YY_RULE_SETUP
#line 330 "rhlex.l"
{
			    group_info *gip;

			    Line_pos += yyleng;
			    if (yyleng == 1) {
				rh_error("group name missing");
			    }
................................................................................
			    }
			    rh_lval.value = gip->gid;
			    return NUMBER;
			}
	YY_BREAK
case 57:
YY_RULE_SETUP
#line 345 "rhlex.l"
{
			    char *end;

			    Line_pos += yyleng;
			    rh_lval.value = strtol(yytext, &end, 10);

			    switch (*end) {
................................................................................
				break;
			    }
			    return NUMBER;
			}
	YY_BREAK
case 58:
YY_RULE_SETUP
#line 384 "rhlex.l"
{
			    Line_pos += yyleng;
			    rh_lval.value = strtol(yytext, (char **) NULL, 0);
			    return NUMBER;
			}
	YY_BREAK
case 59:
YY_RULE_SETUP
#line 390 "rhlex.l"
{
			    Line_pos += yyleng;
			    rh_lval.value = strtol(yytext, (char **) NULL, 0);
			    return NUMBER;
			}
	YY_BREAK
case 60:
YY_RULE_SETUP
#line 396 "rhlex.l"
{
			    Line_pos += yyleng;
			    return lookup(yytext);
			}
	YY_BREAK
case 61:
YY_RULE_SETUP
#line 401 "rhlex.l"
{
			    Start_line_pos = Line_pos + 1;
			    Line_pos += yyleng;
			    BEGIN(FILE_NAME);
			}
	YY_BREAK
case 62:
YY_RULE_SETUP
#line 407 "rhlex.l"
{
			    char *p;

			    Start_line_pos = Line_pos + 1;
			    for (p = yytext; *p != '\0'; p++) {
				if (*p == '\t') {
				    Line_pos += (8 - (Line_pos + 1) % 8);
................................................................................
				}
			    }
			    BEGIN(DATE_SPEC);
			}
	YY_BREAK
case 63:
YY_RULE_SETUP
#line 422 "rhlex.l"
{
			    Start_line_pos = Line_pos + 1;
			    Start_line_num = Line_num;
			    Start_line = SAVESTR(Line);
			    Line_pos += yyleng;
			    BEGIN(COMMENT);
			}
	YY_BREAK
case 64:
YY_RULE_SETUP
#line 430 "rhlex.l"
{ }	/* simple comment - ignore to end of line */
	YY_BREAK
case 65:
YY_RULE_SETUP
#line 432 "rhlex.l"
{
			    Line_pos += yyleng;
			    rh_lval.str = SAVESTR(yytext);
			    return FSTYPE;
			}
	YY_BREAK
case 66:
YY_RULE_SETUP
#line 438 "rhlex.l"
{			/* ignore white space */
			    char *p;

			    for (p = yytext; *p != '\0'; p++) {
				if (*p == '\f') {
				    Line_num++;
				    Line_pos = 0;
................................................................................
				    Line_pos += (8 - (Line_pos + 1) % 8);
				}
			    }
			}
	YY_BREAK
case 67:
YY_RULE_SETUP
#line 456 "rhlex.l"
{
			    Start_line_pos = Line_pos + 1;
			    Line_pos += yyleng;
			    BEGIN(FILE_TIME);
			}
	YY_BREAK
case 68:
/* rule 68 can match eol */
YY_RULE_SETUP
#line 462 "rhlex.l"
{ OldSC = INITIAL; BEGIN(NEW_LINE); }
	YY_BREAK
case 69:
YY_RULE_SETUP
#line 464 "rhlex.l"
{ Line_pos += yyleng; return yytext[0]; }
	YY_BREAK
case YY_STATE_EOF(INITIAL):
#line 466 "rhlex.l"
{ yyterminate(); }
	YY_BREAK
case 70:
YY_RULE_SETUP
#line 468 "rhlex.l"
YY_FATAL_ERROR( "flex scanner jammed" );
	YY_BREAK
#line 1780 "<stdout>"

	case YY_END_OF_BUFFER:
		{
		/* Amount of text matched not including the EOB char. */
		int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;

		/* Undo the effects of YY_DO_BEFORE_ACTION. */
................................................................................
	return yy_scan_bytes(yystr,strlen(yystr) );
}
/* %endif */

/* %if-c-only */
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
 * scan from a @e copy of @a bytes.
 * @param yybytes the byte buffer to scan
 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
 * 
 * @return the newly allocated buffer state object.
 */
YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
{
	YY_BUFFER_STATE b;
	char *buf;
................................................................................
/* %if-tables-serialization definitions */
/* %define-yytables   The name for this specific scanner's tables. */
#define YYTABLES_NAME "yytables"
/* %endif */

/* %ok-for-header */

#line 468 "rhlex.l"


 
static void lex_error(const char *line, int line_num, const char *msg)
{
    (void) fprintf(stderr, "%s: %s: %d: %s\n",
		   Program_name, Input_name, line_num, msg);

Changes to rhlex.l.

3
4
5
6
7
8
9
10
11
12
13
14

15
16
17
18
19
20
21
%{

/*
 * rhlex.l
 *
 * Written by:	Rick Ohnemus	(rick@sterling.com)
 */

#if !defined(lint)
static char rcsid[] = "$Id: rhlex.l,v 1.1 1994/01/12 19:39:35 rick Exp $";
#endif


#include <memory.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/timeb.h>
#include <errno.h>

#if defined(DEBUG)







<
<
<
<
<
>







3
4
5
6
7
8
9





10
11
12
13
14
15
16
17
%{

/*
 * rhlex.l
 *
 * Written by:	Rick Ohnemus	(rick@sterling.com)
 */





#define _FILE_OFFSET_BITS 64
#include <memory.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/timeb.h>
#include <errno.h>

#if defined(DEBUG)