This patch adds: Rom support (capitalized U,S,B update/sync/backup rom files, but clear the read only bit). PQA support (files ending in pqa have an extra bit set). works on suse linux (ltconfig had a hiccup - at bottom). diff -Bbur pilot-link.0.9.3/include/pi-dlp.h pilot-link-fixed/include/pi-dlp.h --- pilot-link.0.9.3/include/pi-dlp.h Sat May 2 23:11:26 1998 +++ pilot-link-fixed/include/pi-dlp.h Fri Mar 10 16:08:23 2000 @@ -65,6 +65,7 @@ dlpDBFlagReadOnly = 0x0002, /* DB is read only */ dlpDBFlagAppInfoDirty = 0x0004, /* AppInfo data has been modified */ dlpDBFlagBackup = 0x0008, /* DB is tagged for generic backup */ + dlpDBFlagClipping = 0x0200, /* DB is a pqa */ dlpDBFlagOpen = 0x8000, /* DB is currently open */ /* v2.0 specific */ diff -Bbur pilot-link.0.9.3/pilot-xfer.c pilot-link-fixed/pilot-xfer.c --- pilot-link.0.9.3/pilot-xfer.c Mon Apr 26 01:50:11 1999 +++ pilot-link-fixed/pilot-xfer.c Fri Apr 7 11:15:36 2000 @@ -133,7 +133,10 @@ RETSIGTYPE SigHandler(int signal) { puts("Abort on signal!"); - Disconnect(); + if(sd!=0) { + dlp_AbortSync(sd); + pi_close(sd); + } exit(3); } @@ -163,7 +166,7 @@ } } -void Backup(char * dirname, int only_changed, int remove_deleted) +void Backup(char * dirname, int only_changed, int remove_deleted, int rom) { int i, ofile_total, ofile_len; DIR * dir; @@ -210,7 +213,7 @@ char name[256]; - if( dlp_ReadDBList(sd, 0, 0x80, i, &info) < 0) + if( dlp_ReadDBList(sd, 0, (rom ? 0x40 : 0x80), i, &info) < 0) break; i = info.index + 1; @@ -225,8 +228,9 @@ if (info.flags & dlpDBFlagResource) strcat(name,".prc"); - else + else if (!(info.flags & dlpDBFlagClipping)) strcat(name,".pdb"); + /* PQAs should staq PQAs */ for(x = 0; x < numexclude; x++) { /* printf("Skipcheck:%s:%s:\n",exclude[x],info.name); */ @@ -254,7 +258,7 @@ fflush(stdout); /* Ensure that DB-open flag is not kept */ - info.flags &= 0xff; + info.flags &= 0x2fd; f = pi_file_create(name, &info); if (f==0) { @@ -317,13 +321,13 @@ protect_name(name, dbname); if (info.flags & dlpDBFlagResource) strcat(name,".prc"); - else + else if (!(info.flags & dlpDBFlagClipping)) strcat(name,".pdb"); printf("Fetching '%s'... ", name); fflush(stdout); - info.flags &= 0xff; + info.flags &= 0x2fd; f = pi_file_create(name, &info); if (f==0) { @@ -744,7 +748,7 @@ } /* Check for commands that take a single argument */ - else if (strchr("bus", argv[i][1])) { + else if (strchr("busBUS", argv[i][1])) { mode = 0; if (++i >= argc) { fprintf(stderr, "%s: Options '%s' requires argument\n", argv[0], argv[i-1]); @@ -799,7 +803,7 @@ for(i=1;i&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + if "$LD" -v 2>&1 < /dev/null | grep GNU > /dev/null; then + test "$with_gnu_ld" != no && break + elif "$LD" -v 2>&1 < /dev/null | grep 'with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break @@ -679,7 +681,10 @@ # Check to see if it really is or is not GNU ld. echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6 # I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then + +if $LD -v 2>&1 &5; then + with_gnu_ld=yes +elif $LD -v 2>&1 &5; then with_gnu_ld=yes else with_gnu_ld=no @@ -946,7 +951,9 @@ esac # If we're using GNU nm, then use its standard symbol codes. -if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then +if $NM -V 2>&1 | grep GNU > /dev/null; then + symcode='[ABCDGISTUW]' +elif $NM -V 2>&1 | grep 'with BFD' > /dev/null; then symcode='[ABCDGISTUW]' fi