Deleted Added
full compact
co.c (10) co.c (1494)
1/* Copyright (C) 1982, 1988, 1989 Walter Tichy
2 Copyright 1990, 1991 by Paul Eggert
3 Distributed under license by the Free Software Foundation, Inc.
4
5This file is part of RCS.
6
7RCS is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by

--- 20 unchanged lines hidden (view full) ---

29 */
30/*****************************************************************************
31 * check out revisions from RCS files
32 *****************************************************************************
33 */
34
35
36/* $Log: co.c,v $
1/* Copyright (C) 1982, 1988, 1989 Walter Tichy
2 Copyright 1990, 1991 by Paul Eggert
3 Distributed under license by the Free Software Foundation, Inc.
4
5This file is part of RCS.
6
7RCS is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by

--- 20 unchanged lines hidden (view full) ---

29 */
30/*****************************************************************************
31 * check out revisions from RCS files
32 *****************************************************************************
33 */
34
35
36/* $Log: co.c,v $
37 * Revision 1.1.1.1 1993/06/18 04:22:11 jkh
38 * Updated GNU utilities
39 *
37 * Revision 5.9 1991/10/07 17:32:46 eggert
38 * ci -u src/RCS/co.c,v src/co.c <<\.
39 * -k affects just working file, not RCS file.
40 *
41 * Revision 5.8 1991/08/19 03:13:55 eggert
42 * Warn before removing somebody else's file.
43 * Add -M. Fix co -j bugs. Tune.
44 *

--- 102 unchanged lines hidden (view full) ---

147static int buildjoin P((char const*));
148static int preparejoin P((void));
149static int rmlock P((struct hshentry const*));
150static int rmworkfile P((void));
151static void cleanup P((void));
152
153static char const quietarg[] = "-q";
154
40 * Revision 5.9 1991/10/07 17:32:46 eggert
41 * ci -u src/RCS/co.c,v src/co.c <<\.
42 * -k affects just working file, not RCS file.
43 *
44 * Revision 5.8 1991/08/19 03:13:55 eggert
45 * Warn before removing somebody else's file.
46 * Add -M. Fix co -j bugs. Tune.
47 *

--- 102 unchanged lines hidden (view full) ---

150static int buildjoin P((char const*));
151static int preparejoin P((void));
152static int rmlock P((struct hshentry const*));
153static int rmworkfile P((void));
154static void cleanup P((void));
155
156static char const quietarg[] = "-q";
157
155static char const *expandarg, *join, *suffixarg, *versionarg;
158static char const *expandarg, *join, *suffixarg, *versionarg, *incexcarg;
156static char const *joinlist[joinlength]; /* revisions to be joined */
157static FILE *neworkptr;
158static int exitstatus;
159static int forceflag;
160static int lastjoin; /* index of last element in joinlist */
161static int lockflag; /* -1 -> unlock, 0 -> do nothing, 1 -> lock */
162static int mtimeflag;
163static struct hshentries *gendeltas; /* deltas to be generated */
164static struct hshentry *targetdelta; /* final delta to be generated */
165static struct stat workstat;
166
159static char const *joinlist[joinlength]; /* revisions to be joined */
160static FILE *neworkptr;
161static int exitstatus;
162static int forceflag;
163static int lastjoin; /* index of last element in joinlist */
164static int lockflag; /* -1 -> unlock, 0 -> do nothing, 1 -> lock */
165static int mtimeflag;
166static struct hshentries *gendeltas; /* deltas to be generated */
167static struct hshentry *targetdelta; /* final delta to be generated */
168static struct stat workstat;
169
167mainProg(coId, "co", "$Id: co.c,v 5.9 1991/10/07 17:32:46 eggert Exp $")
170mainProg(coId, "co", "$Id: co.c,v 1.1.1.1 1993/06/18 04:22:11 jkh Exp $")
168{
169 static char const cmdusage[] =
170 "\nco usage: co -{flpqru}[rev] -ddate -jjoinlist -sstate -w[login] -Vn file ...";
171
172 char *a, **newargv;
173 char const *author, *date, *rev, *state;
174 char const *joinfilename, *newdate, *neworkfilename;
175 int changelock; /* 1 if a lock has been changed, -1 if error */

--- 89 unchanged lines hidden (view full) ---

265 suffixes = a;
266 break;
267
268 case 'V':
269 versionarg = *argv;
270 setRCSversion(versionarg);
271 break;
272
171{
172 static char const cmdusage[] =
173 "\nco usage: co -{flpqru}[rev] -ddate -jjoinlist -sstate -w[login] -Vn file ...";
174
175 char *a, **newargv;
176 char const *author, *date, *rev, *state;
177 char const *joinfilename, *newdate, *neworkfilename;
178 int changelock; /* 1 if a lock has been changed, -1 if error */

--- 89 unchanged lines hidden (view full) ---

268 suffixes = a;
269 break;
270
271 case 'V':
272 versionarg = *argv;
273 setRCSversion(versionarg);
274 break;
275
276 case 'K': /* set keyword inclusions/exclusions */
277 incexcarg = *argv;
278 setIncExc(incexcarg);
279 break;
273 case 'k': /* set keyword expand mode */
274 expandarg = *argv;
275 if (0 <= expmode) redefined('k');
276 if (0 <= (expmode = str2expmode(a)))
277 break;
278 /* fall into */
279 default:
280 faterror("unknown option: %s%s", *argv, cmdusage);

--- 489 unchanged lines hidden ---
280 case 'k': /* set keyword expand mode */
281 expandarg = *argv;
282 if (0 <= expmode) redefined('k');
283 if (0 <= (expmode = str2expmode(a)))
284 break;
285 /* fall into */
286 default:
287 faterror("unknown option: %s%s", *argv, cmdusage);

--- 489 unchanged lines hidden ---