summaryrefslogtreecommitdiffstats
path: root/contrib/cvs/diff/diffrun.h
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-03-18 09:21:42 +0000
committerpeter <peter@FreeBSD.org>1999-03-18 09:21:42 +0000
commit308b60f66831aa65a459a7b347ea6ca14b6e4799 (patch)
tree1b2cd3bad90a2dd8ccb449f73ddfb9e295c0737d /contrib/cvs/diff/diffrun.h
parent0c111e2b51cac7eead56494b30c5977e4ec9a8ea (diff)
downloadFreeBSD-src-308b60f66831aa65a459a7b347ea6ca14b6e4799.zip
FreeBSD-src-308b60f66831aa65a459a7b347ea6ca14b6e4799.tar.gz
Import cvs-1.10 onto vendor branch. Merge to follow shortly.
Obtained from: cyclic.com
Diffstat (limited to 'contrib/cvs/diff/diffrun.h')
-rw-r--r--contrib/cvs/diff/diffrun.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/contrib/cvs/diff/diffrun.h b/contrib/cvs/diff/diffrun.h
new file mode 100644
index 0000000..28c1f45
--- /dev/null
+++ b/contrib/cvs/diff/diffrun.h
@@ -0,0 +1,69 @@
+/* Interface header file for GNU DIFF library.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+
+This file is part of GNU DIFF.
+
+GNU DIFF is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU DIFF is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU DIFF; see the file COPYING. If not, write to
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef DIFFRUN_H
+#define DIFFRUN_H
+
+/* This header file defines the interfaces used by the diff library.
+ It should be included by programs which use the diff library. */
+
+#include <sys/types.h>
+
+#if defined __STDC__ && __STDC__
+#define DIFFPARAMS(args) args
+#else
+#define DIFFPARAMS(args) ()
+#endif
+
+/* The diff_callbacks structure is used to handle callbacks from the
+ diff library. All output goes through these callbacks. When a
+ pointer to this structure is passed in, it may be NULL. Also, any
+ of the individual callbacks may be NULL. This means that the
+ default action should be taken. */
+
+struct diff_callbacks
+{
+ /* Write output. This function just writes a string of a given
+ length to the output file. The default is to fwrite to OUTFILE.
+ If this callback is defined, flush_output must also be defined. */
+ void (*write_output) DIFFPARAMS((char const *, size_t));
+ /* Flush output. The default is to fflush OUTFILE. If this
+ callback is defined, write_output must also be defined. */
+ void (*flush_output) DIFFPARAMS((void));
+ /* Write to stdout. This is called for version and help messages. */
+ void (*write_stdout) DIFFPARAMS((char const *));
+ /* Print an error message. The first argument is a printf format,
+ and the next two are parameters. The default is to print a
+ message on stderr. */
+ void (*error) DIFFPARAMS((char const *, char const *, char const *));
+};
+
+/* Run a diff. */
+
+extern int diff_run DIFFPARAMS((int, char **, char *,
+ const struct diff_callbacks *));
+
+/* Run a diff3. */
+
+extern int diff3_run DIFFPARAMS((int, char **, char *,
+ const struct diff_callbacks *));
+
+#undef DIFFPARAMS
+
+#endif /* DIFFRUN_H */
OpenPOWER on IntegriCloud