source: trunk/third/xscreensaver/utils/ad2c @ 12203

Revision 12203, 678 bytes checked in by ghudson, 26 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r12202, which included commits to RCS files with non-trunk default branches.
  • Property svn:executable set to *
Line 
1#!/bin/sh
2#
3#       ad2c : Convert app-defaults file to C strings decls.
4#
5#       George Ferguson, ferguson@cs.rcohester.edu, 12 Nov 1990.
6#       19 Mar 1991 : gf
7#               Made it self-contained.
8#       6 Jan 1992 : mycroft@gnu.ai.mit.edu (Charles Hannum)
9#               Removed use of "-n" and ":read" label since Gnu and
10#               IBM sed print pattern space on "n" command. Still works
11#               with Sun sed, of course.
12#       7 Jan 1992: matthew@sunpix.East.Sun.COM (Matthew Stier)
13#               Escape quotes after escaping backslashes.
14#
15
16sed '
17/^!/d
18/^$/d
19s/\\/\\\\/g
20s/\\$//g
21s/"/\\"/g
22s/^/"/
23: test
24/\\$/b slash
25s/$/",/
26p
27d
28: slash
29n
30/^!/d
31/^$/d
32s/"/\\"/g
33s/\\\\/\\/g
34s/\\n/\\\\n/g
35s/\\t/\\\\t/g
36s/\\f/\\\\f/g
37s/\\b/\\\\b/g
38b test' "$@"
Note: See TracBrowser for help on using the repository browser.