Imported Upstream version 2.5 upstream/2.5
authorBdale Garbee <bdale@gag.com>
Tue, 20 May 2008 04:56:25 +0000 (22:56 -0600)
committerBdale Garbee <bdale@gag.com>
Tue, 20 May 2008 04:56:25 +0000 (22:56 -0600)
Makefile.in
NEWS
configure
configure.in
cpmchattr.c
diskdefs
fsed.cpm.c

index 4fdafceef63e1ff360ff0adc16b47afb9ecc971b..76eaa119599cc4fe6aa9c1faf20eeefaa7fad7f9 100644 (file)
@@ -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 b67e99ef04c710f4066632617c5edc211ae9c7e2..c34212afedba12cbd5903785bc52ce22857d5823 100644 (file)
--- 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
index 2bebed536c347cdfb656650658fb97129e2fa4fd..448314405877f8c7b2503b4635946ab46bd58936 100755 (executable)
--- 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
 
index aec7ef97f405e7cde7facb9f03d0390925f43f12..cf88b570e711698c0e786dc4bac65eef3c557bdf 100644 (file)
@@ -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)], 
index 9fbf074ca1934bcacb5ad72304e45cbe4467bd48..42704e72c7cc1ff1dbf7c96122d7538d022ee9b1 100644 (file)
@@ -60,12 +60,12 @@ int main(int argc, char *argv[]) /*{{{*/
   for (i=0; i<gargc; ++i)
   {
     struct cpmInode ino;
-    int err;
+    int rc;
     cpm_attr_t attrib;
 
-    err = cpmNamei(&root,gargv[i], &ino)==-1;
-    if (!err) err = cpmAttrGet(&ino, &attrib);
-    if (!err)
+    rc = cpmNamei(&root,gargv[i], &ino)==-1;
+    if (!rc) rc = cpmAttrGet(&ino, &attrib);
+    if (!rc)
     {
         int n, m;
         m = 0;
@@ -93,9 +93,9 @@ int main(int argc, char *argv[]) /*{{{*/
           } 
           if (m) attrib &= ~mask; else attrib |= mask;
        }
-        err = cpmAttrSet(&ino, attrib);
+        rc = cpmAttrSet(&ino, attrib);
     }
-    if (err)
+    if (rc)
     {
       fprintf(stderr,"%s: can not set attributes for %s: %s\n",cmd,gargv[i],boo);
       exitcode=1;
index 07f857c38064d5007d6a55a602d8235854435fc5..a607c440a42abae3753e286c69c23a8a3c0da6fd 100644 (file)
--- a/diskdefs
+++ b/diskdefs
@@ -178,6 +178,17 @@ diskdef ibm-8ss
   os 2.2
 end
 
+diskdef ibm-8ds
+  seclen 512
+  tracks 40
+  sectrk 8
+  blocksize 1024
+  maxdir 64
+  skew 0
+  boottrk 1
+  os 2.2
+end
+
 diskdef electroglas
   seclen 512
   tracks 80
@@ -188,3 +199,52 @@ diskdef electroglas
   boottrk 1
   os 3
 end
+
+# IBM CP/M-86
+# setfdprm /dev/fd1 sect=8 dtr=1 hd ssize=512 tpi=48 head=1
+diskdef ibmpc-514ss
+   seclen 512
+   tracks 40
+   sectrk 8
+   blocksize 1024
+   maxdir 64
+   skew 1
+   boottrk 1
+   os 2.2
+end
+
+# IBM CP/M-86
+# setfdprm /dev/fd1 sect=8 dtr=1 hd ssize=512 tpi=48
+diskdef ibmpc-514ds
+   seclen 512
+   tracks 80
+   sectrk 8
+   blocksize 2048
+   maxdir 64
+   skew 0
+   boottrk 2
+   os 2.2
+end
+
+diskdef p112
+  seclen 512
+  tracks 160
+  sectrk 18
+  blocksize 2048
+  maxdir 128
+  skew 1
+  boottrk 1
+  os 3
+end
+
+
+diskdef p112a
+  seclen 512
+  tracks 160
+  sectrk 18
+  blocksize 2048
+  maxdir 256
+  skew 1
+  boottrk 1
+  os 3
+end
index dfd94670ba79fe62a5776b91cb051b7b5106eec9..9e1592d9f96edc09084b9527a2da0331af951144 100644 (file)
@@ -83,7 +83,7 @@ static void map(struct cpmSuperBlock *sb) /*{{{*/
 {
   const char *msg;
   char bmap[18*80];
-  int secmap,pos,system,directory;
+  int secmap,pos,sys,directory;
 
   clear();
   msg="Data map";
@@ -91,11 +91,11 @@ static void map(struct cpmSuperBlock *sb) /*{{{*/
 
   secmap=(sb->tracks*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;