9 date 92.12.15.00.20.22; author jromine; state Exp;
14 date 92.02.03.17.51.44; author jromine; state Exp;
19 date 90.04.05.15.32.54; author sources; state Exp;
24 date 90.04.05.14.50.42; author sources; state Exp;
29 date 90.03.20.16.25.34; author sources; state Exp;
34 date 90.03.20.16.25.17; author sources; state Exp;
48 @/* bbtar.c - generate the names of archive files to be put to tape */
50 static char ident[] = "@@(#)$Id: bbtar.c,v 1.5 1992/02/03 17:51:44 jromine Exp jromine $";
55 % cd ~bboards/archive # followed by one of:
57 % tar cv `bbtar private` # to save private BBoard archives
58 % tar cv `bbtar public` # to save public BBoard archives
59 % tar cv `bbtar` # to save all BBoard archives
66 #include <sys/types.h>
68 #include "../zotnet/bboards.h"
76 static char archives[BUFSIZ];
82 struct passwd *getpwnam ();
97 if ((pw = getpwnam (BBOARDS)) == NULL)
99 (void) sprintf (archives, "%s/archive/", pw -> pw_dir);
102 priv = strcmp (argv[1], "private") == 0 ? 1
103 : strcmp (argv[1], "public") == 0 ? -1
106 (void) setbbent (SB_STAY);
107 while (bb = getbbent ())
121 if (stat (bb -> bb_archive, &st) == NOTOK)
123 if (strncmp (archives, bb -> bb_archive, strlen (archives)) == 0)
124 bb -> bb_archive += strlen (archives);
127 printf ("%s\n", bb -> bb_archive);
129 if ((st.st_mode & 0444) != 0444 ? (priv > 0) : (priv < 0))
130 printf ("%s\n", bb -> bb_archive);
143 static char ident[] = "@@(#)$Id: bbtar.c,v 1.4 1990/04/05 15:32:54 sources Exp jromine $";
155 static char ident[] = "@@(#)$Id:$";
168 static char ident[] = "$Id:";