summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg McGary <greg@mcgary.org>1997-04-18 06:34:43 +0000
committerGreg McGary <greg@mcgary.org>1997-04-18 06:34:43 +0000
commitc37465dbcaf80dd07944f871bfb8c899c27e94f3 (patch)
treeba0b94024499402f5e7a36db0c6d717b7c766f18
parentab66bea0c326c2e18866ad37134dc91bf99c514a (diff)
downloadidutils-c37465dbcaf80dd07944f871bfb8c899c27e94f3.tar.gz
idutils-c37465dbcaf80dd07944f871bfb8c899c27e94f3.tar.bz2
idutils-c37465dbcaf80dd07944f871bfb8c899c27e94f3.zip
imported from mkid-3.0.2r3_0_2
-rw-r--r--README10
-rw-r--r--config.h.in11
-rw-r--r--iid.c64
-rwxr-xr-xmkdirhier61
4 files changed, 108 insertions, 38 deletions
diff --git a/README b/README
index 09acbd7..1bd8a6f 100644
--- a/README
+++ b/README
@@ -7,7 +7,7 @@ form, literal numbers, or words of human-readable text.
and posted to comp.sources.unix in September 1987. It was then
maintained and enhanced by a loose knit group of programmers on the
Internet led by Tom Horsley <Tom.Horsley@mail.hcsc.com>. Tom released
-`mkid2' on comp.sources.unix in February 1991. Since then, Greg
+`mkid2' on comp.sources.unix in March, 1991. Since then, Greg
McGary has resumed maintenance and is working on a greatly enhanced
version 3 under GPL.
@@ -17,7 +17,7 @@ See file `NEWS' for a list of major changes in the current release.
See file `THANKS' for a list of contributors.
See file `TODO' for planned enhancements.
-Send bug reports to <gkm@magilla.cichlid.com>. A bug report is an
-adequate description of the problem: your input, what you expected,
-what you got, and why this is wrong. Diffs are welcome, but they only
-describe a solution, from which the problem might be uneasy to infer.
+Send bug reports to <gkm@magilla.cichlid.com>. Please describe your
+problem adequately: your input, what you expected, what you got, and
+why it is wrong. Diffs are welcome, but please include a description
+of the problem as well, since this is sometimes difficult to infer.
diff --git a/config.h.in b/config.h.in
index 1f1c41e..60d663a 100644
--- a/config.h.in
+++ b/config.h.in
@@ -46,9 +46,18 @@
/* Define to 1 if ANSI function prototypes are usable. */
#undef PROTOTYPES
-/* Define to the version of the distribution. */
+/* Define to the major version # of the distribution. */
+#undef MAJOR_VERSION
+
+/* Define to the minor version # of the distribution. */
+#undef MINOR_VERSION
+
+/* Define to the minor.minor version # of the distribution. */
#undef VERSION
+/* Define to the minor.minor.patch_level # of the distribution. */
+#undef FULL_VERSION
+
/* Define to the patch level of the distribution. */
#undef PATCH_LEVEL
diff --git a/iid.c b/iid.c
index 17bd6bf..0238db7 100644
--- a/iid.c
+++ b/iid.c
@@ -1,5 +1,5 @@
-/* A Bison parser, made from iid.y with Bison version GNU Bison version 1.22
+/* A Bison parser, made from ./iid.y with Bison version GNU Bison version 1.22
*/
#define YYBISON 1 /* Identify Bison output. */
@@ -22,7 +22,7 @@
#define AND 273
#define NOT 274
-#line 1 "iid.y"
+#line 1 "./iid.y"
/* iid.y -- interactive mkid query language
Copyright (C) 1991 Tom Horsley
@@ -251,7 +251,7 @@ set_type * SetInverse( set_type * sp ) ;
void RunShell( char * pp , id_list_type * idlp ) ;
-#line 230 "iid.y"
+#line 230 "./iid.y"
typedef union {
set_type * setdef ;
id_type * strdef ;
@@ -968,7 +968,7 @@ yyreduce:
switch (yyn) {
case 1:
-#line 258 "iid.y"
+#line 258 "./iid.y"
{
/* cd to the directory specified as argument, flush sets */
@@ -977,7 +977,7 @@ case 1:
;
break;}
case 3:
-#line 266 "iid.y"
+#line 266 "./iid.y"
{
/* print the list of files resulting from Query */
@@ -985,7 +985,7 @@ case 3:
;
break;}
case 4:
-#line 272 "iid.y"
+#line 272 "./iid.y"
{
/* run PAGER on the list of files in SET */
@@ -993,7 +993,7 @@ case 4:
;
break;}
case 5:
-#line 278 "iid.y"
+#line 278 "./iid.y"
{
/* describe sets created so far */
@@ -1001,7 +1001,7 @@ case 5:
;
break;}
case 6:
-#line 284 "iid.y"
+#line 284 "./iid.y"
{
/* run PAGER on the help file */
@@ -1009,13 +1009,13 @@ case 6:
;
break;}
case 7:
-#line 290 "iid.y"
+#line 290 "./iid.y"
{
exit(0) ;
;
break;}
case 8:
-#line 294 "iid.y"
+#line 294 "./iid.y"
{
/* run the shell command and eat the results as a file set */
@@ -1024,7 +1024,7 @@ case 8:
;
break;}
case 9:
-#line 301 "iid.y"
+#line 301 "./iid.y"
{
/* run the shell command */
@@ -1033,7 +1033,7 @@ case 9:
;
break;}
case 10:
-#line 311 "iid.y"
+#line 311 "./iid.y"
{
/* Turn on verbose query flag */
@@ -1041,7 +1041,7 @@ case 10:
;
break;}
case 11:
-#line 320 "iid.y"
+#line 320 "./iid.y"
{
/* Turn off verbose query flag */
@@ -1049,7 +1049,7 @@ case 11:
;
break;}
case 12:
-#line 329 "iid.y"
+#line 329 "./iid.y"
{
/* value of query is set associated with primitive */
@@ -1057,7 +1057,7 @@ case 12:
;
break;}
case 13:
-#line 335 "iid.y"
+#line 335 "./iid.y"
{
/* value of query is intersection of the two query sets */
@@ -1068,7 +1068,7 @@ case 13:
;
break;}
case 14:
-#line 344 "iid.y"
+#line 344 "./iid.y"
{
/* value of query is union of the two query sets */
@@ -1079,7 +1079,7 @@ case 14:
;
break;}
case 15:
-#line 353 "iid.y"
+#line 353 "./iid.y"
{
/* value of query is inverse of other query */
@@ -1090,7 +1090,7 @@ case 15:
;
break;}
case 16:
-#line 365 "iid.y"
+#line 365 "./iid.y"
{
/* Value of primitive is value of recorded set */
@@ -1098,7 +1098,7 @@ case 16:
;
break;}
case 17:
-#line 371 "iid.y"
+#line 371 "./iid.y"
{
/* Value of primitive is obtained by running an lid query */
@@ -1109,7 +1109,7 @@ case 17:
;
break;}
case 18:
-#line 380 "iid.y"
+#line 380 "./iid.y"
{
/* Value of primitive is obtained by running an aid query */
@@ -1120,7 +1120,7 @@ case 18:
;
break;}
case 19:
-#line 389 "iid.y"
+#line 389 "./iid.y"
{
/* Match names from database against pattern */
yyval. setdef = RunProg("pid -kmn", yyvsp[0]. listdef ) ;
@@ -1130,7 +1130,7 @@ case 19:
;
break;}
case 20:
-#line 397 "iid.y"
+#line 397 "./iid.y"
{
/* value of primitive is value of query */
@@ -1138,7 +1138,7 @@ case 20:
;
break;}
case 21:
-#line 406 "iid.y"
+#line 406 "./iid.y"
{
/* make arg list holding single ID */
@@ -1148,7 +1148,7 @@ case 21:
;
break;}
case 22:
-#line 414 "iid.y"
+#line 414 "./iid.y"
{
/* arg list is Id_list */
@@ -1157,7 +1157,7 @@ case 22:
;
break;}
case 23:
-#line 424 "iid.y"
+#line 424 "./iid.y"
{
/* arg list is Id_list */
@@ -1165,7 +1165,7 @@ case 23:
;
break;}
case 24:
-#line 433 "iid.y"
+#line 433 "./iid.y"
{
/* make arg list holding single ID */
@@ -1174,7 +1174,7 @@ case 24:
;
break;}
case 25:
-#line 440 "iid.y"
+#line 440 "./iid.y"
{
/* make arg list holding names from set */
@@ -1183,7 +1183,7 @@ case 25:
;
break;}
case 26:
-#line 447 "iid.y"
+#line 447 "./iid.y"
{
/* extend arg list with additional ID */
@@ -1191,7 +1191,7 @@ case 26:
;
break;}
case 27:
-#line 453 "iid.y"
+#line 453 "./iid.y"
{
/* extend arg list with additional file names */
@@ -1199,7 +1199,7 @@ case 27:
;
break;}
case 28:
-#line 462 "iid.y"
+#line 462 "./iid.y"
{
/* make arg list holding single ID */
@@ -1208,7 +1208,7 @@ case 28:
;
break;}
case 29:
-#line 469 "iid.y"
+#line 469 "./iid.y"
{
/* extend arg list with additional ID */
@@ -1439,7 +1439,7 @@ yyerrhandle:
yystate = yyn;
goto yynewstate;
}
-#line 476 "iid.y"
+#line 476 "./iid.y"
/* ScanLine - a global variable holding a pointer to the current
diff --git a/mkdirhier b/mkdirhier
index e69de29..c835c95 100755
--- a/mkdirhier
+++ b/mkdirhier
@@ -0,0 +1,61 @@
+#!/bin/sh
+# $XConsortium: mkdirhier.sh,v 1.6 91/08/13 18:13:04 rws Exp $
+# Courtesy of Paul Eggert
+
+newline='
+'
+IFS=$newline
+
+case ${1--} in
+-*) echo >&2 "mkdirhier: usage: mkdirhier directory ..."; exit 1
+esac
+
+status=
+
+for directory
+do
+ case $directory in
+ '')
+ echo >&2 "mkdirhier: empty directory name"
+ status=1
+ continue;;
+ *"$newline"*)
+ echo >&2 "mkdirhier: directory name contains a newline: \`\`$directory''"
+ status=1
+ continue;;
+ ///*) prefix=/;; # See Posix 2.3 "path".
+ //*) prefix=//;;
+ /*) prefix=/;;
+ -*) prefix=./;;
+ *) prefix=
+ esac
+
+ IFS=/
+ set x $directory
+ IFS=$newline
+ shift
+
+ for filename
+ do
+ path=$prefix$filename
+ prefix=$path/
+ shift
+
+ test -d "$path" || {
+ paths=$path
+ for filename
+ do
+ if [ "$filename" != "." ]; then
+ path=$path/$filename
+ paths=$paths$newline$path
+ fi
+ done
+
+ mkdir $paths || status=$?
+
+ break
+ }
+ done
+ done
+
+exit $status