Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/crunch/crunchgen/mkskel.sh
#! /bin/sh | #! /bin/sh | ||||
# idea and sed lines taken straight from flex | # idea and sed lines taken straight from flex | ||||
cat <<!EOF | cat <<!EOF | ||||
/* File created via mkskel.sh */ | /* File created via mkskel.sh */ | ||||
extern const char *crunched_skel[]; | |||||
const char *crunched_skel[] = { | const char *crunched_skel[] = { | ||||
!EOF | !EOF | ||||
sed 's/\\/&&/g' $* | sed 's/"/\\"/g' | sed 's/.*/ "&",/' | sed 's/\\/&&/g' $* | sed 's/"/\\"/g' | sed 's/.*/ "&",/' | ||||
cat <<!EOF | cat <<!EOF | ||||
0 | 0 | ||||
}; | }; | ||||
!EOF | !EOF |