[BACK]Return to util.h CVS log [TXT][DIR] Up to [local] / src / usr.bin / cvs

Annotation of src/usr.bin/cvs/util.h, Revision 1.27

1.27    ! ray         1: /*     $OpenBSD: util.h,v 1.26 2008/06/12 07:16:14 joris Exp $ */
1.1       niallo      2: /*
                      3:  * Copyright (c) 2006 Niall O'Higgins <niallo@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 UTIL_H
                     28: #define UTIL_H
                     29:
1.7       joris      30: void     cvs_get_repository_path(const char *, char *, size_t);
                     31: void     cvs_get_repository_name(const char *, char *, size_t);
1.1       niallo     32: void     cvs_modetostr(mode_t, char *, size_t);
                     33: void     cvs_strtomode(const char *, mode_t *);
1.23      tobias     34: void     cvs_mkadmin(const char *, const char *, const char *, char *, char *);
1.20      joris      35: void     cvs_mkpath(const char *, char *);
1.1       niallo     36: int      cvs_cksum(const char *, char *, size_t);
                     37: int      cvs_getargv(const char *, char **, int);
                     38: int      cvs_chdir(const char *, int);
                     39: int      cvs_rename(const char *, const char *);
                     40: int      cvs_unlink(const char *);
                     41: int      cvs_rmdir(const char *);
                     42: char   **cvs_makeargv(const char *, int *);
                     43: void     cvs_freeargv(char **, int);
1.26      joris      44: int      cvs_exec(char *, const char *, int);
1.8       joris      45: u_int    cvs_revision_select(RCSFILE *, char *);
1.1       niallo     46:
                     47: struct cvs_line {
1.22      tobias     48:        struct rcs_delta        *l_delta;
1.17      otto       49:        u_char                  *l_line;
1.13      niallo     50:        size_t                   l_len;
1.1       niallo     51:        int                      l_lineno;
1.22      tobias     52:        int                      l_lineno_orig;
1.14      niallo     53:        int                      l_needsfree;
1.1       niallo     54:        TAILQ_ENTRY(cvs_line)    l_list;
                     55: };
                     56:
1.27    ! ray        57: TAILQ_HEAD(tqh, cvs_line);
1.1       niallo     58:
                     59: struct cvs_lines {
                     60:        int             l_nblines;
1.27    ! ray        61:        struct tqh      l_lines;
1.1       niallo     62: };
                     63:
1.4       pat        64: struct cvs_argvector {
                     65:        char *str;
                     66:        char **argv;
                     67: };
1.1       niallo     68:
1.17      otto       69: struct cvs_lines       *cvs_splitlines(u_char *, size_t);
1.1       niallo     70: void                   cvs_freelines(struct cvs_lines *);
1.4       pat        71: struct cvs_argvector   *cvs_strsplit(char *, const char *);
                     72: void                   cvs_argv_destroy(struct cvs_argvector *);
1.11      xsa        73: int                    cvs_yesno(void);
1.1       niallo     74:
1.2       xsa        75: #endif /* UTIL_H */