File: defresources.awk

package info (click to toggle)
xosview 1.7.3-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,000 kB
  • ctags: 1,200
  • sloc: cpp: 7,317; sh: 1,760; ansic: 368; makefile: 46; awk: 20
file content (44 lines) | stat: -rw-r--r-- 1,302 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#
# This is a simple awk program which will generate defaultstring.cc
# from an X resource file.
#
#
# "$Id: defresources.awk,v 1.5 1999/01/23 22:20:39 mromberg Exp $"
#

#
# insert the "header" for defaultstring.cc
#
BEGIN {
  print "//";
  print "// Do not edit this file.";
  print "// This file is generated automagically from Xdefaults";
  print "// using the awk program found in defresources.awk.";
  print "// This file will be rebuilt when Xdefaults is modified.";
  print "//";
  print "// $Id: defresources.awk,v 1.5 1999/01/23 22:20:39 mromberg Exp $";
  print "//";
  print "//\n\n";
  print "#include \"general.h\"\n";
  print "\n";
  print "CVSID(\"$Id: defresources.awk,v 1.5 1999/01/23 22:20:39 mromberg Exp $\");\n";
  #  By including all of the Xdefaults file below, we also pick up the
  #    CVS Id from the Xdefaults file.
  #  However, it'd be nice if some file had the CVS Id for the
  #    general.h file.  Let's let this .cc file do that, since it doesn't
  #    have an associated header file.
  print "CVSID_DOT_H(GENERAL_H_CVSID);\n";
  printf "char *defaultXResourceString = \"";
}

#
# Echo each line of input (that is not a comment or empty) to stdout.
#
(! /^!/) && (NF != 0) { printf "%s\\n", $0 }

#
# Insert the "tail" for defresources.cc
#
END {
  print "\";\n";
}