From: Richard W.M. Jones Date: Thu, 23 Feb 2012 20:29:56 +0000 (+0000) Subject: In XDR, introduce a new type 'string_big_int'. X-Git-Tag: 0.0.4~11 X-Git-Url: http://git.annexia.org/?p=whenjobs.git;a=commitdiff_plain;h=acb316417965e2b40010aeb35f8ff990db0d1d42 In XDR, introduce a new type 'string_big_int'. This is just code motion. --- 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' */ };