Permalink
Browse files

minor cleanups

  • Loading branch information...
Carlos Scheidegger
Carlos Scheidegger committed Mar 15, 2013
1 parent 627ed8d commit 9b12699a427a9f637e0c1917bbb7c7503282f77c
View
@@ -8,8 +8,8 @@ rcloud_bundle.js: \
websockets.js \
rserve.js \
rclient.js \
- polyfill-dataview.js \
- buffer.js \
+ polyfill_dataview.js \
+ endian_aware_dataview.js \
rcloud.js \
notebook/_begin.js \
notebook/cell/_begin.js \
View
@@ -1,133 +0,0 @@
-Rsrv = {
- PAR_TYPE: function(x) { return x & 255; },
- PAR_LEN: function(x) { return x >> 8; },
- PAR_LENGTH: function(x) { return x >> 8; },
- par_parse: function(x) { return [Rsrv.PAR_TYPE(x), Rsrv.PAR_LEN(x)]; },
- SET_PAR: function(ty, len) { return ((len & 0xffffff) << 8 | (ty & 255)); },
- CMD_STAT: function(x) { return (x >> 24) & 127; },
- SET_STAT: function(x, s) { return x | ((s & 127) << 24); },
-
- CMD_RESP : 0x10000,
- RESP_OK : 0x10000 | 0x0001,
- RESP_ERR : 0x10000 | 0x0002,
- OOB_SEND : 0x30000 | 0x1000,
- ERR_auth_failed : 0x41,
- ERR_conn_broken : 0x42,
- ERR_inv_cmd : 0x43,
- ERR_inv_par : 0x44,
- ERR_Rerror : 0x45,
- ERR_IOerror : 0x46,
- ERR_notOpen : 0x47,
- ERR_accessDenied : 0x48,
- ERR_unsupportedCmd : 0x49,
- ERR_unknownCmd : 0x4a,
- ERR_data_overflow : 0x4b,
- ERR_object_too_big : 0x4c,
- ERR_out_of_mem : 0x4d,
- ERR_ctrl_closed : 0x4e,
- ERR_session_busy : 0x50,
- ERR_detach_failed : 0x51,
-
- CMD_long : 0x001,
- CMD_voidEval : 0x002,
- CMD_eval : 0x003,
- CMD_shutdown : 0x004,
- CMD_openFile : 0x010,
- CMD_createFile : 0x011,
- CMD_closeFile : 0x012,
- CMD_readFile : 0x013,
- CMD_writeFile : 0x014,
- CMD_removeFile : 0x015,
- CMD_setSEXP : 0x020,
- CMD_assignSEXP : 0201,
- CMD_detachSession : 0x030,
- CMD_detachedVoidEval : 0x031,
- CMD_attachSession : 0x032,
- CMD_ctrl : 0x40,
- CMD_ctrlEval : 0x42,
- CMD_ctrlSource : 0x45,
- CMD_ctrlShutdown : 0x44,
- CMD_setBufferSize : 0x081,
- CMD_setEncoding : 0x082,
- CMD_SPECIAL_MASK : 0xf0,
- CMD_serEval : 0xf5,
- CMD_serAssign : 0xf6,
- CMD_serEEval : 0xf7,
-
-
- DT_INT : 1,
- DT_CHAR : 2,
- DT_DOUBLE : 3,
- DT_STRING : 4,
- DT_BYTESTREAM : 5,
- DT_SEXP : 10,
- DT_ARRAY : 11,
- DT_LARGE : 64,
-
- XT_NULL : 0,
- XT_INT : 1,
- XT_DOUBLE : 2,
- XT_STR : 3,
- XT_LANG : 4,
- XT_SYM : 5,
- XT_BOOL : 6,
- XT_S4 : 7,
- XT_VECTOR : 16,
- XT_LIST : 17,
- XT_CLOS : 18,
- XT_SYMNAME : 19,
- XT_LIST_NOTAG : 20,
- XT_LIST_TAG : 21,
- XT_LANG_NOTAG : 22,
- XT_LANG_TAG : 23,
- XT_VECTOR_EXP : 26,
- XT_VECTOR_STR : 27,
- XT_ARRAY_INT : 32,
- XT_ARRAY_DOUBLE : 33,
- XT_ARRAY_STR : 34,
- XT_ARRAY_BOOL_UA : 35,
- XT_ARRAY_BOOL : 36,
- XT_RAW : 37,
- XT_ARRAY_CPLX : 38,
- XT_UNKNOWN : 48,
- XT_LARGE : 64,
- XT_HAS_ATTR : 128,
-
- BOOL_TRUE : 1,
- BOOL_FALSE : 0,
- BOOL_NA : 2,
-
- GET_XT: function(x) { return x & 63; },
- GET_DT: function(x) { return x & 63; },
- HAS_ATTR: function(x) { return (x & Rsrv.XT_HAS_ATTR) > 0; },
- IS_LARGE: function(x) { return (x & Rsrv.XT_LARGE) > 0; },
-
- // # FIXME A WHOLE LOT OF MACROS HERE WHICH ARE PROBABLY IMPORTANT
- // ##############################################################################
-
- itop: function(x) { return x; },
- ptoi: function(x) { return x; },
- dtop: function(x) { return x; },
- ptod: function(x) { return x; },
-
- fixdcpy: function() { throw "unimplemented"; },
-
- status_codes: {
- 0x41 : "ERR_auth_failed" ,
- 0x42 : "ERR_conn_broken" ,
- 0x43 : "ERR_inv_cmd" ,
- 0x44 : "ERR_inv_par" ,
- 0x45 : "ERR_Rerror" ,
- 0x46 : "ERR_IOerror" ,
- 0x47 : "ERR_notOpen" ,
- 0x48 : "ERR_accessDenied" ,
- 0x49 : "ERR_unsupportedCmd",
- 0x4a : "ERR_unknownCmd" ,
- 0x4b : "ERR_data_overflow" ,
- 0x4c : "ERR_object_too_big",
- 0x4d : "ERR_out_of_mem" ,
- 0x4e : "ERR_ctrl_closed" ,
- 0x50 : "ERR_session_busy" ,
- 0x51 : "ERR_detach_failed"
- }
-};
File renamed without changes.
Oops, something went wrong.

0 comments on commit 9b12699

Please sign in to comment.