"Fossies" - the Fresh Open Source Software Archive

Member "xosview-1.23/defresources.awk" (11 Jul 2020, 667 Bytes) of package /linux/misc/xosview-1.23.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) (G)AWK source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #
    2 # This is a simple awk program which will generate defaultstring.cc
    3 # from an X resource file.
    4 #
    5 
    6 #
    7 # insert the "header" for defaultstring.cc
    8 #
    9 BEGIN {
   10   print "//";
   11   print "// Do not edit this file.";
   12   print "// This file is generated automagically from Xdefaults";
   13   print "// using the awk program found in defresources.awk.";
   14   print "// This file will be rebuilt when Xdefaults is modified.";
   15   print "//\n";
   16   printf "const char *defaultXResourceString = \"";
   17 }
   18 
   19 #
   20 # Echo each line of input (that is not a comment or empty) to stdout.
   21 #
   22 (! /^!/) && (NF != 0) { printf "%s\\n\\\n", $0 }
   23 
   24 #
   25 # Insert the "tail" for defresources.cc
   26 #
   27 END {
   28   print "\";\n";
   29 }