Saturday, January 19, 2019

Consider two definitions


typedef struct {
char * method;
char * device;
char *  ptr;
long x;
long y;
} XYString;
typedef struct {
char * method;
char * device;
long dx;
long dy;
} XYCursor;

 The top defines a string at some x and y in a rectangle. The bottom defines a relative move of the cursor glyph.

Who owns thee definitions? Xchars, you say.  But, these are full duplex, and common definitions. Xchars obeys these definitions, they are accepted as standard by the enterprise.
Like line termination syntax, accepted enterprise wide, a reusable name space is a good term.

print is another, system wide definition, immediate display of text.  putstr is a syntax of print plus line termination rules. And so on, he commons.

The meaning of XY string is simple, 'The character string relative at the 'y' top of the form'.  Being the Yth from the top means a lot in a lot of contexts, it is not trivial, and he y position is there for more than rectangles. The Xth position is a bit more trivial, but left, center and right have meaning in almost all presentations.

In this case, flush says y is the position found in the fifo, xchars says it is the position from the top of a window. For SQL, position in the fifo has meaning, priority. On the command line it is always zero, which is the definition of command line.  But it should always be there, y, it has been missing for years, weighted by the tons and tons of old typewriter emulators in linux.

Who transmit these definition? I dunno, xchars does not want to own them, certainty no io manager, flush n and io manager both need them, xchars will obey them. Dx and dy, opaque,but meaningful; like deice is distinguished from method, commonly known namespace makes it so.

No comments: