mirror of
https://github.com/lcn2/calc.git
synced 2025-08-19 01:13:27 +03:00
Release calc version 2.10.2t30
This commit is contained in:
22
calcerr_h.awk
Normal file
22
calcerr_h.awk
Normal file
@@ -0,0 +1,22 @@
|
||||
BEGIN {
|
||||
ebase = 10000;
|
||||
printf("#define E__BASE %d\t/* calc errors start above here */\n\n", ebase);
|
||||
}
|
||||
NF > 1 {
|
||||
if (length($1) > 7) {
|
||||
printf("#define %s\t", $1, NR);
|
||||
} else {
|
||||
printf("#define %s\t\t", $1, NR);
|
||||
}
|
||||
printf("%d\t/* ", ebase+NR);
|
||||
for (i=2; i < NF; ++i) {
|
||||
printf("%s ", $i);
|
||||
}
|
||||
printf("%s */\n", $NF);
|
||||
}
|
||||
END {
|
||||
printf("\n#define E__HIGHEST\t%d\t/* highest calc error */\n", NR+ebase);
|
||||
printf("#define E__COUNT\t\t%d\t/* number of calc errors */\n", NR);
|
||||
printf("#define E_USERDEF\t20000\t/* base of user defined errors */\n\n");
|
||||
printf("/* names of calc error values */\n");
|
||||
}
|
Reference in New Issue
Block a user