home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Supreme Volume 6 #1
/
swsii.zip
/
swsii
/
165
/
ASPIPAT.ZIP
/
ASPIPATC
< prev
next >
Wrap
Text File
|
1992-01-26
|
11KB
|
359 lines
*** ../tar-1.10/Makefile Wed Jun 26 07:29:06 1991
--- Makefile Wed Jan 15 01:35:02 1992
***************
*** 159,164 ****
--- 159,182 ----
#DEFBLOCKING = 20
#O = obj
+ # (Yeah!) MS-DOS (Microsoft C 5.1) version
+ # if you don't want the aspi functions just remove the -DASPI from the
+ # DEFS line and the aspi.c and aspi.$O from LOCAL_SRC & LOCAL_OBJ
+ #CC = cl
+ #MODEL = M
+ #DEFS = -nologo -DNONAMES -D__MSDOS__ -A$(MODEL) -DNO_REMOTE -DASPI
+ #LOCAL_SRC = getdate.c aspi.c
+ #LOCAL_OBJ = getdate.$O aspi.$O
+ #LDFLAGS =
+ #LIBS = $(MODEL)dir.lib
+ #LINT = $(CC)
+ #LINTFLAGS = -W3
+ #DEF_AR_FILE = \"tar.out\"
+ ## for the next line see the file ASPI.DOC
+ #DEFAULT_TAPE_ID = \"0:4:0\"
+ #DEFBLOCKING = 20
+ #O = obj
+
# V7 version
# Pick open3 emulation or nonexistence. See open3.h, port.c.
##DEFS = -DV7 -DEMUL_OPEN3 -Dvoid=int
***************
*** 269,280 ****
testpad: testpad.o
$(CC) -o testpad testpad.o
! # command is too long for Messy-Dos (128 char line length limit) so
! # this kludge is used...
! # @echo $(OBJ1) + > command
! # @echo $(OBJ2) >> command
! # link @command, $@,,$(LIBS) /NOI;
! # @$(RM) command
install: all
$(RM) $(bindir)/tar
--- 287,316 ----
testpad: testpad.o
$(CC) -o testpad testpad.o
! # This is for MSDOS, say "make dossall" instead of "make all"
!
! dosall: tar.exe ctctrl.exe
!
! tar.exe: $(OBJS)
! @echo $(OBJ1) + >linkcmd
! @echo $(OBJ2) + >> linkcmd
! @echo $(OBJ3) >> linkcmd
! link @linkcmd, $@,,,, /NOI
!
! ctctrl.exe: getopt.$O ctctrl.$O scsi.$O
! $(CC) $(COPTS) $(LDFLAGS) -o ctctrl getopt.$O ctctrl.$O scsi.$O
!
! ctctrl.obj: ctctrl.c scsi.h scsierr.h aspi.h
!
! aspi.obj: aspi.c
! $(CC) -nologo $(COPTS) -A$(MODEL) -DTAPE_ID=$(DEFAULT_TAPE_ID) \
! -c aspi.c
!
! scsi.obj: aspi.c
! $(CC) -nologo $(COPTS) -A$(MODEL) -DTAPE_ID=$(DEFAULT_TAPE_ID) \
! -DCTCTRL /Foscsi.obj -c aspi.c
!
!
install: all
$(RM) $(bindir)/tar
*** ../tar-1.10/diffarch.c Thu Dec 13 21:13:20 1990
--- diffarch.c Wed Jan 15 00:13:57 1992
***************
*** 39,44 ****
--- 39,46 ----
#if !defined(USG) || defined(HAVE_MTIO)
#include <sys/mtio.h>
#endif
+ #else
+ #include <fcntl.h>
#endif
#ifdef USG
***************
*** 189,195 ****
}
diff_fd = open(head->header.name, O_NDELAY|O_RDONLY);
!
if (diff_fd < 0 && !f_absolute_paths) {
char tmpbuf[NAMSIZ+2];
--- 191,199 ----
}
diff_fd = open(head->header.name, O_NDELAY|O_RDONLY);
! #ifdef __MSDOS__
! setmode(diff_fd, O_BINARY);
! #endif
if (diff_fd < 0 && !f_absolute_paths) {
char tmpbuf[NAMSIZ+2];
***************
*** 359,365 ****
--- 363,373 ----
break;
}
+ #ifndef __MSDOS__
diff_fd = open(head->header.name, O_NDELAY|O_RDONLY);
+ #else
+ diff_fd = open(head->header.name, O_NDELAY|O_RDONLY|O_BINARY);
+ #endif
if (diff_fd < 0) {
msg_perror("cannot open file %s",head->header.name);
***************
*** 395,411 ****
{
int err;
! err=read(diff_fd,diff_buf,bytes);
! if(err!=bytes) {
if(err<0) {
msg_perror("can't read %s",head->header.name);
} else {
! fprintf(msg_file,"%s: could only read %d of %d bytes\n",head->header.name,err,bytes);
}
different++;
return -1;
}
! if(bcmp(buffer,diff_buf,bytes)) {
fprintf(msg_file, "%s: data differs\n",head->header.name);
different++;
return -1;
--- 403,419 ----
{
int err;
! err=read(diff_fd,diff_buf,( unsigned ) bytes);
! if(err!=( int ) bytes) {
if(err<0) {
msg_perror("can't read %s",head->header.name);
} else {
! fprintf(msg_file,"%s: could only read %d of %ld bytes\n",head->header.name,err,bytes);
}
different++;
return -1;
}
! if(bcmp(buffer,diff_buf,( unsigned ) bytes)) {
fprintf(msg_file, "%s: data differs\n",head->header.name);
different++;
return -1;
***************
*** 418,424 ****
long bytes;
char *buffer;
{
! if(bcmp(buffer,diff_dir,bytes)) {
fprintf(msg_file, "%s: data differs\n",head->header.name);
different++;
return -1;
--- 426,432 ----
long bytes;
char *buffer;
{
! if(bcmp(buffer,diff_dir,( unsigned ) bytes)) {
fprintf(msg_file, "%s: data differs\n",head->header.name);
different++;
return -1;
***************
*** 556,562 ****
if (err < 0)
msg_perror("can't read %s", head->header.name);
else
! fprintf(msg_file, "%s: could only read %d of %d bytes\n",
err, numbytes);
break;
}
--- 564,570 ----
if (err < 0)
msg_perror("can't read %s", head->header.name);
else
! fprintf(msg_file, "%s: could only read %d of %ld bytes\n",
err, numbytes);
break;
}
***************
*** 569,584 ****
userec(datarec);
datarec = findrec();
}
! if ((err = read(diff_fd, buf, numbytes)) != numbytes) {
if (err < 0)
msg_perror("can't read %s", head->header.name);
else
! fprintf(msg_file, "%s: could only read %d of %d bytes\n",
err, numbytes);
break;
}
! if (bcmp(buf, datarec->charptr, numbytes)) {
different++;
break;
}
--- 577,592 ----
userec(datarec);
datarec = findrec();
}
! if ((err = read(diff_fd, buf, ( unsigned ) numbytes)) != (int) numbytes) {
if (err < 0)
msg_perror("can't read %s", head->header.name);
else
! fprintf(msg_file, "%s: could only read %d of %ld bytes\n",
err, numbytes);
break;
}
! if (bcmp(buf, datarec->charptr, ( unsigned ) numbytes)) {
different++;
break;
}
*** ../tar-1.10/getopt.c Thu Jun 20 05:14:03 1991
--- getopt.c Wed Jan 15 01:52:38 1992
***************
*** 59,65 ****
char *malloc ();
#endif /* STDC_HEADERS or __GNU_LIBRARY__ */
! #if defined(USG) || defined(STDC_HEADERS) || defined(__GNU_LIBRARY__)
#include <string.h>
#define bcopy(s, d, n) memcpy ((d), (s), (n))
#define index strchr
--- 59,65 ----
char *malloc ();
#endif /* STDC_HEADERS or __GNU_LIBRARY__ */
! #if defined(USG) || defined(STDC_HEADERS) || defined(__GNU_LIBRARY__) || defined(MSDOS)
#include <string.h>
#define bcopy(s, d, n) memcpy ((d), (s), (n))
#define index strchr
*** ../tar-1.10/port.c Mon May 20 19:55:06 1991
--- port.c Wed Jan 15 00:14:09 1992
***************
*** 651,657 ****
#ifdef WANT_MKNOD
#ifdef __MSDOS__
! typedef int dev_t;
#endif
/* Fake mknod by complaining */
int
--- 651,657 ----
#ifdef WANT_MKNOD
#ifdef __MSDOS__
! /* typedef int dev_t; /* we don't need this with MSC 5.1 or later */
#endif
/* Fake mknod by complaining */
int
*** ../tar-1.10/rmt.h Thu Oct 25 19:59:32 1990
--- rmt.h Wed Jan 15 00:14:13 1992
***************
*** 18,33 ****
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifdef NO_REMOTE
! #define _isrmt(f) 0
#define rmtopen open
- #define rmtaccess access
- #define rmtstat stat
- #define rmtcreat creat
- #define rmtlstat lstat
#define rmtread read
#define rmtwrite write
! #define rmtlseek lseek
#define rmtclose close
#define rmtioctl ioctl
#define rmtdup dup
#define rmtfstat fstat
--- 18,50 ----
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifdef NO_REMOTE
!
! #ifdef ASPI
! extern int aspiopen(char *, int, int);
! extern int aspiread(int, char *, int);
! extern int aspiwrite(int, char *, int);
! extern int aspicreat(char *, int);
! extern int aspiclose( int );
! extern long aspilseek(int, long, int);
! #define rmtopen aspiopen
! #define rmtread aspiread
! #define rmtwrite aspiwrite
! #define rmtcreat aspicreat
! #define rmtclose aspiclose
! #define rmtlseek aspilseek
! #else
#define rmtopen open
#define rmtread read
#define rmtwrite write
! #define rmtcreat creat
#define rmtclose close
+ #define rmtlseek lseek
+ #endif /* ASPI */
+
+ #define _isrmt(f) 0
+ #define rmtaccess access
+ #define rmtstat stat
+ #define rmtlstat lstat
#define rmtioctl ioctl
#define rmtdup dup
#define rmtfstat fstat
*** ../tar-1.10/tar.c Wed Jun 5 18:56:34 1991
--- tar.c Wed Jan 15 00:14:15 1992
***************
*** 640,646 ****
-g, +listed-incremental F create/list/extract new GNU-format incremental backup\n\
-h, +dereference don't dump symlinks; dump the files they point to\n\
-i, +ignore-zeros ignore blocks of zeros in archive (normally mean EOF)\n\
! -k, +keep-old-files keep existing files; don't overwrite them from archive\n\
-K, +starting-file FILE begin at FILE in the archive\n\
-l, +one-file-system stay in local file system when creating an archive\n\
-L, +tape-length LENGTH change tapes after writing LENGTH\n\
--- 640,647 ----
-g, +listed-incremental F create/list/extract new GNU-format incremental backup\n\
-h, +dereference don't dump symlinks; dump the files they point to\n\
-i, +ignore-zeros ignore blocks of zeros in archive (normally mean EOF)\n\
! ", stderr); /* CHRIS */ fputs("\
! -k, +keep-old-files keep existing files; don't overwrite them from archive\n\
-K, +starting-file FILE begin at FILE in the archive\n\
-l, +one-file-system stay in local file system when creating an archive\n\
-L, +tape-length LENGTH change tapes after writing LENGTH\n\
***************
*** 649,654 ****
--- 650,656 ----
-M, +multi-volume create/list/extract multi-volume archive\n\
-N, +after-date DATE,\n\
+newer DATE only store files newer than DATE\n\
+ ", stderr); /* CHRIS */ fputs("\
-o, +old-archive,\n\
+portability write a V7 format archive, rather than ANSI format\n\
-O, +to-stdout extract files to standard output\n\
***************
*** 664,669 ****
--- 666,672 ----
-S, +sparse handle sparse files efficiently\n\
-T, +files-from F get names to extract or create from file F\n\
+totals print total bytes written with +create\n\
+ ", stderr); /* CHRIS */ fputs("\
-v, +verbose verbosely list files processed\n\
-V, +label NAME create archive with volume name NAME\n\
+version print tar program version number\n\