head	1.2;
access;
symbols
	groff-1_19_1:1.1.1.1
	groff-1_19:1.1.1.1
	groff-1_18_1:1.1.1.1
	groff-1_18:1.1.1.1
	groff-1_17_2:1.1.1.1
	groff-1_17_1:1.1.1.1
	groff-1_17a:1.1.1.1
	groff-1_17:1.1.1.1
	groff-1_16_1b:1.1.1.1
	groff-1_16_1a:1.1.1.1
	groff-1_16_1:1.1.1.1
	groff-1_16:1.1.1.1
	groff-20000311:1.1.1.1
	groff-20000310-1:1.1.1.1
	groff-20000310:1.1.1.1
	pre-1_16:1.1.1.1
	start:1.1.1.1
	wlemb:1.1.1;
locks; strict;
comment	@# @;


1.2
date	2004.06.01.10.46.53;	author wlemb;	state dead;
branches;
next	1.1;

1.1
date	2000.02.06.09.38.57;	author wlemb;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2000.02.06.09.38.57;	author wlemb;	state Exp;
branches;
next	;


desc
@@


1.2
log
@

Integrate gxditview into groff's standard directory hierarchy.

* src/xditview/*: Moved to ...
* src/devices/xditview/*: Here.
Moved DviChar.h and XFontName.h to src/include.
Moved DviChar.c and XFontName.c to new directory src/libs/libxutil.
Split off `xmalloc' into new file src/libs/libxutil/xmalloc.c.
Moved xtotroff.c to new directory src/utils/xtotroff.
Provide proper Makefile.sub files (reusing the stuff from
Imakefile.in).
DESC renamed to DESC.in.
Removed GXDitview-ad.h, INSTALL, Imakefile.in.
Converted everything from K&R to ANSI C.
Decorated with const where appropriate.
Cast string constants with `String' and `char *' where appropriate.
Made it compile with C++ (used as a C compiler).
Removed other minor compiler warnings.

* src/devices/xditview/device.c: Include config.h, string.h, and
defs.h.
Don't declare `exit', `strtok', `strchr', and `getenv'.
(FONTPATH): Remove.

* src/devices/xditview/font.c: Don't declare `XParseFontName' and
`XFormatFontName'.

* src/devices/xditview/xditview.c: Include config.h.
Include stdio.h earlier.
Protect declaration of `popen' and `pclose' with
NEED_DECLARATION_POPEN and NEED_DECLARATION_PCLOSE.
Replace `caddr_t' with `XtPointer'.
(MakePromptFunc): New typedef.
(DoPrint): Use RETSIGTYPE.
(promptfunction): Change type to MakePromptFunc.
(MakePrompt): Use MakePromptFunc for third argument.
(xmalloc): Removed.

* src/devices/xditview/ad2c: Add casts to `String'.

* src/include/XFontName.h (XFontNameString): Don't use array
notation.
Add prototypes for `XParseFontName', `XFormatFontName',
`XCompareFontName', and `XCopyFontName'.

* src/include/Makefile.sub (HDRS): Add `DviChar.h' and
`XFontName.h'.

* src/utils/xtotroff/xtotroff.c: Include getopt.h.
Don't declare `XParseFontName' and `XFormatFontName'.
(xmalloc): Removed.
(main): Remove `optind' and `optarg'.

* Makefile.in (XDEVDIRS, XPROGDIRS, XLIBDIRS): New variables
(to select programs which need X).
Make XDEVIDIRS depend on `FORCE'.
(X_CFLAGS, X_LIBS, X_EXTRA_LIBS, X_PRE_LIBS): New variables (for
X support).
(MDEFINES): Updated.
(LIBDIRS): Use XLIBDIRS.
(CPROGDIRS): Use XPROGDIRS.
(DEVDIRS): Remove font directories for gxditview.
(ALLDIRS, DISTDIRS): Add XDEVDIRS.
(EXTRADIRS): Remove src/xditview.

* Makefile.sub (DISCLEANFILES): Updated.

* Makefile.comm (LIBXUTIL): New variable.
(.cpp.o, .cpp.obj): Handle EXTRA_CCFLAGS.
(.c.o, .c.obj, .y.o): Handle EXTRA_CFLAGS.

* Makefile.cpg, Makefile.ccpg ($PROG): Handle EXTRA_LDFLAGS.

* aclocal.m4 (GROFF_X11): New function.

* configure.ac: Call GROFF_X11.
Don't create src/xditview/Imakefile.
Don't emit notice how to build gxditview.

* configure: Regenerated.

* test-groff.in (GROFF_BIN_PATH, XENVIRONMENT): Updated.
@
text
@#!/bin/sh
#
#	ad2c : Convert app-defaults file to C strings decls.
#
#	George Ferguson, ferguson@@cs.rcohester.edu, 12 Nov 1990.
#	19 Mar 1991: gf
#		Made it self-contained.
#	6 Jan 1992: mycroft@@gnu.ai.mit.edu (Charles Hannum)
#		Removed use of "-n" and ":read" label since Gnu and
#		IBM sed print pattern space on "n" command. Still works
#		with Sun sed, of course.
#	7 Jan 1992: matthew@@sunpix.East.Sun.COM (Matthew Stier)
#		Escape quotes after escaping backslashes.
#	8 Jul 1992: Version 1.6
#		Manpage fixes.
#	19 Apr 1993: Version 1.7
#		Remove comments that were inside the sed command since
#		some versions of sed don't like them. The comments are
#		now given here in the header.
#
# Comments on the script by line:
# /^!/d		Remove comments
# /^$/d		Remove blanks
# s/\\/\\\\/g	Escape backslashes...
# s/\\$//g	...except the line continuation ones
# s/"/\\"/g	Escape quotes
# s/^/"/	Add leading quote
# : test	Establish label for later branch
# /\\$/b slash	Branch to label "slash" if line ends in backslash
# s/$/",/	Otherwise add closing quote and comma...
# p		...output the line...
# d		...and clear the pattern space so it's not printed again
# : slash	Branch comes here if line ends in backslash
# n		Read next line, append to pattern space
# [...]		The "d" and "s" commands that follow just delete
#		comments and blank lines and escape control sequences
# b test	Branch up to see if the line ends in backslash or not
#

sed '
/^!/d
/^$/d
s/\\/\\\\/g
s/\\$//g
s/"/\\"/g
s/^/"/
: test
/\\$/b slash
s/$/",/
p
d
: slash
n
/^!/d
/^$/d
s/"/\\"/g
s/\\\\/\\/g
s/\\n/\\\\n/g
s/\\t/\\\\t/g
s/\\f/\\\\f/g
s/\\b/\\\\b/g
b test' "$@@"
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@groff pre-1.16 with new directory structure
@
text
@@
