X-Git-Url: http://git.annexia.org/?p=whenjobs.git;a=blobdiff_plain;f=lib%2Fwhenproto.x;h=603cf9161d8a0ec857b2cc8640935caa336cf4e7;hp=2ca662f25cb649aa3ce1fea96ca680481cf0e5a1;hb=acb316417965e2b40010aeb35f8ff990db0d1d42;hpb=cffe87109d9c868eefd48f7d5255a4863a578e4d diff --git a/lib/whenproto.x b/lib/whenproto.x index 2ca662f..603cf91 100644 --- a/lib/whenproto.x +++ b/lib/whenproto.x @@ -21,12 +21,14 @@ * socket '$HOME/.whenjobs/socket'. The wire protocol is SunRPC. */ -/* Maximum length of a variable name and string value. */ +/* Maximum lengths and some useful typedefs. */ const MAX_VARIABLE_NAME_LENGTH = 256; const MAX_VARIABLE_VALUE_LENGTH = 65536; +const MAX_BIG_INT_LENGTH = 64; /* when encoded as a string */ typedef string variable_name; typedef string string_value; +typedef string string_big_int; typedef variable_name variable_name_list<>; @@ -59,7 +61,7 @@ union variable switch (variable_type t) { case STRING_T: string_value s; case INT_T: - string i<64>; /* OCaml [big_int], as a string. */ + string_big_int i; /* OCaml [big_int], as a string. */ case FLOAT_T: double f; /* C 'double' maps to an OCaml 'float' */ };