From 9d1b9d0a2b6515be3cec895654af126aaddd21b3 Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Mon, 19 May 2008 22:56:25 -0600 Subject: [PATCH] Imported Upstream version 2.5 --- Makefile.in | 4 +-- NEWS | 6 ++-- configure | 91 +++++++++++++++++++++++++++------------------------- configure.in | 17 ++++------ cpmchattr.c | 12 +++---- diskdefs | 60 ++++++++++++++++++++++++++++++++++ fsed.cpm.c | 28 ++++++++-------- 7 files changed, 139 insertions(+), 79 deletions(-) diff --git a/Makefile.in b/Makefile.in index 4fdafce..76eaa11 100644 --- a/Makefile.in +++ b/Makefile.in @@ -20,7 +20,7 @@ LIBS= @LIBS@ @LDLIBS@ LDDEPS= @LDDEPS@ CPPFLAGS= -DDISKDEFS=\"@datadir@/diskdefs\" -DFORMAT=\"$(DEFFORMAT)\" # -# [JCE] I'm only a novice and I haven't worked out how to autoconf this one +# I'm only a novice and I haven't worked out how to autoconf this one # #MAKEDEPEND= mkdep -d @@ -100,7 +100,7 @@ clean: rm -f *$(OBJEXT) *.1 *.5 distclean: clean - rm -f $(ALL) config.log config.cache config.h config.status Makefile *.out + rm -rf $(ALL) autom4te.cache config.log config.cache config.h config.status Makefile *.out tar: distclean (b=`pwd`; b=`basename $$b`; cd ..; tar zcvf $$b.tar.gz $$b) diff --git a/NEWS b/NEWS index b67e99e..c34212a 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ -Changes since 2.3: +Changes since 2.4: + +o diskdefs entry for P112a +o small bugs in fsed.cpm fixed -o diskdefs typo ibm-8ss fixed diff --git a/configure b/configure index 2bebed5..4483144 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.58. +# Generated by GNU Autoconf 2.59. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation @@ -893,40 +893,43 @@ case $srcdir in ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -case "$ac_dir" in -.) ac_abs_builddir=$ac_builddir;; + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; *) - case $ac_builddir in - .) ac_abs_builddir="$ac_dir";; - [\\/]* | ?:[\\/]* ) ac_abs_builddir=$ac_builddir;; - *) ac_abs_builddir="$ac_dir"/$ac_builddir;; + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in - .) ac_abs_top_builddir="$ac_dir";; + .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir="$ac_dir"/${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in - .) ac_abs_srcdir="$ac_dir";; + .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir="$ac_dir"/$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in - .) ac_abs_top_srcdir="$ac_dir";; + .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir="$ac_dir"/$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac @@ -965,7 +968,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.58. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1373,8 +1376,8 @@ host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -VERSION=2.4 -UPDATED='Oct 6, 2004' +VERSION=2.5 +UPDATED='Oct 19, 2005' DEVICE="posix" @@ -1382,12 +1385,6 @@ if test "$prefix" = NONE then case $host in *-linux-*) - PIPE="-pipe " - ;; - esac - case $host in - *-netbsd*) - PIPE="-pipe " ;; esac fi @@ -2638,8 +2635,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "$GCC" = yes then - CFLAGS="${CFLAGS} ${PIPE}-Wmissing-prototypes -Wstrict-prototypes -Wcast-qual -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-declarations -Wnested-externs -pedantic -fno-common" - LDFLAGS='-g' + CFLAGS="${CFLAGS} ${EXTRA_GCFLAGS}-pipe -Wall -Wno-unused -Wshadow -Wbad-function-cast -Wmissing-prototypes -Wstrict-prototypes -Wcast-align -Wcast-qual -Wpointer-arith -Wwrite-strings -Wmissing-declarations -Wnested-externs -Wundef -pedantic -fno-common" + LDFLAGS="${LDFLAGS} ${EXTRA_GLDFLAGS}-g" +else + CFLAGS="${CFLAGS} ${EXTRA_CFLAGS}" + LDFLAGS="${LDFLAGS} ${EXTRA_LDFLAGS}" fi @@ -5205,7 +5205,7 @@ _ASBOX cat >&5 <<_CSEOF This file was extended by $as_me, which was -generated by GNU Autoconf 2.58. Invocation command line was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -5265,7 +5265,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.58, +configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. @@ -5612,40 +5612,43 @@ case $srcdir in ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -case "$ac_dir" in -.) ac_abs_builddir=$ac_builddir;; + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; *) - case $ac_builddir in - .) ac_abs_builddir="$ac_dir";; - [\\/]* | ?:[\\/]* ) ac_abs_builddir=$ac_builddir;; - *) ac_abs_builddir="$ac_dir"/$ac_builddir;; + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in - .) ac_abs_top_builddir="$ac_dir";; + .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir="$ac_dir"/${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in - .) ac_abs_srcdir="$ac_dir";; + .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir="$ac_dir"/$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac -case "$ac_dir" in +case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in - .) ac_abs_top_srcdir="$ac_dir";; + .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir="$ac_dir"/$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac diff --git a/configure.in b/configure.in index aec7ef9..cf88b57 100644 --- a/configure.in +++ b/configure.in @@ -1,8 +1,8 @@ AC_INIT(cpmfs.c) AC_CONFIG_HEADER(config.h) AC_CANONICAL_HOST -VERSION=2.4 -UPDATED='Oct 6, 2004' +VERSION=2.5 +UPDATED='Oct 19, 2005' DEVICE="posix" @@ -10,12 +10,6 @@ if test "$prefix" = NONE then case $host in *-linux-*) - PIPE="-pipe " - ;; - esac - case $host in - *-netbsd*) - PIPE="-pipe " ;; esac fi @@ -26,8 +20,11 @@ AC_PROG_CPP if test "$GCC" = yes then - CFLAGS="${CFLAGS} ${PIPE}-Wmissing-prototypes -Wstrict-prototypes -Wcast-qual -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-declarations -Wnested-externs -pedantic -fno-common" - LDFLAGS='-g' + CFLAGS="${CFLAGS} ${EXTRA_GCFLAGS}-pipe -Wall -Wno-unused -Wshadow -Wbad-function-cast -Wmissing-prototypes -Wstrict-prototypes -Wcast-align -Wcast-qual -Wpointer-arith -Wwrite-strings -Wmissing-declarations -Wnested-externs -Wundef -pedantic -fno-common" + LDFLAGS="${LDFLAGS} ${EXTRA_GLDFLAGS}-g" +else + CFLAGS="${CFLAGS} ${EXTRA_CFLAGS}" + LDFLAGS="${LDFLAGS} ${EXTRA_LDFLAGS}" fi AC_ARG_WITH(defformat,[ --with-defformat Specify default format (ibm-3740)], diff --git a/cpmchattr.c b/cpmchattr.c index 9fbf074..42704e7 100644 --- a/cpmchattr.c +++ b/cpmchattr.c @@ -60,12 +60,12 @@ int main(int argc, char *argv[]) /*{{{*/ for (i=0; itracks*sb->sectrk+80*18-1)/(80*18); memset(bmap,' ',sizeof(bmap)); - system=sb->boottrk*sb->sectrk; - memset(bmap,'S',system/secmap); + sys=sb->boottrk*sb->sectrk; + memset(bmap,'S',sys/secmap); directory=(sb->maxdir*32+sb->secLength-1)/sb->secLength; - memset(bmap+system/secmap,'D',directory/secmap); - memset(bmap+(system+directory)/secmap,'.',sb->sectrk*sb->tracks/secmap); + memset(bmap+sys/secmap,'D',directory/secmap); + memset(bmap+(sys+directory)/secmap,'.',sb->sectrk*sb->tracks/secmap); for (pos=0; pos<(sb->maxdir*32+sb->secLength-1)/sb->secLength; ++pos) { @@ -233,12 +233,10 @@ int main(int argc, char *argv[]) /*{{{*/ printw("Offset %5d ",pos%drive.secLength); printw("Track %5d",pos/(drive.secLength*drive.sectrk)); move(LINES-3,0); printw("N)ext track P)revious track"); - move(LINES-2,0); printw("n)ext record n)revious record f)orward byte b)ackward byte"); + move(LINES-2,0); printw("n)ext record p)revious record f)orward byte b)ackward byte"); move(LINES-1,0); printw("i)nfo q)uit"); if (reload) { - const char *err; - if (pos<(drive.boottrk*drive.sectrk*drive.secLength)) { err=Device_readSector(&drive.dev,pos/(drive.secLength*drive.sectrk),(pos/drive.secLength)%drive.sectrk,buf); @@ -413,11 +411,11 @@ int main(int argc, char *argv[]) /*{{{*/ printw("Password: "); for (i=0; i<8; ++i) { - char c; + char printable; if (offset==16+(7-i)) attron(A_REVERSE); - c=(buf[entrystart+16+(7-i)]^buf[entrystart+13])&0x7f; - printw("%c",isprint(c) ? c : ' '); + printable=(buf[entrystart+16+(7-i)]^buf[entrystart+13])&0x7f; + printw("%c",isprint(printable) ? printable : ' '); attroff(A_REVERSE); } printw(" XOR value: "); @@ -592,11 +590,11 @@ int main(int argc, char *argv[]) /*{{{*/ printw("Password: "); for (i=0; i<8; ++i) { - char c; + char printable; if (offset==16+(7-i)) attron(A_REVERSE); - c=(buf[entrystart+16+(7-i)]^buf[entrystart+13])&0x7f; - printw("%c",isprint(c) ? c : ' '); + printable=(buf[entrystart+16+(7-i)]^buf[entrystart+13])&0x7f; + printw("%c",isprint(printable) ? printable : ' '); attroff(A_REVERSE); } printw(" XOR value: "); @@ -684,7 +682,7 @@ int main(int argc, char *argv[]) /*{{{*/ /*}}}*/ case 'P': /* previous track */ /*{{{*/ { - if (pos>drive.sectrk*drive.secLength) + if (pos>=drive.sectrk*drive.secLength) { pos-=drive.sectrk*drive.secLength; reload=1; -- 2.30.2