divert(-1)dnl

#--------------------------------------------------------------
#
# M4 macro's to convert BaCon code from lowercase to uppercase.
#
# Usage: m4 upper.m4 <prog.bac>
#
#--------------------------------------------------------------

# Avoid name clash with M4 builtin macros
undefine(`decr')
undefine(`eval')
undefine(`incr')
undefine(`include')
undefine(`index')
undefine(`len')

# Avoid M4 changing text in string literals
changecom(`"',`"')

define(abs,`ABS($@)')
define(accept,`ACCEPT($@)')
define(acos,`ACOS($@)')
define(address,`ADDRESS($@)')
define(alarm,`ALARM')
define(alias,`ALIAS')
define(align,`ALIGN($@)')
define(amount,`AMOUNT($@)')
define(and,`AND')
define(append,`ifelse($#,0,APPEND,APPEND($@))')
define(appending,`APPENDING')
define(argument,`ARGUMENT')
define(array,`ARRAY')
define(as,`AS')
define(asc,`ASC($@)')
define(asin,`ASIN($@)')
define(assoc,`ASSOC')
define(atn2,`ATN2($@)')
define(atn,`ATN($@)')
define(b64dec,`B64DEC($@)')
define(b64enc,`B64ENC($@)')
define(back,`BACK')
define(bappend,`BAPPEND')
define(base,`BASE')
define(basename,`BASENAME')
define(between,`BETWEEN')
define(bg,`BG')
define(bin,`BIN($@)')
define(bit,`BIT($@)')
define(black,`BLACK')
define(blink,`BLINK')
define(bload,`BLOAD($@)')
define(blue,`BLUE')
define(bold,`BOLD')
define(break,`BREAK')
define(broadcast,`BROADCAST')
define(bsave,`BSAVE')
define(by,`BY')
define(bytelen,`BYTELEN($@)')
define(ca,`CA')
define(call,`CALL')
define(case,`CASE')
define(catch,`CATCH')
define(ceil,`CEIL($@)')
define(certificate,`CERTIFICATE')
define(change,`CHANGE')
define(changedir,`CHANGEDIR')
define(chop,`CHOP')
define(chr,`CHR')
define(chunk,`CHUNK')
define(cipher,`CIPHER')
define(class,`CLASS')
define(cl,`CL')
define(clear,`CLEAR')
define(close,`CLOSE')
define(cmdline,`CMDLINE($@)')
define(cmode,`CMODE')
define(cn,`CN')
define(coil,`COIL')
define(collapse,`ifelse($#,0,COLLAPSE,COLLAPSE($@))')
define(collect,`COLLECT')
define(color,`COLOR')
define(columns,`COLUMNS')
define(compare,`COMPARE')
define(compiler,`COMPILER')
define(concat,`CONCAT')
define(const,`CONST')
define(continue,`CONTINUE')
define(copy,`COPY')
define(cos,`COS($@)')
define(count,`COUNT($@)')
define(cr,`CR')
define(curdir,`CURDIR')
define(current,`CURRENT')
define(cursor,`CURSOR')
define(cut,`CUT')
define(cyan,`CYAN')
define(data,`DATA')
define(day,`DAY($@)')
define(dec,`DEC($@)')
define(declare,`DECLARE')
define(decr,`DECR')
define(default,`DEFAULT')
define(def,`DEF')
define(deg,`DEG($@)')
define(del,`DEL')
define(delete,`DELETE')
define(delim,`ifelse($#,0,DELIM,DELIM($@))')
define(device,`DEVICE')
define(directory,`DIRECTORY')
define(dirname,`DIRNAME')
define(dle,`DLE')
define(do,`DO')
define(done,`DONE')
define(dotimes,`DOTIMES')
define(down,`DOWN')
define(downto,`DOWNTO')
define(dq,`DQ')
define(el,`EL')
define(elif,`ELIF')
define(else,`ELSE')
define(endclass,`ENDCLASS')
define(end,`END')
define(endenum,`ENDENUM')
define(endfile,`ENDFILE($@)')
define(endfork,`ENDFORK')
define(endfunction,`ENDFUNCTION')
define(endfunc,`ENDFUNC')
define(endif,`ENDIF')
define(endrecord,`ENDRECORD')
define(endselect,`ENDSELECT')
define(endsub,`ENDSUB')
define(endusec,`ENDUSEC')
define(enduseh,`ENDUSEH')
define(endwith,`ENDWITH')
define(enum,`ENUM')
define(eprint,`EPRINT')
define(eq,`EQ')
define(equal,`EQUAL($@)')
define(err,`ERR')
define(error,`ERROR')
define(esc,`ESC')
define(escape,`ESCAPE')
define(eval,`EVAL($@)')
define(even,`EVEN($@)')
define(exchange,`EXCHANGE')
define(excl,`EXCL')
define(exec,`EXEC')
define(exit,`EXIT')
define(exp,`EXP($@)')
define(explicit,`EXPLICIT')
define(explode,`EXPLODE')
define(extract,`EXTRACT')
define(false,`FALSE')
define(fg,`FG')
define(fi,`FI')
define(fileexists,`FILEEXISTS($@)')
define(file,`FILE')
define(filelen,`FILELEN($@)')
define(filetime,`FILETIME($@)')
define(filetype,`FILETYPE($@)')
define(fill,`FILL')
define(find,`FIND($@)')
define(first,`FIRST')
define(flatten,`FLATTEN')
define(floating,`FLOATING')
define(floor,`FLOOR($@)')
define(fn,`FN')
define(for,`FOR')
define(fork,`FORK')
define(format,`FORMAT')
define(forward,`FORWARD')
define(fp,`FP($@)')
define(framework,`FRAMEWORK')
define(free,`FREE')
define(from,`FROM')
define(func,`FUNC')
define(function,`FUNCTION')
define(ge,`GE')
define(getbyte,`GETBYTE')
define(getenviron,`GETENVIRON')
define(getfile,`GETFILE')
define(getkey,`GETKEY')
define(getline,`GETLINE')
define(getpeer,`GETPEER')
define(getx,`GETX')
define(gety,`GETY')
define(gui,`GUI')
define(guifn,`GUIFN($@)')
define(guidefine,`GUIDEFINE($@)')
define(guievent,`GUIEVENT')
define(guiget,`GUIGET($@)')
define(guiset,`GUISET($@)')
define(guiwidget,`GUIWIDGET($@)')
define(global,`GLOBAL')
define(gosub,`GOSUB')
define(goto,`GOTO')
define(gotoxy,`GOTOXY')
define(green,`GREEN')
define(gt,`GT')
define(hasdelim,`HASDELIM($@)')
define(hash,`HASH($@)')
define(head,`HEAD')
define(hex,`HEX')
define(host,`HOST')
define(hostname,`HOSTNAME')
define(hour,`HOUR($@)')
define(if,`IF')
define(iif,`ifelse($#,0,IIF,IIF($@))')
define(imode,`IMODE')
define(import,`IMPORT')
define(inbetween,`INBETWEEN')
define(include,`INCLUDE')
define(incr,`INCR')
define(in,`IN')
define(index,`ifelse($#,0,INDEX,INDEX($@))')
define(input,`INPUT')
define(insert,`INSERT')
define(instr,`INSTR($@)')
define(instrrev,`INSTRREV($@)')
define(intense,`INTENSE')
define(international,`INTERNATIONAL')
define(intl,`INTL')
define(inverse,`INVERSE')
define(invert,`INVERT($@)')
define(isascii,`ISASCII($@)')
define(isfalse,`ISFALSE($@)')
define(is,`IS')
define(iskey,`ISKEY($@)')
define(isnot,`ISNOT')
define(istoken,`ISTOKEN($@)')
define(istrue,`ISTRUE($@)')
define(isutf8,`ISUTF8($@)')
define(italic,`ITALIC')
define(join,`JOIN')
define(label,`LABEL')
define(last,`LAST')
define(lcase,`LCASE')
define(ldflags,`LDFLAGS')
define(left,`LEFT')
define(le,`LE')
define(len,`LEN($@)')
define(let,`LET')
define(library,`LIBRARY')
define(lineno,`LINENO')
define(lmode,`LMODE')
define(load,`LOAD')
define(local,`LOCAL')
define(log,`LOG($@)')
define(lookup,`LOOKUP')
define(loop,`LOOP')
define(lt,`LT')
define(magenta,`MAGENTA')
define(makedir,`MAKEDIR')
define(map,`MAP')
define(match,`MATCH($@)')
define(max,`ifelse($#,0,MAX,MAX($@))')
define(maxnum,`MAXNUM($@)')
define(maxrandom,`MAXRANDOM')
define(memcheck,`MEMCHECK($@)')
define(me,`ME')
define(memory,`MEMORY($@)')
define(memrewind,`MEMREWIND')
define(memstream,`MEMSTREAM')
define(memtell,`MEMTELL($@)')
define(memtype,`MEMTYPE')
define(merge,`MERGE')
define(mid,`MID')
define(min,`ifelse($#,0,MIN,MIN($@))')
define(minute,`MINUTE($@)')
define(mod,`MOD($@)')
define(monitor,`MONITOR')
define(month,`ifelse($#,0,MONTH,MONTH($@))')
define(multicast,`MULTICAST')
define(mypid,`MYPID')
define(ne,`NE')
define(network,`NETWORK')
define(next,`NEXT')
define(nl,`NL')
define(nntl,`NNTL')
define(node,`NODE')
define(normal,`NORMAL')
define(not,`NOT($@)')
define(now,`NOW')
define(nrkeys,`NRKEYS($@)')
define(number,`NUMBER')
define(obtain,`OBTAIN')
define(odd,`ODD($@)')
define(off,`OFF')
define(offset,`OFFSET')
define(omode,`OMODE')
define(on,`ON')
define(open,`OPEN')
define(option,`OPTION')
define(options,`OPTIONS')
define(or,`OR')
define(os,`OS')
define(other,`OTHER')
define(outbetween,`OUTBETWEEN')
define(parse,`PARSE')
define(peek,`PEEK($@)')
define(pi,`PI')
define(poke,`POKE')
define(pow,`POW($@)')
define(pragma,`PRAGMA')
define(print,`PRINT')
define(proper,`PROPER')
define(proto,`PROTO')
define(pull,`PULL')
define(push,`PUSH')
define(putbyte,`PUTBYTE')
define(putline,`PUTLINE')
define(quoted,`QUOTED')
define(rad,`RAD($@)')
define(random,`RANDOM($@)')
define(reading,`READING')
define(readln,`READLN')
define(read,`READ')
define(readwrite,`READWRITE')
define(realpath,`REALPATH')
define(reap,`REAP')
define(receive,`RECEIVE')
define(record,`RECORD')
define(recursive,`RECURSIVE')
define(redim,`REDIM')
define(red,`RED')
define(regex,`REGEX($@)')
define(reglen,`REGLEN')
define(relate,`RELATE')
define(rem,`REM')
define(rename,`RENAME')
define(repeat,`REPEAT')
define(replace,`REPLACE')
define(re,`RE')
define(reset,`RESET')
define(resize,`RESIZE')
define(restore,`RESTORE')
define(resume,`RESUME')
define(return,`RETURN')
define(retval,`RETVAL')
define(reverse,`REVERSE')
define(rev,`REV')
define(rewind,`REWIND')
define(right,`RIGHT')
define(rip,`RIP')
define(rnd,`RND')
define(rol,`ROL($@)')
define(ror,`ROR($@)')
define(rotate,`ROTATE')
define(round,`ROUND($@)')
define(rows,`ROWS')
define(run,`ifelse($#,0,RUN,RUN($@))')
define(save,`SAVE')
define(screen,`SCREEN')
define(scroll,`SCROLL')
define(sctp,`SCTP')
define(search,`SEARCH($@)')
define(second,`SECOND($@)')
define(seed,`SEED')
define(seek,`SEEK')
define(select,`SELECT')
define(send,`SEND')
define(server,`SERVER')
define(set,`SET')
define(setenviron,`SETENVIRON')
define(setserial,`SETSERIAL')
define(sgn,`SGN($@)')
define(signal,`SIGNAL')
define(sin,`SIN($@)')
define(sizeof,`SIZEOF($@)')
define(size,`SIZE')
define(sleep,`SLEEP')
define(socket,`SOCKET')
define(sort,`ifelse($#,0,SORT,SORT($@))')
define(source,`SOURCE')
define(sp,`SP')
define(spc,`SPC')
define(speed,`SPEED')
define(split,`SPLIT')
define(sqr,`SQR($@)')
define(startpoint,`STARTPOINT')
define(start,`START')
define(step,`STEP')
define(stop,`STOP')
define(strike,`STRIKE')
define(string,`STRING')
define(str,`STR')
define(sub,`SUB')
define(sumf,`SUMF($@)')
define(sum,`SUM($@)')
define(swap,`SWAP')
define(system,`SYSTEM')
define(tab,`TAB')
define(tail,`TAIL')
define(tally,`TALLY($@)')
define(tan,`TAN($@)')
define(tcp,`TCP')
define(tell,`TELL($@)')
define(textdomain,`TEXTDOMAIN')
define(then,`THEN')
define(timer,`TIMER')
define(timevalue,`TIMEVALUE($@)')
define(tls,`TLS')
define(toascii,`TOASCII($@)')
define(token,`TOKEN')
define(to,`TO')
define(trace,`TRACE')
define(trap,`TRAP')
define(tree,`TREE')
define(true,`TRUE')
define(typeof,`TYPEOF')
define(type,`TYPE')
define(ucase,`UCASE')
define(ubound,`UBOUND($@)')
define(ucs,`UCS($@)')
define(udp,`UDP')
define(ulen,`ULEN($@)')
define(underline,`UNDERLINE')
define(unescape,`UNESCAPE')
define(unflatten,`UNFLATTEN')
define(uniq,`UNIQ')
define(unset,`UNSET')
define(until,`UNTIL')
define(up,`UP')
define(usec,`USEC')
define(useh,`USEH')
define(utf8,`ifelse($#,0,UTF8,UTF8($@))')
define(val,`VAL($@)')
define(vartype,`VARTYPE')
define(var,`VAR')
define(verify,`VERIFY($@)')
define(version,`VERSION')
define(wait,`WAIT($@)')
define(walk,`WALK')
define(weekday,`WEEKDAY')
define(week,`WEEK($@)')
define(wend,`WEND')
define(whence,`WHENCE')
define(where,`WHERE($@)')
define(while,`WHILE')
define(white,`WHITE')
define(with,`WITH')
define(writeln,`WRITELN')
define(writing,`WRITING')
define(year,`YEAR($@)')
define(yellow,`YELLOW')

divert(0)dnl
