diff options
author | Xavier Santolaria <xsa@cvs.openbsd.org> | 2007-06-28 21:38:10 +0000 |
---|---|---|
committer | Xavier Santolaria <xsa@cvs.openbsd.org> | 2007-06-28 21:38:10 +0000 |
commit | 407481b866fe55a776965e56142aff89bb3491a9 (patch) | |
tree | b9c46d178fb4b8db7ff03ed4d143f190a533cd3d /usr.bin | |
parent | d9f5a5e9b0a4c8a8195c2bee0e55b5edf05c9f10 (diff) |
Sync revisions and time buffers size to be consistent with each others.
Simplifies further size tweaks if needed.
OK niallo@ ray@.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/cvs/add.c | 7 | ||||
-rw-r--r-- | usr.bin/cvs/admin.c | 4 | ||||
-rw-r--r-- | usr.bin/cvs/checkout.c | 7 | ||||
-rw-r--r-- | usr.bin/cvs/client.c | 15 | ||||
-rw-r--r-- | usr.bin/cvs/cvs.h | 5 | ||||
-rw-r--r-- | usr.bin/cvs/diff.c | 4 | ||||
-rw-r--r-- | usr.bin/cvs/diff3.c | 6 | ||||
-rw-r--r-- | usr.bin/cvs/edit.c | 6 | ||||
-rw-r--r-- | usr.bin/cvs/file.c | 6 | ||||
-rw-r--r-- | usr.bin/cvs/getlog.c | 6 | ||||
-rw-r--r-- | usr.bin/cvs/history.c | 4 | ||||
-rw-r--r-- | usr.bin/cvs/import.c | 6 | ||||
-rw-r--r-- | usr.bin/cvs/rcs.c | 6 | ||||
-rw-r--r-- | usr.bin/cvs/remove.c | 4 | ||||
-rw-r--r-- | usr.bin/cvs/status.c | 4 | ||||
-rw-r--r-- | usr.bin/cvs/tag.c | 4 | ||||
-rw-r--r-- | usr.bin/cvs/update.c | 6 |
17 files changed, 53 insertions, 47 deletions
diff --git a/usr.bin/cvs/add.c b/usr.bin/cvs/add.c index 30a0ec4767b..36aa13e556c 100644 --- a/usr.bin/cvs/add.c +++ b/usr.bin/cvs/add.c @@ -1,4 +1,4 @@ -/* $OpenBSD: add.c,v 1.77 2007/02/22 06:42:09 otto Exp $ */ +/* $OpenBSD: add.c,v 1.78 2007/06/28 21:38:09 xsa Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org> @@ -251,7 +251,7 @@ static void add_file(struct cvs_file *cf) { int added, stop; - char revbuf[16]; + char revbuf[CVS_REV_BUFSZ]; RCSNUM *head; if (cf->file_rcs != NULL) { @@ -333,7 +333,8 @@ static void add_entry(struct cvs_file *cf) { FILE *fp; - char entry[CVS_ENT_MAXLINELEN], path[MAXPATHLEN], revbuf[16], tbuf[32]; + char entry[CVS_ENT_MAXLINELEN], path[MAXPATHLEN]; + char revbuf[CVS_REV_BUFSZ], tbuf[CVS_TIME_BUFSZ]; CVSENTRIES *entlist; if (cvs_noexec == 1) diff --git a/usr.bin/cvs/admin.c b/usr.bin/cvs/admin.c index cadb6f65bc3..87f71da1193 100644 --- a/usr.bin/cvs/admin.c +++ b/usr.bin/cvs/admin.c @@ -1,4 +1,4 @@ -/* $OpenBSD: admin.c,v 1.50 2007/02/22 06:42:09 otto Exp $ */ +/* $OpenBSD: admin.c,v 1.51 2007/06/28 21:38:09 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * Copyright (c) 2005 Joris Vink <joris@openbsd.org> @@ -329,7 +329,7 @@ cvs_admin_local(struct cvs_file *cf) if (orange != NULL) { struct rcs_delta *rdp, *nrdp; - char b[16]; + char b[CVS_REV_BUFSZ]; cvs_revision_select(cf->file_rcs, orange); for (rdp = TAILQ_FIRST(&(cf->file_rcs->rf_delta)); diff --git a/usr.bin/cvs/checkout.c b/usr.bin/cvs/checkout.c index 46b4385bff8..e523fe727ce 100644 --- a/usr.bin/cvs/checkout.c +++ b/usr.bin/cvs/checkout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: checkout.c,v 1.95 2007/06/27 03:58:16 joris Exp $ */ +/* $OpenBSD: checkout.c,v 1.96 2007/06/28 21:38:09 xsa Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -217,8 +217,9 @@ cvs_checkout_file(struct cvs_file *cf, RCSNUM *rnum, int co_flags) CVSENTRIES *ent; struct timeval tv[2]; char *tosend; - char template[MAXPATHLEN], *p, entry[CVS_ENT_MAXLINELEN], rev[16]; - char timebuf[64], kbuf[8], tbuf[32], stickytag[32]; + char template[MAXPATHLEN], *p, entry[CVS_ENT_MAXLINELEN]; + char kbuf[8], stickytag[32], rev[CVS_REV_BUFSZ]; + char timebuf[CVS_TIME_BUFSZ], tbuf[CVS_TIME_BUFSZ]; exists = 0; tosend = NULL; diff --git a/usr.bin/cvs/client.c b/usr.bin/cvs/client.c index c6b4ab9347e..7a5000e823f 100644 --- a/usr.bin/cvs/client.c +++ b/usr.bin/cvs/client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.66 2007/06/27 20:42:19 joris Exp $ */ +/* $OpenBSD: client.c,v 1.67 2007/06/28 21:38:09 xsa Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -436,7 +436,7 @@ void cvs_client_sendfile(struct cvs_file *cf) { size_t len; - char rev[16], timebuf[64], sticky[32]; + char rev[CVS_REV_BUFSZ], timebuf[CVS_TIME_BUFSZ], sticky[32]; if (cf->file_type != CVS_FILE) return; @@ -585,8 +585,8 @@ cvs_client_checkedin(char *data) { CVSENTRIES *entlist; struct cvs_ent *ent, *newent; - char *dir, *e, entry[CVS_ENT_MAXLINELEN], rev[16], timebuf[64]; - char sticky[CVS_ENT_MAXLINELEN]; + char *dir, *e, entry[CVS_ENT_MAXLINELEN], rev[CVS_REV_BUFSZ]; + char sticky[CVS_ENT_MAXLINELEN], timebuf[CVS_TIME_BUFSZ]; if (data == NULL) fatal("Missing argument for Checked-in"); @@ -630,8 +630,9 @@ cvs_client_updated(char *data) struct cvs_ent *e; const char *errstr; struct timeval tv[2]; - char timebuf[32], repo[MAXPATHLEN], *rpath, entry[CVS_ENT_MAXLINELEN]; - char *en, *mode, revbuf[32], *len, *fpath, *wdir; + char repo[MAXPATHLEN], entry[CVS_ENT_MAXLINELEN]; + char timebuf[CVS_TIME_BUFSZ], revbuf[CVS_REV_BUFSZ]; + char *en, *mode, *len, *fpath, *rpath, *wdir; if (data == NULL) fatal("Missing argument for Updated"); @@ -712,7 +713,7 @@ cvs_client_merged(char *data) CVSENTRIES *ent; const char *errstr; struct timeval tv[2]; - char timebuf[32], *repo, *rpath, *entry, *mode; + char timebuf[CVS_TIME_BUFSZ], *repo, *rpath, *entry, *mode; char *len, *fpath, *wdir; if (data == NULL) diff --git a/usr.bin/cvs/cvs.h b/usr.bin/cvs/cvs.h index bfc147749d7..1e75de38078 100644 --- a/usr.bin/cvs/cvs.h +++ b/usr.bin/cvs/cvs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cvs.h,v 1.139 2007/06/27 20:27:38 xsa Exp $ */ +/* $OpenBSD: cvs.h,v 1.140 2007/06/28 21:38:09 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -50,6 +50,9 @@ #define CVS_CKSUM_LEN MD5_DIGEST_STRING_LENGTH +#define CVS_REV_BUFSZ 32 +#define CVS_TIME_BUFSZ 64 + /* operations */ #define CVS_OP_UNKNOWN 0 #define CVS_OP_ADD 1 diff --git a/usr.bin/cvs/diff.c b/usr.bin/cvs/diff.c index 9e35fd29f69..d3650048297 100644 --- a/usr.bin/cvs/diff.c +++ b/usr.bin/cvs/diff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diff.c,v 1.119 2007/06/27 04:23:54 joris Exp $ */ +/* $OpenBSD: diff.c,v 1.120 2007/06/28 21:38:09 xsa Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -160,7 +160,7 @@ cvs_diff_local(struct cvs_file *cf) BUF *b1; struct stat st; struct timeval tv[2], tv2[2]; - char rbuf[16], *p1, *p2; + char rbuf[CVS_REV_BUFSZ], *p1, *p2; r1 = NULL; b1 = NULL; diff --git a/usr.bin/cvs/diff3.c b/usr.bin/cvs/diff3.c index 3479f4f822e..742cd2ccc3e 100644 --- a/usr.bin/cvs/diff3.c +++ b/usr.bin/cvs/diff3.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diff3.c,v 1.36 2007/05/29 00:19:10 ray Exp $ */ +/* $OpenBSD: diff3.c,v 1.37 2007/06/28 21:38:09 xsa Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. @@ -72,7 +72,7 @@ static const char copyright[] = #ifndef lint static const char rcsid[] = - "$OpenBSD: diff3.c,v 1.36 2007/05/29 00:19:10 ray Exp $"; + "$OpenBSD: diff3.c,v 1.37 2007/06/28 21:38:09 xsa Exp $"; #endif /* not lint */ #include <ctype.h> @@ -163,7 +163,7 @@ cvs_merge_file(struct cvs_file *cf, int verbose) { int argc; char *data, *patch; - char *argv[5], r1[16], r2[16]; + char *argv[5], r1[CVS_REV_BUFSZ], r2[CVS_REV_BUFSZ]; char *dp13, *dp23, *path1, *path2, *path3; BUF *b1, *b2, *b3, *d1, *d2, *diffb; size_t dlen, plen; diff --git a/usr.bin/cvs/edit.c b/usr.bin/cvs/edit.c index f60e4b8a874..9152d28b935 100644 --- a/usr.bin/cvs/edit.c +++ b/usr.bin/cvs/edit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: edit.c,v 1.34 2007/02/22 06:42:09 otto Exp $ */ +/* $OpenBSD: edit.c,v 1.35 2007/06/28 21:38:09 xsa Exp $ */ /* * Copyright (c) 2006, 2007 Xavier Santolaria <xsa@openbsd.org> * @@ -385,7 +385,7 @@ cvs_unedit_local(struct cvs_file *cf) if (cf->file_ent != NULL) { CVSENTRIES *entlist; struct cvs_ent *ent; - char *entry, rbuf[16]; + char *entry, rbuf[CVS_REV_BUFSZ]; entlist = cvs_ent_open(cf->file_wd); @@ -428,7 +428,7 @@ cvs_base_handle(struct cvs_file *cf, int flags) size_t len; int i; char *dp, *sp; - char buf[MAXPATHLEN], *fields[2], rbuf[16]; + char buf[MAXPATHLEN], *fields[2], rbuf[CVS_REV_BUFSZ]; cvs_log(LP_TRACE, "cvs_base_handle(%s)", cf->file_path); diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c index dc349fe22b2..6e50c39cb63 100644 --- a/usr.bin/cvs/file.c +++ b/usr.bin/cvs/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.192 2007/06/26 02:24:10 niallo Exp $ */ +/* $OpenBSD: file.c,v 1.193 2007/06/28 21:38:09 xsa Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> @@ -562,8 +562,8 @@ cvs_file_classify(struct cvs_file *cf, const char *tag) int rflags, ismodified, rcsdead; CVSENTRIES *entlist = NULL; const char *state; - char repo[MAXPATHLEN], rcsfile[MAXPATHLEN], r1[16], r2[16]; - char *tfname, *tpath, *p; + char repo[MAXPATHLEN], rcsfile[MAXPATHLEN]; + char r1[CVS_REV_BUFSZ], r2[CVS_REV_BUFSZ], *tfname, *tpath, *p; cvs_log(LP_TRACE, "cvs_file_classify(%s)", cf->file_path); diff --git a/usr.bin/cvs/getlog.c b/usr.bin/cvs/getlog.c index b40e34f9155..153551d431a 100644 --- a/usr.bin/cvs/getlog.c +++ b/usr.bin/cvs/getlog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getlog.c,v 1.72 2007/06/26 02:24:10 niallo Exp $ */ +/* $OpenBSD: getlog.c,v 1.73 2007/06/28 21:38:09 xsa Exp $ */ /* * Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org> * Copyright (c) 2006 Joris Vink <joris@openbsd.org> @@ -171,7 +171,7 @@ cvs_log_local(struct cvs_file *cf) struct rcs_lock *lkp; struct rcs_delta *rdp; struct rcs_access *acp; - char numb[32]; + char numb[CVS_REV_BUFSZ]; cvs_log(LP_TRACE, "cvs_log_local(%s)", cf->file_path); @@ -268,7 +268,7 @@ static void log_rev_print(struct rcs_delta *rdp) { int i, found; - char numb[32], timeb[32]; + char numb[CVS_REV_BUFSZ], timeb[CVS_TIME_BUFSZ]; struct cvs_argvector *sargv, *wargv; i = found = 0; diff --git a/usr.bin/cvs/history.c b/usr.bin/cvs/history.c index 75891f6413f..085c905307d 100644 --- a/usr.bin/cvs/history.c +++ b/usr.bin/cvs/history.c @@ -1,4 +1,4 @@ -/* $OpenBSD: history.c,v 1.30 2007/06/28 04:48:52 joris Exp $ */ +/* $OpenBSD: history.c,v 1.31 2007/06/28 21:38:09 xsa Exp $ */ /* * Copyright (c) 2007 Joris Vink <joris@openbsd.org> * @@ -63,7 +63,7 @@ cvs_history_add(int type, struct cvs_file *cf, const char *argument) { FILE *fp; char *cwd; - char revbuf[64], repo[MAXPATHLEN], fpath[MAXPATHLEN]; + char revbuf[CVS_REV_BUFSZ], repo[MAXPATHLEN], fpath[MAXPATHLEN]; if (cvs_nolog == 1) return; diff --git a/usr.bin/cvs/import.c b/usr.bin/cvs/import.c index b2034ed006c..5fb877f3d60 100644 --- a/usr.bin/cvs/import.c +++ b/usr.bin/cvs/import.c @@ -1,4 +1,4 @@ -/* $OpenBSD: import.c,v 1.73 2007/06/01 17:47:47 niallo Exp $ */ +/* $OpenBSD: import.c,v 1.74 2007/06/28 21:38:09 xsa Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -287,7 +287,7 @@ import_update(struct cvs_file *cf) { int ret; BUF *b1, *b2, *d; - char branch[16]; + char branch[CVS_REV_BUFSZ]; RCSNUM *newrev, *rev, *brev, *hrev; cvs_log(LP_TRACE, "import_update(%s)", cf->file_path); @@ -356,7 +356,7 @@ import_update(struct cvs_file *cf) static void import_tag(struct cvs_file *cf, RCSNUM *branch, RCSNUM *newrev) { - char b[16]; + char b[CVS_REV_BUFSZ]; if (cvs_noexec != 1) { rcsnum_tostr(branch, b, sizeof(b)); diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c index 7ddf5df508f..9cb8b14eee2 100644 --- a/usr.bin/cvs/rcs.c +++ b/usr.bin/cvs/rcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.213 2007/06/01 17:47:47 niallo Exp $ */ +/* $OpenBSD: rcs.c,v 1.214 2007/06/28 21:38:09 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -364,7 +364,7 @@ void rcs_write(RCSFILE *rfp) { FILE *fp; - char buf[1024], numbuf[64], *fn, tmpdir[MAXPATHLEN]; + char buf[1024], numbuf[CVS_REV_BUFSZ], *fn, tmpdir[MAXPATHLEN]; struct rcs_access *ap; struct rcs_sym *symp; struct rcs_branch *brp; @@ -2458,7 +2458,7 @@ int rcs_rev_setlog(RCSFILE *rfp, RCSNUM *rev, const char *logtext) { struct rcs_delta *rdp; - char buf[16]; + char buf[CVS_REV_BUFSZ]; rcsnum_tostr(rev, buf, sizeof(buf)); diff --git a/usr.bin/cvs/remove.c b/usr.bin/cvs/remove.c index d3ecd10641f..f712d7297a3 100644 --- a/usr.bin/cvs/remove.c +++ b/usr.bin/cvs/remove.c @@ -1,4 +1,4 @@ -/* $OpenBSD: remove.c,v 1.64 2007/02/22 06:42:09 otto Exp $ */ +/* $OpenBSD: remove.c,v 1.65 2007/06/28 21:38:09 xsa Exp $ */ /* * Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org> * @@ -135,7 +135,7 @@ void cvs_remove_local(struct cvs_file *cf) { CVSENTRIES *entlist; - char *entry, buf[MAXPATHLEN], tbuf[32], rbuf[16]; + char *entry, buf[MAXPATHLEN], tbuf[CVS_TIME_BUFSZ], rbuf[CVS_REV_BUFSZ]; cvs_log(LP_TRACE, "cvs_remove_local(%s)", cf->file_path); diff --git a/usr.bin/cvs/status.c b/usr.bin/cvs/status.c index b83bd963224..29ab39f6ca5 100644 --- a/usr.bin/cvs/status.c +++ b/usr.bin/cvs/status.c @@ -1,4 +1,4 @@ -/* $OpenBSD: status.c,v 1.74 2007/06/01 17:47:47 niallo Exp $ */ +/* $OpenBSD: status.c,v 1.75 2007/06/28 21:38:09 xsa Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org> @@ -119,7 +119,7 @@ cvs_status_local(struct cvs_file *cf) size_t len; RCSNUM *head; const char *status; - char buf[128], timebuf[32], revbuf[32]; + char buf[128], timebuf[CVS_TIME_BUFSZ], revbuf[CVS_REV_BUFSZ]; struct rcs_sym *sym; cvs_log(LP_TRACE, "cvs_status_local(%s)", cf->file_path); diff --git a/usr.bin/cvs/tag.c b/usr.bin/cvs/tag.c index d59118b603b..535a0fd3f91 100644 --- a/usr.bin/cvs/tag.c +++ b/usr.bin/cvs/tag.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tag.c,v 1.56 2007/06/18 17:54:13 joris Exp $ */ +/* $OpenBSD: tag.c,v 1.57 2007/06/28 21:38:09 xsa Exp $ */ /* * Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org> * @@ -238,7 +238,7 @@ tag_del(struct cvs_file *cf) static int tag_add(struct cvs_file *cf) { - char revbuf[16], trevbuf[16]; + char revbuf[CVS_REV_BUFSZ], trevbuf[CVS_REV_BUFSZ]; RCSNUM *trev; struct rcs_sym *sym; diff --git a/usr.bin/cvs/update.c b/usr.bin/cvs/update.c index 11bee406c05..3d85922f566 100644 --- a/usr.bin/cvs/update.c +++ b/usr.bin/cvs/update.c @@ -1,4 +1,4 @@ -/* $OpenBSD: update.c,v 1.102 2007/06/28 04:54:11 joris Exp $ */ +/* $OpenBSD: update.c,v 1.103 2007/06/28 21:38:09 xsa Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -272,7 +272,7 @@ cvs_update_local(struct cvs_file *cf) { int ret, flags; CVSENTRIES *entlist; - char rbuf[16]; + char rbuf[CVS_REV_BUFSZ]; cvs_log(LP_TRACE, "cvs_update_local(%s)", cf->file_path); @@ -375,7 +375,7 @@ update_clear_conflict(struct cvs_file *cf) { time_t now; CVSENTRIES *entlist; - char *entry, revbuf[16], timebuf[32]; + char *entry, revbuf[CVS_REV_BUFSZ], timebuf[CVS_TIME_BUFSZ]; cvs_log(LP_TRACE, "update_clear_conflict(%s)", cf->file_path); |