Sunday, January 20, 2019

The root common form

The raw definition of a linux command:

cmd arag1 arg2 ... # each of the args a val

cmd is going o be either a packed char or a string pointer, a Key can be either. Unless prior agreement holds, it is the char *.

A value is whatever can fit onto a 64 bit field. The simples cas is void pointe, so a common form should be:

trypedef void * Val;

And we want to recast Val as a union, inside the snippet, so it can be specific things having meaning internally.  The restriction on args being anything a 64 bit field can hold is restricted by the applications, Default, for example, says that an arg cannot be an int larger than MAXINT. Default also specifies that strings always point back to original source.

No comments: