4 * Revision 1.1 2001/04/04 05:43:37 wang
5 * First commit: compiles on Linux, Amiga, Windows, Windows CE, generic gcc
7 * Revision 1.2 1999/11/26 09:51:19 bnv
8 * Changed: To use the new macros.
10 * Revision 1.1 1998/07/02 17:16:35 bnv
18 /* ------------------- Lb2x ------------------- */
20 Lb2x( const PLstr to
, const PLstr from
)
30 for (i
=j
=k
=0; i
<LLEN(*to
); i
++) {
31 if (ISSPACE(LSTR(*to
)[i
])) continue;
32 if (LSTR(*to
)[i
]<'0' || LSTR(*to
)[i
]>'1')
33 Lerror(ERR_INVALID_HEX_CONST
,0);
35 j
|= ((LSTR(*to
)[i
]=='1')&1) << k
;
41 if (k
) *c
++ = chex
[j
];
43 LLEN(*to
) = STRLEN(LSTR(*to
));
44 LTYPE(*to
) = LSTRING_TY
;