[BusyBox] [PATCH] uuencode and binary data

Stewart Brodie stewart at metahusky.net
Mon Jan 26 09:42:50 UTC 2004


Pascal Brisset <pascal.brisset at wanadoo.fr> wrote:

> static void uuencode (const unsigned char *s, const char *store, const int
length, const char *tbl)
>  {
>         int i;
>         unsigned char *p = (unsigned char *)store;
>  
>         /* Transform the 3x8 bits to 4x6 bits, as required by base64.  */
>         for (i = 0; i < length; i += 3) {
>                 *p++ = tbl[s[0] >> 2];

Why is the 'store' parameter declared as pointer to const char if you are
then casting away the const and writing through the pointer?


-- 
Stewart Brodie



More information about the busybox mailing list