0baeb02007-12-28Martin Nilsson  void main(int n, array args) {
86d33d2013-11-03Tobias S. Josefowitz  if(n!=3) exit(1);
0baeb02007-12-28Martin Nilsson  string file = Stdio.read_file(args[1]); if(!file) exit(1);
86d33d2013-11-03Tobias S. Josefowitz  function write = Stdio.File(args[2], "cwt")->write;
0baeb02007-12-28Martin Nilsson  string ver; sscanf(file, "%*sVersion %s\n", ver); if(!ver) exit(1);
8ff89d2016-07-04Martin Nilsson  ver = String.trim(ver);
0baeb02007-12-28Martin Nilsson  if(!sizeof(ver)) exit(1); write("#define UVERSION %O\n", ver); }