pike.git
/
src
/
builtin.cmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/builtin.cmod:942:
/* 'A' - 'F' */ 10, 11, 12, 13, 14, 15, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 'a' - 'f' */ 10, 11, 12, 13, 14, 15, }; PMOD_EXPORT
-
PIKEFUN string string2hex(string s)
+
PIKEFUN string
(0..255)
string2hex(string s)
errname String.string2hex; optflags OPT_TRY_OPTIMIZE; { struct pike_string *hex; unsigned char *p,*st = (unsigned char *)s->str; int i, l; if (s->size_shift) Pike_error("Bad argument 1 to string2hex(), expected 8-bit string.\n");
pike.git/src/builtin.cmod:975:
/*! @decl string hex2string(string hex) *! @appears String.hex2string *! *! Convert a string of hexadecimal digits to binary data. *! *! @seealso *! @[string2hex()] */ PMOD_EXPORT
-
PIKEFUN string hex2string(string hex)
+
PIKEFUN string
(0..255)
hex2string(string hex)
errname String.hex2string; optflags OPT_TRY_OPTIMIZE; { struct pike_string *s; int tmp, i; unsigned char *p, *q = (unsigned char *)hex->str; int l = hex->len>>1; if(hex->size_shift) Pike_error("Only hex digits allowed.\n"); if(hex->len&1) Pike_error("Can't have odd number of digits.\n");