Debian Codegraph @

vms/gawk_ident.com

raw
1 $! gawk_ident.com - Append ident with version to gawk.
2 $!
3 $!
4 $ open/read cfgh config.h
5 $cfgh_loop:
6 $ read/end=cfgh_loop_end cfgh line_in
7 $ key1 = f$element(0, " ", line_in)
8 $ if key1 .nes. "#define" then goto cfgh_loop
9 $ key2 = f$element(1, " ", line_in)
10 $ if key2 .nes. "VERSION" then goto cfgh_loop
11 $ version_string = f$element(2, " ", line_in) - """" - """"
12 $ ver_major = f$element(0, ".", version_string)
13 $ ver_minor = f$element(1, ".", version_string)
14 $ REL = ver_major + "." + ver_minor
15 $ PATCHLVL = f$element(2, ".", version_string)
16 $cfgh_loop_end:
17 $ close cfgh
18 $!
19 $ open/append Fopt gawk.opt
20 $ write Fopt "identification=""V''REL'.''PATCHLVL'"""
21 $ close Fopt