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

Annotation of src/usr.bin/diff/diff.h, Revision 1.14

1.14    ! millert     1: /*     $OpenBSD: diff.h,v 1.13 2003/07/04 17:37:07 millert Exp $       */
1.2       deraadt     2:
                      3: /*
                      4:  * Copyright (C) Caldera International Inc.  2001-2002.
                      5:  * All rights reserved.
                      6:  *
                      7:  * Redistribution and use in source and binary forms, with or without
                      8:  * modification, are permitted provided that the following conditions
                      9:  * are met:
                     10:  * 1. Redistributions of source code and documentation must retain the above
                     11:  *    copyright notice, this list of conditions and the following disclaimer.
                     12:  * 2. Redistributions in binary form must reproduce the above copyright
                     13:  *    notice, this list of conditions and the following disclaimer in the
                     14:  *    documentation and/or other materials provided with the distribution.
                     15:  * 3. All advertising materials mentioning features or use of this software
                     16:  *    must display the following acknowledgement:
                     17:  *     This product includes software developed or owned by Caldera
                     18:  *     International, Inc.
                     19:  * 4. Neither the name of Caldera International, Inc. nor the names of other
                     20:  *    contributors may be used to endorse or promote products derived from
                     21:  *    this software without specific prior written permission.
                     22:  *
                     23:  * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA
                     24:  * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR
                     25:  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
                     26:  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
                     27:  * IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE FOR ANY DIRECT,
                     28:  * INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
                     29:  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
                     30:  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     31:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
                     32:  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
                     33:  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
                     34:  * POSSIBILITY OF SUCH DAMAGE.
                     35:  */
                     36:
1.1       deraadt    37: /*     diff.h  4.7     85/08/16        */
                     38:
                     39: /*
                     40:  * diff - common declarations
                     41:  */
                     42:
                     43: #include <sys/param.h>
                     44: #include <sys/stat.h>
1.6       millert    45:
                     46: #include <ctype.h>
                     47: #include <err.h>
1.1       deraadt    48: #include <signal.h>
1.6       millert    49: #include <stdio.h>
1.1       deraadt    50:
                     51: /*
                     52:  * Output format options
                     53:  */
                     54: #define        D_NORMAL        0       /* Normal output */
                     55: #define        D_EDIT          -1      /* Editor script out */
                     56: #define        D_REVERSE       1       /* Reverse editor script */
                     57: #define        D_CONTEXT       2       /* Diff with context */
1.6       millert    58: #define        D_UNIFIED       3       /* Unified context diff */
                     59: #define        D_IFDEF         4       /* Diff with merged #ifdef's */
                     60: #define        D_NREVERSE      5       /* Reverse ed script with numbered
1.1       deraadt    61:                                   lines and no trailing . */
                     62:
1.14    ! millert    63: extern int     aflag, bflag, iflag, rflag, sflag, tflag, wflag;
1.11      millert    64: extern char    *start, *ifdefname;
1.12      millert    65: extern int     opt, wantelses, context, status, anychange;
1.9       millert    66: extern char    *tempfiles[], **diffargv;
1.8       tedu       67: extern char    *file1, *file2, *efile1, *efile2;
                     68: extern struct  stat stb1, stb2;
1.1       deraadt    69:
1.7       millert    70: void   *emalloc(size_t);
                     71: void   *erealloc(void *, size_t);
1.3       tedu       72: char   *splice(char *, char *);
1.9       millert    73: char   *copytemp(const char *, int);
1.3       tedu       74: void   diffdir(char **);
                     75: void   diffreg(void);
                     76: int    max(int, int);
                     77: int    min(int, int);
1.10      millert    78: __dead void error(const char *, ...);
                     79: __dead void errorx(const char *, ...);
1.6       millert    80: __dead void done(int);