Thread View: net.sources.bugs
1 messages
1 total messages
Started by SKY
Sat, 07 Mar 1987 06:26
patch for new shar
Author: SKY
Date: Sat, 07 Mar 1987 06:26
Date: Sat, 07 Mar 1987 06:26
96 lines
3078 bytes
3078 bytes
Rogue Monster's shar works very fast but I edited it to use getopt
instead of getarg. The world doesn't need yet another getopt
lookalike. Getopt is standard in many Unix distributions now. If you
don't have it, rumage through old source postings.
The -o option doesn't seem to work. How about a man page too?
Ken
*** Orig/shar.c Sat Mar 7 00:53:31 1987
--- shar.c Sat Mar 7 01:06:38 1987
***************
*** 17,23 ****
extern int strlen();
extern char *strcpy();
extern int strcmp();
! extern int getarg();
extern stat();
extern char strcat();
extern long atol();
--- 17,23 ----
extern int strlen();
extern char *strcpy();
extern int strcmp();
! extern int getopt();
extern stat();
extern char strcat();
extern long atol();
***************
*** 529,535 ****
* -p = use original permissions
* -q = generate quite code
*/
! while ((c = getarg(argc,argv,"cf:im:opq")) != EOF)
switch (c){
case 'c':
Check = 1;
--- 529,535 ----
* -p = use original permissions
* -q = generate quite code
*/
! while ((c = getopt(argc,argv,"cf:im:opq")) != EOF)
switch (c){
case 'c':
Check = 1;
***************
*** 553,567 ****
case 'q':
Quiet = 1;
break;
! case '?':
fprintf(stderr,"Unknown switch: -%c\n",c);
break;
! default:
/*
* File names can be absolute or relative, decide which
* tree the filename goes in.
*/
! SourceName = optarg;
if (*optarg == '/')
tre = ParseFileName(&Abs,++optarg);
else
--- 553,568 ----
case 'q':
Quiet = 1;
break;
! default:
fprintf(stderr,"Unknown switch: -%c\n",c);
break;
! }
! while (optind < argc){
/*
* File names can be absolute or relative, decide which
* tree the filename goes in.
*/
! SourceName = optarg = argv[optind++];
if (*optarg == '/')
tre = ParseFileName(&Abs,++optarg);
else
***************
*** 571,577 ****
*/
if (tre && (tre->Flags & F_DIR))
ExpandTree(tre);
! }
/*
* Do tests, additional tree building if required.
*/
--- 572,578 ----
*/
if (tre && (tre->Flags & F_DIR))
ExpandTree(tre);
! }
/*
* Do tests, additional tree building if required.
*/
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads