diff options
-rw-r--r-- | usr.bin/cvs/add.c | 6 | ||||
-rw-r--r-- | usr.bin/cvs/admin.c | 10 | ||||
-rw-r--r-- | usr.bin/cvs/annotate.c | 6 | ||||
-rw-r--r-- | usr.bin/cvs/checkout.c | 10 | ||||
-rw-r--r-- | usr.bin/cvs/cmd.c | 6 | ||||
-rw-r--r-- | usr.bin/cvs/commit.c | 6 | ||||
-rw-r--r-- | usr.bin/cvs/cvs.c | 16 | ||||
-rw-r--r-- | usr.bin/cvs/diff.c | 6 | ||||
-rw-r--r-- | usr.bin/cvs/getlog.c | 4 | ||||
-rw-r--r-- | usr.bin/cvs/history.c | 8 | ||||
-rw-r--r-- | usr.bin/cvs/import.c | 10 | ||||
-rw-r--r-- | usr.bin/cvs/remove.c | 6 | ||||
-rw-r--r-- | usr.bin/cvs/server.c | 4 | ||||
-rw-r--r-- | usr.bin/cvs/status.c | 4 | ||||
-rw-r--r-- | usr.bin/cvs/tag.c | 6 | ||||
-rw-r--r-- | usr.bin/cvs/update.c | 4 |
16 files changed, 56 insertions, 56 deletions
diff --git a/usr.bin/cvs/add.c b/usr.bin/cvs/add.c index eee2dd4f5f3..bae95a03019 100644 --- a/usr.bin/cvs/add.c +++ b/usr.bin/cvs/add.c @@ -1,4 +1,4 @@ -/* $OpenBSD: add.c,v 1.16 2005/04/03 17:32:50 xsa Exp $ */ +/* $OpenBSD: add.c,v 1.17 2005/04/11 17:56:27 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -74,7 +74,7 @@ cvs_add_options(char *opt, int argc, char **argv, int *arg) cvs_log(LP_ERR, "invalid RCS keyword expansion mode"); rcs_kflag_usage(); - return (EX_USAGE); + return (1); } break; case 'm': @@ -84,7 +84,7 @@ cvs_add_options(char *opt, int argc, char **argv, int *arg) } break; default: - return (EX_USAGE); + return (1); } } diff --git a/usr.bin/cvs/admin.c b/usr.bin/cvs/admin.c index b7e5a415952..ee8decab952 100644 --- a/usr.bin/cvs/admin.c +++ b/usr.bin/cvs/admin.c @@ -1,4 +1,4 @@ -/* $OpenBSD: admin.c,v 1.8 2005/04/03 17:32:50 xsa Exp $ */ +/* $OpenBSD: admin.c,v 1.9 2005/04/11 17:56:27 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * Copyright (c) 2005 Joris Vink <joris@openbsd.org> @@ -111,7 +111,7 @@ cvs_admin_options(char *opt, int argc, char **argv, int *arg) cvs_log(LP_ERR, "invalid RCS keyword expansion mode"); rcs_kflag_usage(); - return (EX_USAGE); + return (1); } break; case 'l': @@ -151,7 +151,7 @@ cvs_admin_options(char *opt, int argc, char **argv, int *arg) strictlock |= LOCK_REMOVE; break; default: - return (EX_USAGE); + return (1); } } @@ -168,7 +168,7 @@ cvs_admin_options(char *opt, int argc, char **argv, int *arg) if ((rcs = rcsnum_parse(lockrev_arg)) == NULL) { cvs_log(LP_ERR, "%s is not a numeric branch", lockrev_arg); - return (EX_USAGE); + return (1); } rcsnum_free(rcs); } @@ -185,7 +185,7 @@ cvs_admin_options(char *opt, int argc, char **argv, int *arg) if (replace_msg != NULL) { if ((q = strchr(replace_msg, ':')) == NULL) { cvs_log(LP_ERR, "invalid option for -m"); - return (EX_USAGE); + return (1); } *q = '\0'; if ((rcs = rcsnum_parse(replace_msg)) == NULL) { diff --git a/usr.bin/cvs/annotate.c b/usr.bin/cvs/annotate.c index 499317090b7..ee7f6b6ffed 100644 --- a/usr.bin/cvs/annotate.c +++ b/usr.bin/cvs/annotate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: annotate.c,v 1.6 2005/04/03 17:32:50 xsa Exp $ */ +/* $OpenBSD: annotate.c,v 1.7 2005/04/11 17:56:27 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -86,14 +86,14 @@ cvs_annotate_options(char *opt, int argc, char **argv, int *arg) rev = optarg; break; default: - return (EX_USAGE); + return (1); } } if ((date != NULL) && (rev != NULL)) { cvs_log(LP_ERR, "the -D and -d arguments are mutually exclusive"); - return (EX_USAGE); + return (1); } *arg = optind; diff --git a/usr.bin/cvs/checkout.c b/usr.bin/cvs/checkout.c index d29c66387fa..7127feb2454 100644 --- a/usr.bin/cvs/checkout.c +++ b/usr.bin/cvs/checkout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: checkout.c,v 1.15 2005/04/03 17:32:50 xsa Exp $ */ +/* $OpenBSD: checkout.c,v 1.16 2005/04/11 17:56:27 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -90,7 +90,7 @@ cvs_checkout_options(char *opt, int argc, char **argv, int *arg) cvs_log(LP_ERR, "invalid RCS keyword expansion mode"); rcs_kflag_usage(); - return (EX_USAGE); + return (1); } break; case 'r': @@ -103,7 +103,7 @@ cvs_checkout_options(char *opt, int argc, char **argv, int *arg) rcsid = optarg; break; default: - return (EX_USAGE); + return (1); } } @@ -113,12 +113,12 @@ cvs_checkout_options(char *opt, int argc, char **argv, int *arg) if (!statmod && (argc == 0)) { cvs_log(LP_ERR, "must specify at least one module or directory"); - return (EX_USAGE); + return (1); } if (statmod && (argc > 0)) { cvs_log(LP_ERR, "-c and -s must not get any arguments"); - return (EX_USAGE); + return (1); } *arg = optind; diff --git a/usr.bin/cvs/cmd.c b/usr.bin/cvs/cmd.c index 84e1e385d99..1ce39493121 100644 --- a/usr.bin/cvs/cmd.c +++ b/usr.bin/cvs/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.7 2005/04/03 17:32:50 xsa Exp $ */ +/* $OpenBSD: cmd.c,v 1.8 2005/04/11 17:56:27 joris Exp $ */ /* * Copyright (c) 2005 Joris Vink <joris@openbsd.org> * All rights reserved. @@ -60,7 +60,7 @@ cvs_startcmd(struct cvs_cmd *cmd, int argc, char **argv) } if (c->cmd_options != NULL) { - if ((ret = c->cmd_options(cmd->cmd_opts, argc, argv, &i)) < 0) + if ((ret = c->cmd_options(cmd->cmd_opts, argc, argv, &i)) != 0) return (ret); argc -= i; @@ -84,7 +84,7 @@ cvs_startcmd(struct cvs_cmd *cmd, int argc, char **argv) "No CVSROOT specified! Please use the `-d' option"); cvs_log(LP_ERR, "or set the CVSROOT enviroment variable."); - return (EX_USAGE); + return (1); } if (root->cr_method != CVS_METHOD_LOCAL) { diff --git a/usr.bin/cvs/commit.c b/usr.bin/cvs/commit.c index b9b5ba5434b..a97fc8a8a83 100644 --- a/usr.bin/cvs/commit.c +++ b/usr.bin/cvs/commit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: commit.c,v 1.20 2005/04/03 17:32:50 xsa Exp $ */ +/* $OpenBSD: commit.c,v 1.21 2005/04/11 17:56:27 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -88,13 +88,13 @@ cvs_commit_options(char *opt, int argc, char **argv, int *arg) cvs_commit.file_flags |= CF_RECURSE; break; default: - return (EX_USAGE); + return (1); } } if ((cvs_msg != NULL) && (mfile != NULL)) { cvs_log(LP_ERR, "the -F and -m flags are mutually exclusive"); - return (EX_USAGE); + return (1); } if ((mfile != NULL) && (cvs_msg = cvs_logmsg_open(mfile)) == NULL) diff --git a/usr.bin/cvs/cvs.c b/usr.bin/cvs/cvs.c index dced566d06f..0d316118bf7 100644 --- a/usr.bin/cvs/cvs.c +++ b/usr.bin/cvs/cvs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cvs.c,v 1.48 2005/04/06 16:35:25 jfb Exp $ */ +/* $OpenBSD: cvs.c,v 1.49 2005/04/11 17:56:27 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -82,7 +82,7 @@ static TAILQ_HEAD(, cvs_var) cvs_variables; * * Command handlers are expected to return 0 if no error occurred, or one of * the values known in sysexits.h in case of an error. In case the error - * returned is EX_USAGE, the command's usage string is printed to standard + * returned is 1, the command's usage string is printed to standard * error before returning. */ struct cvs_cmd cvs_cdt[] = { @@ -354,7 +354,7 @@ main(int argc, char **argv) argv += ret; if (argc == 0) { usage(); - exit(EX_USAGE); + exit(1); } cvs_command = argv[0]; @@ -393,7 +393,7 @@ main(int argc, char **argv) for (i = 0; i < (int)CVS_NBCMD; i++) fprintf(stderr, "\t%-16s%s\n", cvs_cdt[i].cmd_name, cvs_cdt[i].cmd_descr); - exit(EX_USAGE); + exit(1); } if (cmdp->cmd_info == NULL) { @@ -422,7 +422,7 @@ main(int argc, char **argv) cmd_argv[cmd_argc++] = argv[ret]; ret = cvs_startcmd(cmdp, cmd_argc, cmd_argv); - if (ret == EX_USAGE) { + if (ret == 1) { fprintf(stderr, "Usage: %s %s %s\n", __progname, cvs_command, cmdp->cmd_synopsis); } @@ -485,11 +485,11 @@ cvs_getopt(int argc, char **argv) ep = strchr(optarg, '='); if (ep == NULL) { cvs_log(LP_ERR, "no = in variable assignment"); - exit(EX_USAGE); + exit(1); } *(ep++) = '\0'; if (cvs_var_set(optarg, ep) < 0) - exit(EX_USAGE); + exit(1); break; case 't': (void)cvs_log_filter(LP_FILTER_UNSET, LP_TRACE); @@ -515,7 +515,7 @@ cvs_getopt(int argc, char **argv) break; default: usage(); - exit(EX_USAGE); + exit(1); } } diff --git a/usr.bin/cvs/diff.c b/usr.bin/cvs/diff.c index 83a84499e13..371ac0c53a6 100644 --- a/usr.bin/cvs/diff.c +++ b/usr.bin/cvs/diff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diff.c,v 1.25 2005/04/03 17:32:50 xsa Exp $ */ +/* $OpenBSD: diff.c,v 1.26 2005/04/11 17:56:27 joris Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. * All rights reserved. @@ -407,7 +407,7 @@ cvs_diff_options(char *opt, int argc, char **argv, int *arg) cvs_log(LP_ERR, "no more than two revisions/dates can " "be specified"); - return (EX_USAGE); + return (1); } break; case 'u': @@ -415,7 +415,7 @@ cvs_diff_options(char *opt, int argc, char **argv, int *arg) format = D_UNIFIED; break; default: - return (EX_USAGE); + return (1); } } diff --git a/usr.bin/cvs/getlog.c b/usr.bin/cvs/getlog.c index 166cbc8abd2..87b741bfb0a 100644 --- a/usr.bin/cvs/getlog.c +++ b/usr.bin/cvs/getlog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getlog.c,v 1.16 2005/03/30 17:43:04 joris Exp $ */ +/* $OpenBSD: getlog.c,v 1.17 2005/04/11 17:56:27 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -89,7 +89,7 @@ cvs_getlog_options(char *opt, int argc, char **argv, int *arg) case 'r': break; default: - return (EX_USAGE); + return (1); } } diff --git a/usr.bin/cvs/history.c b/usr.bin/cvs/history.c index 2d73db2b4c3..2e9abca74a0 100644 --- a/usr.bin/cvs/history.c +++ b/usr.bin/cvs/history.c @@ -1,4 +1,4 @@ -/* $OpenBSD: history.c,v 1.10 2005/04/03 17:32:50 xsa Exp $ */ +/* $OpenBSD: history.c,v 1.11 2005/04/11 17:56:27 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -105,7 +105,7 @@ cvs_history_options(char *opt, int argc, char **argv, int *arg) flags |= CVS_HF_M; if (nbmod == CVS_HISTORY_MAXMOD) { cvs_log(LP_ERR, "too many `-m' options"); - return (EX_USAGE); + return (1); } modules[nbmod++] = optarg; break; @@ -133,14 +133,14 @@ cvs_history_options(char *opt, int argc, char **argv, int *arg) zone = optarg; break; default: - return (EX_USAGE); + return (1); } } if (rep > 1) { cvs_log(LP_ERR, "Only one report type allowed from: \"-Tcomxe\""); - return (EX_USAGE); + return (1); } else if (rep == 0) flags |= CVS_HF_O; /* use -o as default */ diff --git a/usr.bin/cvs/import.c b/usr.bin/cvs/import.c index 061c807291f..804b8a11ac3 100644 --- a/usr.bin/cvs/import.c +++ b/usr.bin/cvs/import.c @@ -1,4 +1,4 @@ -/* $OpenBSD: import.c,v 1.8 2005/04/03 17:32:50 xsa Exp $ */ +/* $OpenBSD: import.c,v 1.9 2005/04/11 17:56:27 joris Exp $ */ /* * Copyright (c) 2004 Joris Vink <joris@openbsd.org> * All rights reserved. @@ -73,7 +73,7 @@ cvs_import_options(char *opt, int argc, char **argv, int *arg) if ((bnum = rcsnum_parse(branch)) == NULL) { cvs_log(LP_ERR, "%s is not a numeric branch", branch); - return (EX_USAGE); + return (1); } rcsnum_free(bnum); break; @@ -83,7 +83,7 @@ cvs_import_options(char *opt, int argc, char **argv, int *arg) if (cvs_file_ignore(optarg) < 0) { cvs_log(LP_ERR, "failed to add `%s' to list " "of ignore patterns", optarg); - return (EX_USAGE); + return (1); } break; case 'k': @@ -96,7 +96,7 @@ cvs_import_options(char *opt, int argc, char **argv, int *arg) } break; default: - return (EX_USAGE); + return (1); } } @@ -105,7 +105,7 @@ cvs_import_options(char *opt, int argc, char **argv, int *arg) *arg = optind; if (argc > 4) - return (EX_USAGE); + return (1); module = argv[0]; vendor = argv[1]; diff --git a/usr.bin/cvs/remove.c b/usr.bin/cvs/remove.c index 904183defe2..711373a24cd 100644 --- a/usr.bin/cvs/remove.c +++ b/usr.bin/cvs/remove.c @@ -1,4 +1,4 @@ -/* $OpenBSD: remove.c,v 1.4 2005/03/30 17:43:04 joris Exp $ */ +/* $OpenBSD: remove.c,v 1.5 2005/04/11 17:56:27 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * Copyright (c) 2004 Xavier Santolaria <xsa@openbsd.org> @@ -74,7 +74,7 @@ cvs_remove_options(char *opt, int argc, char **argv, int *arg) case 'R': break; default: - return (EX_USAGE); + return (1); } } @@ -82,7 +82,7 @@ cvs_remove_options(char *opt, int argc, char **argv, int *arg) argv += optind; if (argc == 0) - return (EX_USAGE); + return (1); *arg = optind; return (0); diff --git a/usr.bin/cvs/server.c b/usr.bin/cvs/server.c index 22c4288f7aa..852a445da39 100644 --- a/usr.bin/cvs/server.c +++ b/usr.bin/cvs/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.10 2005/04/03 17:32:50 xsa Exp $ */ +/* $OpenBSD: server.c,v 1.11 2005/04/11 17:56:27 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -66,7 +66,7 @@ cvs_server(int argc, char **argv) char reqbuf[512]; if (argc != 1) { - return (EX_USAGE); + return (1); } /* make sure standard in and standard out are line-buffered */ diff --git a/usr.bin/cvs/status.c b/usr.bin/cvs/status.c index bc181a11ac9..9243df9c306 100644 --- a/usr.bin/cvs/status.c +++ b/usr.bin/cvs/status.c @@ -1,4 +1,4 @@ -/* $OpenBSD: status.c,v 1.11 2005/04/03 17:32:50 xsa Exp $ */ +/* $OpenBSD: status.c,v 1.12 2005/04/11 17:56:27 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -84,7 +84,7 @@ cvs_status_options(char *opt, int argc, char **argv, int *arg) verbose = 1; break; default: - return (EX_USAGE); + return (1); } } diff --git a/usr.bin/cvs/tag.c b/usr.bin/cvs/tag.c index 7433472be83..21ccec0b0c3 100644 --- a/usr.bin/cvs/tag.c +++ b/usr.bin/cvs/tag.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tag.c,v 1.8 2005/04/03 17:32:50 xsa Exp $ */ +/* $OpenBSD: tag.c,v 1.9 2005/04/11 17:56:27 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * Copyright (c) 2004 Joris Vink <joris@openbsd.org> @@ -84,7 +84,7 @@ cvs_tag_options(char *opt, int argc, char **argv, int *arg) old_tag = optarg; break; default: - return (EX_USAGE); + return (1); } } @@ -93,7 +93,7 @@ cvs_tag_options(char *opt, int argc, char **argv, int *arg) argv += optind; if (argc == 0) { - return (EX_USAGE); + return (1); } else { tag = argv[0]; argc--; diff --git a/usr.bin/cvs/update.c b/usr.bin/cvs/update.c index 51cdaee24cf..678b786ea47 100644 --- a/usr.bin/cvs/update.c +++ b/usr.bin/cvs/update.c @@ -1,4 +1,4 @@ -/* $OpenBSD: update.c,v 1.18 2005/03/30 17:43:04 joris Exp $ */ +/* $OpenBSD: update.c,v 1.19 2005/04/11 17:56:27 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -82,7 +82,7 @@ cvs_update_options(char *opt, int argc, char **argv, int *arg) case 'r': break; default: - return (EX_USAGE); + return (1); } } |