uuencode.c File Reference

#include "nsd.h"

Defines

#define ENC(c)   (six2pr[(c)])
#define DEC(c)   ((unsigned char) pr2six[(int)(c)])

Functions

int Ns_HtuuEncode (unsigned char *input, unsigned int len, char *output)
int Ns_HtuuDecode (char *input, unsigned char *output, int outputlen)

Define Documentation

#define DEC (  )     ((unsigned char) pr2six[(int)(c)])

#define ENC (  )     (six2pr[(c)])


Function Documentation

int Ns_HtuuDecode ( char *  input,
unsigned char *  output,
int  outputlen 
)

----------------------------------------------------------------------

Ns_HtuuDecode --

Decode a string.

Results: Number of binary bytes decoded.

Side effects: Decoded characters are placed in output which must be large enough for the result, i.e., (3 + (len * 3) / 4) bytes.

----------------------------------------------------------------------

Skip leading space, if any.

Determine the maximum length of output bytes.

Decode every four input bytes.

Decode remaining 2 or 3 bytes.

int Ns_HtuuEncode ( unsigned char *  input,
unsigned int  len,
char *  output 
)

----------------------------------------------------------------------

Ns_HtuuEncode --

Encode a string.

Results: Number of bytes placed in output.

Side effects: Encoded characters are placed in output which must be large enough for the result, i.e., (1 + (len * 4) / 3) bytes.

----------------------------------------------------------------------

Convert every three input bytes into four output characters.

Convert and pad any remaining bytes.


Generated on Tue Sep 4 19:58:56 2007 by  doxygen 1.5.1