Mercurial > hg > octave-lojdl > gnulib-hg
changeset 40:df153a752270
merge with 3.4.1
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Mon, 29 Mar 1993 05:09:24 +0000 |
parents | a887f9ed7b42 |
children | 1840d8d6c895 |
files | lib/Makefile.in lib/dirname.c lib/fsusage.c lib/makepath.c |
diffstat | 4 files changed, 20 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -64,7 +64,10 @@ rm -f TAGS dist: - ln $(DISTFILES) ../`cat ../.fname`/lib + for file in $(DISTFILES); do \ + ln $$file ../`cat ../.fname`/lib \ + || cp $$file ../`cat ../.fname`/lib; \ + done libfu.a: $(OBJECTS) rm -f $@
--- a/lib/dirname.c +++ b/lib/dirname.c @@ -20,7 +20,7 @@ #else char *malloc (); #endif -#if defined(USG) || defined(STDC_HEADERS) +#if defined(STDC_HEADERS) || defined(HAVE_STRING_H) #include <string.h> #ifndef rindex #define rindex strrchr
--- a/lib/fsusage.c +++ b/lib/fsusage.c @@ -56,14 +56,18 @@ /* Return the number of TOSIZE-byte blocks used by BLOCKS FROMSIZE-byte blocks, rounding up. */ -#define adjust_blocks(blocks, fromsize, tosize) \ - (((fromsize) == (tosize)) \ - ? (blocks) /* E.g., from 512 to 512. */ \ - : (((fromsize) > (tosize)) \ - /* E.g., from 2048 to 512. */ \ - ? (blocks) * ((fromsize) / (tosize)) \ - /* E.g., from 256 to 512. */ \ - : ((blocks) + 1) / ((tosize) / (fromsize)))) +static long +adjust_blocks (blocks, fromsize, tosize) + long blocks; + int fromsize, tosize; +{ + if (fromsize == tosize) /* E.g., from 512 to 512. */ + return blocks; + else if (fromsize > tosize) /* E.g., from 2048 to 512. */ + return blocks * (fromsize / tosize); + else /* E.g., from 256 to 512. */ + return (blocks + 1) / (tosize / fromsize); +} /* Fill in the fields of FSP with information about space usage for the filesystem on which PATH resides.