mkforeachimage.awk 312 Bytes EditWeb IDE 1 2 3 4 5 6 7 8 9 10 11 12 13 BEGIN { ORS = ""; print "#define foreach_builtin_process_image(x)"; n = split(processes, a, /[ \t]+/); for (i = 1; i <= n; ++i) { gsub(/^p-/, "", a[i]); if (match(a[i], /^[_A-Za-z][_A-Za-z0-9]*$/)) { print " x(", a[i], ")"; } } print "\n"; exit; }