File: app2head

package info (click to toggle)
xcolorsel 1.1a-7
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 388 kB
  • ctags: 340
  • sloc: ansic: 2,900; makefile: 106; sh: 29
file content (22 lines) | stat: -rwxr-xr-x 541 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
# create a header file for xcolorsel.c to compile in the choosen Application defaults
# No I don't wanna to copyright this trash.
# First version Sat Sep  4 18:04:35 GMT 1993, Michael Weller

sed '
#kill comments
/^\!/d
#and preprocessor commands
/^\#/d
#and empty or blank lines (There is a Tab and a blank between the brackets!)
/^[ 	]*$/d
#escape embedded \
s/\\/\\\\/g
#escape embedded "
s/"/\\"/g
#insert leading "
s/^/"/
#append ",
s/$/",/
#if it was a continued line erase the , and let ANSI C do the magic:
s/\\\\",/"/' $*