summaryrefslogtreecommitdiffstats
path: root/bin/pax/pat_rep.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/pax/pat_rep.c')
-rw-r--r--bin/pax/pat_rep.c115
1 files changed, 7 insertions, 108 deletions
diff --git a/bin/pax/pat_rep.c b/bin/pax/pat_rep.c
index 769ac94..8be1145 100644
--- a/bin/pax/pat_rep.c
+++ b/bin/pax/pat_rep.c
@@ -72,15 +72,15 @@ static PATTERN *pattail = NULL; /* file pattern match list tail */
static REPLACE *rephead = NULL; /* replacement string list head */
static REPLACE *reptail = NULL; /* replacement string list tail */
-static int rep_name __P((char *, int *, int));
-static int tty_rename __P((register ARCHD *));
-static int fix_path __P((char *, int *, char *, int));
-static int fn_match __P((register char *, register char *, char **));
-static char * range_match __P((register char *, register int));
+static int rep_name(char *, int *, int);
+static int tty_rename(register ARCHD *);
+static int fix_path(char *, int *, char *, int);
+static int fn_match(register char *, register char *, char **);
+static char * range_match(register char *, register int);
#ifdef NET2_REGEX
-static int resub __P((regexp *, char *, char *, register char *));
+static int resub(regexp *, char *, char *, register char *);
#else
-static int resub __P((regex_t *, regmatch_t *, char *, char *, char *));
+static int resub(regex_t *, regmatch_t *, char *, char *, char *);
#endif
/*
@@ -99,14 +99,8 @@ static int resub __P((regex_t *, regmatch_t *, char *, char *, char *));
* the list of replacement patterns; -1 otherwise.
*/
-#ifdef __STDC__
int
rep_add(register char *str)
-#else
-int
-rep_add(str)
- register char *str;
-#endif
{
register char *pt1;
register char *pt2;
@@ -227,15 +221,8 @@ rep_add(str)
* 0 if the pattern was added to the list, -1 otherwise
*/
-#ifdef __STDC__
int
pat_add(char *str, char *chdname)
-#else
-int
-pat_add(str, chdname)
- char *str;
- char *chdname;
-#endif
{
register PATTERN *pt;
@@ -279,13 +266,8 @@ pat_add(str, chdname)
* a selected archive member.
*/
-#ifdef __STDC__
void
pat_chk(void)
-#else
-void
-pat_chk()
-#endif
{
register PATTERN *pt;
register int wban = 0;
@@ -321,14 +303,8 @@ pat_chk()
* match, -1 otherwise.
*/
-#ifdef __STDC__
int
pat_sel(register ARCHD *arcn)
-#else
-int
-pat_sel(arcn)
- register ARCHD *arcn;
-#endif
{
register PATTERN *pt;
register PATTERN **ppt;
@@ -446,14 +422,8 @@ pat_sel(arcn)
* looking for more members)
*/
-#ifdef __STDC__
int
pat_match(register ARCHD *arcn)
-#else
-int
-pat_match(arcn)
- register ARCHD *arcn;
-#endif
{
register PATTERN *pt;
@@ -524,16 +494,8 @@ pat_match(arcn)
* Note: *pend may be changed to show where the prefix ends.
*/
-#ifdef __STDC__
static int
fn_match(register char *pattern, register char *string, char **pend)
-#else
-static int
-fn_match(pattern, string, pend)
- register char *pattern;
- register char *string;
- char **pend;
-#endif
{
register char c;
char test;
@@ -605,15 +567,8 @@ fn_match(pattern, string, pend)
/* NOTREACHED */
}
-#ifdef __STDC__
static char *
range_match(register char *pattern, register int test)
-#else
-static char *
-range_match(pattern, test)
- register char *pattern;
- register int test;
-#endif
{
register char c;
register char c2;
@@ -655,14 +610,8 @@ range_match(pattern, test)
* 0 continue to process file, 1 skip this file, -1 pax is finished
*/
-#ifdef __STDC__
int
mod_name(register ARCHD *arcn)
-#else
-int
-mod_name(arcn)
- register ARCHD *arcn;
-#endif
{
register int res = 0;
@@ -754,14 +703,8 @@ mod_name(arcn)
* 0 process this file, 1 skip this file, -1 we need to exit pax
*/
-#ifdef __STDC__
static int
tty_rename(register ARCHD *arcn)
-#else
-static int
-tty_rename(arcn)
- register ARCHD *arcn;
-#endif
{
char tmpname[PAXPATHLEN+2];
int res;
@@ -826,16 +769,8 @@ tty_rename(arcn)
* 0 if ok, -1 if failure (name too long)
*/
-#ifdef __STDC__
int
set_dest(register ARCHD *arcn, char *dest_dir, int dir_len)
-#else
-int
-set_dest(arcn, dest_dir, dir_len)
- register ARCHD *arcn;
- char *dest_dir;
- int dir_len;
-#endif
{
if (fix_path(arcn->name, &(arcn->nlen), dest_dir, dir_len) < 0)
return(-1);
@@ -861,17 +796,8 @@ set_dest(arcn, dest_dir, dir_len)
* 0 if ok, -1 if the final name is too long
*/
-#ifdef __STDC__
static int
fix_path( char *or_name, int *or_len, char *dir_name, int dir_len)
-#else
-static int
-fix_path(or_name, or_len, dir_name, dir_len)
- char *or_name;
- int *or_len;
- char *dir_name;
- int dir_len;
-#endif
{
register char *src;
register char *dest;
@@ -933,16 +859,8 @@ fix_path(or_name, or_len, dir_name, dir_len)
* ended up empty)
*/
-#ifdef __STDC__
static int
rep_name(char *name, int *nlen, int prnt)
-#else
-static int
-rep_name(name, nlen, prnt)
- char *name;
- int *nlen;
- int prnt;
-#endif
{
register REPLACE *pt;
register char *inpt;
@@ -1107,17 +1025,8 @@ rep_name(name, nlen, prnt)
* -1 if error, or the number of characters added to the destination.
*/
-#ifdef __STDC__
static int
resub(regexp *prog, char *src, char *dest, register char *destend)
-#else
-static int
-resub(prog, src, dest, destend)
- regexp *prog;
- char *src;
- char *dest;
- register char *destend;
-#endif
{
register char *spt;
register char *dpt;
@@ -1165,19 +1074,9 @@ resub(prog, src, dest, destend)
* -1 if error, or the number of characters added to the destination.
*/
-#ifdef __STDC__
static int
resub(regex_t *rp, register regmatch_t *pm, char *src, char *dest,
register char *destend)
-#else
-static int
-resub(rp, pm, src, dest, destend)
- regex_t *rp;
- register regmatch_t *pm;
- char *src;
- char *dest;
- register char *destend;
-#endif
{
register char *spt;
register char *dpt;
OpenPOWER on IntegriCloud