www.delorie.com/djgpp/doc/libc/libc_520.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]



#include <stdlib.h>

char *l64a(long value);


This function takes a long argument and returns a pointer to its radix-64 representation. Negative values are supported as well. The resulting string can be turned back into a long value by the a64l function (see section a64l).

Return Value

A pointer to a static buffer containing the radix-64 representation of value. Subsequent calls will overwrite the contents of this buffer. If value is 0L, this function returns an empty string.


The radix-64 ASCII representation is a notation whereby 32-bit integers are represented by up to 6 ASCII characters; each character represents a single radix-64 digit. Radix-64 refers to the fact that each digit in this representation can take 64 different values. If the long type is more than 32 bits in size, only the low-order 32 bits are used. The characters used to represent digits are `.' (dot) for 0, `/' for 1, `0' through `9' for 2 to 11, `A' through `Z' for 12 to 37, and `a' through `z' for 38 to 63.

Note that this is not the same encoding used by either uuencode or the MIME base64 encoding.


POSIX 1003.2-1992; 1003.1-2001 (see note 1)


  1. This function is new to the Posix 1003.1-200x draft

  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004