Monday, December 24, 2018

My Xchars version 2 plan

XZchars version one has the mutilities to open and write to a window, and I have the utility to change font or color.  So I keep all those utilities, and jus slip in a symbol table, fast and short, so callers can use plain text ids to reference variables. A mere additional 100 lines of code.  Currently all the utilities take argc and args format, not a problem. A simple reformat looks like:


args[*argc]=GetSym(args[*argc];  // Replace the args position with its symbol look up

So,  Xchars accepts plain text ids for string rectangles, connections, windows. Simplifies:

NewWind conn rect win;  //  conn and win all plain text ids. 

 rect give the window position and size. The rectangle structure holds identifies were a block of text goes.

So NewWin has linux format going in and linux format in the call to new_windows utility, the args just reformatted on input, like a macro expansion on input. They still retain univesal interface.

No comments: