summaryrefslogtreecommitdiffstats
path: root/iid.c
diff options
context:
space:
mode:
Diffstat (limited to 'iid.c')
-rw-r--r--iid.c123
1 files changed, 62 insertions, 61 deletions
diff --git a/iid.c b/iid.c
index a990d6b..3a7bd36 100644
--- a/iid.c
+++ b/iid.c
@@ -42,13 +42,14 @@
Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "config.h"
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <getopt.h>
+
+#include <config.h>
#include "strxtra.h"
#if HAVE_ALLOCA
@@ -224,34 +225,34 @@ set_type * * TheSets = NULL ;
*/
int VerboseQuery ;
-int yyerror( char const * s ) ;
-void ScanInit( char * line ) ;
-int yylex( void ) ;
-int ArgListSize( id_list_type * idlp ) ;
-int SetListSize( set_type * sp ) ;
-void FlushFiles( void ) ;
-void fatal( char const * s ) ;
-int CountBits( set_type * sp ) ;
-void OneDescription( set_type * sp ) ;
-void DescribeSets( void ) ;
-id_list_type * SetList( id_list_type * idlp , set_type * sp ) ;
-void PrintSet( set_type * sp ) ;
-void FlushSets( void ) ;
-id_list_type * InitList( void ) ;
-id_list_type * ExtendList( id_list_type * idlp , id_type * idp ) ;
-void InitIid( void ) ;
-symtab_type * InstallFile( char const * fp ) ;
-void RunPager( char * pp , set_type * sp ) ;
-void AddSet( set_type * sp ) ;
-set_type * RunProg( char const * pp , id_list_type * idlp ) ;
-void SetDirectory( id_type * dir ) ;
-set_type * SetIntersect( set_type * sp1 , set_type * sp2 ) ;
-set_type * SetUnion( set_type * sp1 , set_type * sp2 ) ;
-set_type * SetInverse( set_type * sp ) ;
-void RunShell( char * pp , id_list_type * idlp ) ;
-
-
-#line 230 "./iid.y"
+int yyerror __P(( char const * s )) ;
+void ScanInit __P(( char * line )) ;
+int yylex __P(( void )) ;
+int ArgListSize __P(( id_list_type * idlp )) ;
+int SetListSize __P(( set_type * sp )) ;
+void FlushFiles __P(( void )) ;
+void fatal __P(( char const * s )) ;
+int CountBits __P(( set_type * sp )) ;
+void OneDescription __P(( set_type * sp )) ;
+void DescribeSets __P(( void )) ;
+id_list_type * SetList __P(( id_list_type * idlp , set_type * sp )) ;
+void PrintSet __P(( set_type * sp )) ;
+void FlushSets __P(( void )) ;
+id_list_type * InitList __P(( void )) ;
+id_list_type * ExtendList __P(( id_list_type * idlp , id_type * idp )) ;
+void InitIid __P(( void )) ;
+symtab_type * InstallFile __P(( char const * fp )) ;
+void RunPager __P(( char * pp , set_type * sp )) ;
+void AddSet __P(( set_type * sp )) ;
+set_type * RunProg __P(( char const * pp , id_list_type * idlp )) ;
+void SetDirectory __P(( id_type * dir )) ;
+set_type * SetIntersect __P(( set_type * sp1 , set_type * sp2 )) ;
+set_type * SetUnion __P(( set_type * sp1 , set_type * sp2 )) ;
+set_type * SetInverse __P(( set_type * sp )) ;
+void RunShell __P(( char * pp , id_list_type * idlp )) ;
+
+
+#line 231 "./iid.y"
typedef union {
set_type * setdef ;
id_type * strdef ;
@@ -343,9 +344,9 @@ static const short yyrhs[] = { 9,
#if YYDEBUG != 0
static const short yyrline[] = { 0,
- 256, 264, 265, 271, 277, 283, 289, 293, 300, 309,
- 318, 327, 334, 343, 352, 363, 370, 379, 388, 396,
- 404, 413, 422, 431, 439, 446, 452, 460, 468
+ 257, 265, 266, 272, 278, 284, 290, 294, 301, 310,
+ 319, 328, 335, 344, 353, 364, 371, 380, 389, 397,
+ 405, 414, 423, 432, 440, 447, 453, 461, 469
};
static const char * const yytname[] = { "$","error","$illegal.","SET","ID",
@@ -971,7 +972,7 @@ yyreduce:
switch (yyn) {
case 1:
-#line 258 "./iid.y"
+#line 259 "./iid.y"
{
/* cd to the directory specified as argument, flush sets */
@@ -980,7 +981,7 @@ case 1:
;
break;}
case 3:
-#line 266 "./iid.y"
+#line 267 "./iid.y"
{
/* print the list of files resulting from Query */
@@ -988,7 +989,7 @@ case 3:
;
break;}
case 4:
-#line 272 "./iid.y"
+#line 273 "./iid.y"
{
/* run PAGER on the list of files in SET */
@@ -996,7 +997,7 @@ case 4:
;
break;}
case 5:
-#line 278 "./iid.y"
+#line 279 "./iid.y"
{
/* describe sets created so far */
@@ -1004,7 +1005,7 @@ case 5:
;
break;}
case 6:
-#line 284 "./iid.y"
+#line 285 "./iid.y"
{
/* run PAGER on the help file */
@@ -1012,13 +1013,13 @@ case 6:
;
break;}
case 7:
-#line 290 "./iid.y"
+#line 291 "./iid.y"
{
exit(0) ;
;
break;}
case 8:
-#line 294 "./iid.y"
+#line 295 "./iid.y"
{
/* run the shell command and eat the results as a file set */
@@ -1027,7 +1028,7 @@ case 8:
;
break;}
case 9:
-#line 301 "./iid.y"
+#line 302 "./iid.y"
{
/* run the shell command */
@@ -1036,7 +1037,7 @@ case 9:
;
break;}
case 10:
-#line 311 "./iid.y"
+#line 312 "./iid.y"
{
/* Turn on verbose query flag */
@@ -1044,7 +1045,7 @@ case 10:
;
break;}
case 11:
-#line 320 "./iid.y"
+#line 321 "./iid.y"
{
/* Turn off verbose query flag */
@@ -1052,7 +1053,7 @@ case 11:
;
break;}
case 12:
-#line 329 "./iid.y"
+#line 330 "./iid.y"
{
/* value of query is set associated with primitive */
@@ -1060,7 +1061,7 @@ case 12:
;
break;}
case 13:
-#line 335 "./iid.y"
+#line 336 "./iid.y"
{
/* value of query is intersection of the two query sets */
@@ -1071,7 +1072,7 @@ case 13:
;
break;}
case 14:
-#line 344 "./iid.y"
+#line 345 "./iid.y"
{
/* value of query is union of the two query sets */
@@ -1082,7 +1083,7 @@ case 14:
;
break;}
case 15:
-#line 353 "./iid.y"
+#line 354 "./iid.y"
{
/* value of query is inverse of other query */
@@ -1093,7 +1094,7 @@ case 15:
;
break;}
case 16:
-#line 365 "./iid.y"
+#line 366 "./iid.y"
{
/* Value of primitive is value of recorded set */
@@ -1101,7 +1102,7 @@ case 16:
;
break;}
case 17:
-#line 371 "./iid.y"
+#line 372 "./iid.y"
{
/* Value of primitive is obtained by running an lid query */
@@ -1112,7 +1113,7 @@ case 17:
;
break;}
case 18:
-#line 380 "./iid.y"
+#line 381 "./iid.y"
{
/* Value of primitive is obtained by running an aid query */
@@ -1123,7 +1124,7 @@ case 18:
;
break;}
case 19:
-#line 389 "./iid.y"
+#line 390 "./iid.y"
{
/* Match names from database against pattern */
yyval. setdef = RunProg("pid -kmn", yyvsp[0]. listdef ) ;
@@ -1133,7 +1134,7 @@ case 19:
;
break;}
case 20:
-#line 397 "./iid.y"
+#line 398 "./iid.y"
{
/* value of primitive is value of query */
@@ -1141,7 +1142,7 @@ case 20:
;
break;}
case 21:
-#line 406 "./iid.y"
+#line 407 "./iid.y"
{
/* make arg list holding single ID */
@@ -1151,7 +1152,7 @@ case 21:
;
break;}
case 22:
-#line 414 "./iid.y"
+#line 415 "./iid.y"
{
/* arg list is Id_list */
@@ -1160,7 +1161,7 @@ case 22:
;
break;}
case 23:
-#line 424 "./iid.y"
+#line 425 "./iid.y"
{
/* arg list is Id_list */
@@ -1168,7 +1169,7 @@ case 23:
;
break;}
case 24:
-#line 433 "./iid.y"
+#line 434 "./iid.y"
{
/* make arg list holding single ID */
@@ -1177,7 +1178,7 @@ case 24:
;
break;}
case 25:
-#line 440 "./iid.y"
+#line 441 "./iid.y"
{
/* make arg list holding names from set */
@@ -1186,7 +1187,7 @@ case 25:
;
break;}
case 26:
-#line 447 "./iid.y"
+#line 448 "./iid.y"
{
/* extend arg list with additional ID */
@@ -1194,7 +1195,7 @@ case 26:
;
break;}
case 27:
-#line 453 "./iid.y"
+#line 454 "./iid.y"
{
/* extend arg list with additional file names */
@@ -1202,7 +1203,7 @@ case 27:
;
break;}
case 28:
-#line 462 "./iid.y"
+#line 463 "./iid.y"
{
/* make arg list holding single ID */
@@ -1211,7 +1212,7 @@ case 28:
;
break;}
case 29:
-#line 469 "./iid.y"
+#line 470 "./iid.y"
{
/* extend arg list with additional ID */
@@ -1442,7 +1443,7 @@ yyerrhandle:
yystate = yyn;
goto yynewstate;
}
-#line 476 "./iid.y"
+#line 477 "./iid.y"
/* ScanLine - a global variable holding a pointer to the current