1 /* $OpenBSD: rcsprog.h,v 1.59 2006/08/11 08:18:19 xsa Exp $ */ 2 /* 3 * Copyright (c) 2005 Joris Vink <joris@openbsd.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 2. The name of the author may not be used to endorse or promote products 13 * derived from this software without specific prior written permission. 14 * 15 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 16 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 17 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 18 * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 19 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 20 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 21 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 22 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 23 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 24 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27 #ifndef RCSPROG_H 28 #define RCSPROG_H 29 30 #include "rcs.h" 31 #include "rcsutil.h" 32 #include "worklist.h" 33 #include "xmalloc.h" 34 35 #define RCS_DEFAULT_SUFFIX ",v/" 36 #define RCS_TMPDIR_DEFAULT "/tmp" 37 38 /* flags specific to ci.c */ 39 #define CI_SYMFORCE (1<<0) 40 #define CI_DEFAULT (1<<1) 41 #define CI_INIT (1<<2) 42 #define CI_KEYWORDSCAN (1<<3) 43 #define CI_SKIPDESC (1<<4) 44 45 /* flags specific to co.c */ 46 #define CO_ACLAPPEND (1<<5) 47 #define CO_AUTHOR (1<<6) 48 #define CO_LOCK (1<<7) 49 #define CO_REVDATE (1<<8) 50 #define CO_REVERT (1<<9) 51 #define CO_STATE (1<<10) 52 #define CO_UNLOCK (1<<11) 53 54 /* flags specific to rcsprog.c */ 55 #define RCSPROG_EFLAG (1<<12) 56 #define RCSPROG_LFLAG (1<<13) 57 #define RCSPROG_NFLAG (1<<14) 58 #define RCSPROG_UFLAG (1<<15) 59 60 /* flags shared between merge(1) and rcsmerge(1) */ 61 #define MERGE_EFLAG (1<<16) 62 #define MERGE_OFLAG (1<<17) 63 64 /* shared flags */ 65 #define DESCRIPTION (1<<18) 66 #define FORCE (1<<19) 67 #define INTERACTIVE (1<<20) 68 #define NEWFILE (1<<21) 69 #define PIPEOUT (1<<22) 70 #define PRESERVETIME (1<<23) 71 #define QUIET (1<<24) 72 73 extern char *__progname; 74 extern const char rcs_version[]; 75 76 extern int rcs_optind; 77 extern char *rcs_optarg; 78 extern char *rcs_suffixes; 79 extern char *rcs_tmpdir; 80 extern struct rcs_wklhead rcs_temp_files; 81 82 /* date.y */ 83 time_t rcs_date_parse(const char *); 84 85 /* ci.c */ 86 int checkin_main(int, char **); 87 void checkin_usage(void); 88 89 /* co.c */ 90 int checkout_main(int, char **); 91 int checkout_rev(RCSFILE *, RCSNUM *, const char *, int, const char *, 92 const char *, const char *, const char *); 93 void checkout_usage(void); 94 95 /* ident.c */ 96 int ident_main(int, char **); 97 void ident_usage(void); 98 99 /* merge.c */ 100 int merge_main(int, char **); 101 void merge_usage(void); 102 103 /* rcsclean.c */ 104 int rcsclean_main(int, char **); 105 void rcsclean_usage(void); 106 107 /* rcsdiff.c */ 108 int rcsdiff_main(int, char **); 109 void rcsdiff_usage(void); 110 111 /* rcsmerge.c */ 112 int rcsmerge_main(int, char **); 113 void rcsmerge_usage(void); 114 115 /* rcsprog.c */ 116 int rcs_init(char *, char **, int); 117 int rcs_getopt(int, char **, const char *); 118 int rcs_main(int, char **); 119 void rcs_usage(void); 120 void (*usage)(void); 121 122 /* rlog.c */ 123 int rlog_main(int, char **); 124 void rlog_usage(void); 125 126 #endif /* RCSPROG_H */ 127