[rendering] Do not write duplicated hashes...
[wikipediardware.git] / scripts / GenerateApplicationHeader.awk
blobe26d97b5469a6abf4cca0105b7b9c1c3c75bb5fb
1 # generat an application header
3 BEGIN {
4 NAME_LENGTH = 32
5 for (i = 0; i < NAME_LENGTH; ++i) {
6 padding = padding "\0"
8 name = substr("No Name" padding, 0, NAME_LENGTH)
11 END {
12 printf "SAMO" name
15 /^[[:space:]]*#[[:space:]]*define[[:space:]]+APPLICATION_TITLE[[:space:]]+/ {
16 line = gensub("^.*APPLICATION_TITLE[[:space:]]*\"", "", 1, $0)
17 line = gensub("\".*$", "", 1, line)
18 if ("" != line) {
19 name = substr(line padding, 0, NAME_LENGTH)