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

Annotation of src/usr.bin/cvs/update.c, Revision 1.1

1.1     ! jfb         1: /*     $OpenBSD$       */
        !             2: /*
        !             3:  * Copyright (c) 2004 Jean-Francois Brousseau <jfb@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: #include <sys/param.h>
        !            28: #include <sys/stat.h>
        !            29:
        !            30: #include <errno.h>
        !            31: #include <stdio.h>
        !            32: #include <fcntl.h>
        !            33: #include <stdlib.h>
        !            34: #include <unistd.h>
        !            35: #include <string.h>
        !            36: #include <sysexits.h>
        !            37:
        !            38: #include "cvs.h"
        !            39: #include "rcs.h"
        !            40: #include "log.h"
        !            41:
        !            42: extern char *__progname;
        !            43:
        !            44: extern struct cvsroot *cvs_root;
        !            45:
        !            46:
        !            47: /*
        !            48:  * cvs_update()
        !            49:  *
        !            50:  * Handle the `cvs update' command.
        !            51:  */
        !            52:
        !            53:
        !            54: int
        !            55: cvs_update(int argc, char **argv)
        !            56: {
        !            57:        int ch;
        !            58:
        !            59:        while ((ch = getopt(argc, argv, "ACD:dflPpQqRr:")) != -1) {
        !            60:                switch (ch) {
        !            61:                case 'A':
        !            62:                case 'C':
        !            63:                case 'D':
        !            64:                case 'd':
        !            65:                case 'f':
        !            66:                case 'l':
        !            67:                case 'P':
        !            68:                case 'p':
        !            69:                case 'Q':
        !            70:                case 'q':
        !            71:                case 'R':
        !            72:                case 'r':
        !            73:                        break;
        !            74:                default:
        !            75:                        fprintf(stderr, "Usage: %s [args] update [args] ...\n",
        !            76:                            __progname);
        !            77:                        return (EX_USAGE);
        !            78:                }
        !            79:        }
        !            80:
        !            81:        argc -= optind;
        !            82:        argv += optind;
        !            83:
        !            84:        return (0);
        !            85: }