summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGreg McGary <greg@mcgary.org>1997-04-18 06:44:01 +0000
committerGreg McGary <greg@mcgary.org>1997-04-18 06:44:01 +0000
commited0761dee1f49bb70c11891835894124c314c613 (patch)
tree3d59ac24792a9a6f5de210dd165d41fa95b60d01 /src
parent61d08d77fcfeeab86a466ba01657f855dc46a990 (diff)
downloadidutils-ed0761dee1f49bb70c11891835894124c314c613.tar.gz
idutils-ed0761dee1f49bb70c11891835894124c314c613.tar.bz2
idutils-ed0761dee1f49bb70c11891835894124c314c613.zip
imported from id-utils-3.2r3_2
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.in32
-rw-r--r--src/fid.c8
-rw-r--r--src/lid.c2
-rw-r--r--src/xtokid.c1
4 files changed, 22 insertions, 21 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index cda6580..404e9e6 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.0 from Makefile.am
+# Makefile.in generated automatically by automake 1.1b from Makefile.am
# Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@@ -67,7 +67,7 @@ CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
-COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
LINK = $(CC) $(LDFLAGS) -o $@
ANSI2KNR = @ANSI2KNR@
@@ -94,7 +94,7 @@ EXTRA_xtokid_SOURCES =
xtokid_LDADD = $(LDADD)
SCRIPTS = $(bin_SCRIPTS)
-DIST_COMMON = Makefile.am Makefile.in
+DIST_COMMON = Makefile.am Makefile.in ansi2knr.1 ansi2knr.c
PACKAGE = @PACKAGE@
@@ -121,7 +121,7 @@ Makefile: $(top_builddir)/config.status Makefile.in
mostlyclean-binPROGRAMS:
clean-binPROGRAMS:
- rm -f $(bin_PROGRAMS)
+ test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
distclean-binPROGRAMS:
@@ -141,7 +141,7 @@ uninstall-binPROGRAMS:
done
.c.o:
- $(COMPILE) $<
+ $(COMPILE) -c $<
mostlyclean-compile:
rm -f *.o core
@@ -157,15 +157,15 @@ maintainer-clean-compile:
$(ANSI2KNR) $< > $*.tmp && mv $*.tmp $@
._c._o:
- @echo $(COMPILE) $<
+ @echo $(COMPILE) -c $<
@rm -f _$*.c
- @ln $< _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c
+ @ln $< _$*.c && $(COMPILE) -c _$*.c && mv _$*.o $@ && rm _$*.c
.c._o:
$(ANSI2KNR) $< > $*.tmp && mv $*.tmp $*._c
- @echo $(COMPILE) $*._c
+ @echo $(COMPILE) -c $*._c
@rm -f _$*.c
- @ln $*._c _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c
+ @ln $*._c _$*.c && $(COMPILE) -c _$*.c && mv _$*.o $@ && rm _$*.c
ansi2knr: ansi2knr.o
$(LINK) ansi2knr.o $(LIBS)
@@ -232,19 +232,20 @@ mostlyclean-tags:
clean-tags:
distclean-tags:
- rm -f TAGS ID
maintainer-clean-tags:
+ rm -f TAGS ID
-subdir = src
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = src
distdir: $(DEP_DISTFILES)
@for file in `cd $(srcdir) && echo $(DISTFILES)`; do \
test -f $(distdir)/$$file \
|| ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir)/$$file; \
done
-fid$o: ../src/fid.c ../lib/xstring.h ../lib/xunistd.h \
+fid$o: fid.c ../lib/xstring.h ../lib/xunistd.h \
../libidu/xnls.h ../libidu/idfile.h ../lib/xobstack.h \
../lib/xmalloc.h ../libidu/hash.h ../libidu/dynvec.h \
../libidu/tokflags.h ../lib/error.h ../lib/pathmax.h \
@@ -265,11 +266,10 @@ mkid$o: ../src/mkid.c ../lib/xstdlib.h ../lib/xsysstat.h \
../lib/xobstack.h ../lib/xmalloc.h ../libidu/hash.h \
../libidu/dynvec.h ../libidu/tokflags.h ../libidu/scanners.h \
../lib/error.h ../lib/xalloca.h
-xtokid$o: ../src/xtokid.c ../libidu/xnls.h \
+xtokid$o: xtokid.c ../lib/xstring.h ../libidu/xnls.h \
../libidu/scanners.h ../lib/xobstack.h ../lib/xmalloc.h \
- ../lib/xstring.h ../libidu/idfile.h ../libidu/hash.h \
- ../libidu/dynvec.h ../libidu/tokflags.h ../lib/pathmax.h \
- ../lib/error.h
+ ../libidu/idfile.h ../libidu/hash.h ../libidu/dynvec.h \
+ ../libidu/tokflags.h ../lib/pathmax.h ../lib/error.h
info:
diff --git a/src/fid.c b/src/fid.c
index 6126cb4..398c7c2 100644
--- a/src/fid.c
+++ b/src/fid.c
@@ -203,6 +203,7 @@ get_file_index (char *file_name)
struct file_link **members;
struct file_link **end = &members_0[idh.idh_files];
struct file_link *fn_flink = 0;
+ char *file_name_buf = ALLOCA (char, PATH_MAX);
int has_slash = (strchr (file_name, '/') != 0);
int file_name_length = strlen (file_name);
int idx = -1;
@@ -220,12 +221,11 @@ get_file_index (char *file_name)
}
else if (has_slash)
{
- char *file_name = ALLOCA (char, PATH_MAX);
int member_length;
- maybe_relative_file_name (file_name, flink, cw_dlink);
- member_length = strlen (file_name);
+ maybe_relative_file_name (file_name_buf, flink, cw_dlink);
+ member_length = strlen (file_name_buf);
if (file_name_length > member_length
- || !strequ (&file_name[member_length - file_name_length], file_name))
+ || !strequ (&file_name_buf[member_length - file_name_length], file_name))
continue;
}
else if (!strequ (flink->fl_name, file_name))
diff --git a/src/lid.c b/src/lid.c
index 8c351cd..48bf11a 100644
--- a/src/lid.c
+++ b/src/lid.c
@@ -714,7 +714,7 @@ editit:
if (eid_arg)
{
sprintf (ed_arg_buffer, eid_arg, pattern);
- *--argv = ed_arg_buffer;
+ *argv-- = ed_arg_buffer;
}
*(char const **) argv = editor;
execvp (editor, argv);
diff --git a/src/xtokid.c b/src/xtokid.c
index c48834c..9299c00 100644
--- a/src/xtokid.c
+++ b/src/xtokid.c
@@ -19,6 +19,7 @@
#include <config.h>
#include <stdio.h>
#include <getopt.h>
+#include "xstring.h"
#include "xnls.h"
#include "scanners.h"
#include "idfile.h"