*** /tmp/,RCSt1016031	Mon May 19 13:39:32 1986
--- arwrite.c	Mon May 19 13:39:17 1986
***************
*** 34,39
  	struct stat statbuf;
  	FILE *instream;
  	long i;
  
  	/* stat() the file to get the stuff for the header */
  	if( stat(filename,&statbuf) < 0 )

--- 34,44 -----
  	struct stat statbuf;
  	FILE *instream;
  	long i;
+ 	char *name;
+ #ifdef SYSIII
+ #define rindex() strrchr()
+ #endif
+ 	extern char *rindex();
  
  	/* stat() the file to get the stuff for the header */
  	if( stat(filename,&statbuf) < 0 )
***************
*** 48,54
  		/* error! */
  		return(-1);
  	}
! 
  	/* Now write the header */
  	/* This information gleaned from ar(4) in V.2 */
  	fprintf(stream,

--- 53,69 -----
  		/* error! */
  		return(-1);
  	}
! /* extract basename */
! 	if (( name = rindex(filename, '/')) != NULL)
! 		name++;
! 	else 
! 		name = filename;
! /* Truncate filename */
! 	if (strlen(name) > 14) {
! 		fprintf(stderr, "par: filename %s ", name);
! 		name[15] = '\0';
! 		fprintf(stderr, "truncated to %s\n", name);
! 	}
  	/* Now write the header */
  	/* This information gleaned from ar(4) in V.2 */
  	fprintf(stream,
***************
*** 53,59
  	/* This information gleaned from ar(4) in V.2 */
  	fprintf(stream,
  		"%-16s%-12ld%-6d%-6d%-8o%-10ld%2s",
! 		filename,
  		statbuf.st_mtime,
  		statbuf.st_uid,
  		statbuf.st_gid,

--- 68,74 -----
  	/* This information gleaned from ar(4) in V.2 */
  	fprintf(stream,
  		"%-16s%-12ld%-6d%-6d%-8o%-10ld%2s",
! 		name,
  		statbuf.st_mtime,
  		statbuf.st_uid,
  		statbuf.st_gid,
