*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->NetBSD man pages -> l64a_r (3)              
Title
Content
Arch
Section
 

A64L(3)

Contents


NAME    [Toc]    [Back]

     a64l, l64a, l64a_r - convert between a long integer and a base-64 ASCII
     string

LIBRARY    [Toc]    [Back]

     Standard C Library (libc, -lc)

SYNOPSIS    [Toc]    [Back]

     #include <stdlib.h>

     long
     a64l(const char *s);

     char *
     l64a(long int l);

     int
     l64a_r(long int l, char *buffer, int buflen);

DESCRIPTION    [Toc]    [Back]

     The a64l() and l64a() functions convert between a long integer and its
     base-64 ASCII string representation.

     The characters used to represent ``digits'' are `.' for 0, `/' for 1, `0'
     - `9' for 2 - 11, `A' - `Z' for 12 - 37, and `a' - `z' for 38 - 63.

     a64l() takes a pointer to a NUL-terminated base-64 ASCII string representation,
 s, and returns the corresponding long integer value.

     l64a() takes a long integer value, l, and returns a pointer to the corresponding
 NUL-terminated base-64 ASCII string representation.

     l64a_r() performs a conversion identical to that of l64a() and stores the
     resulting representation in the memory area pointed to by buffer, consuming
 at most buflen characters including the terminating NUL character.

RETURN VALUES    [Toc]    [Back]

     On successful completion, a64l() returns the long integer value corresponding
 to the input string.  If the string pointed to by s is an empty
     string, a64l() returns a value of 0L.

     l64a() returns a pointer to the base-64 ASCII string representation corresponding
 to the input value.  If l is 0L, l64a() returns a pointer to
     an empty string.

     On successful completion, l64a_r() returns 0; if buffer is of insufficient
 length, -1 is returned.

SEE ALSO    [Toc]    [Back]

      
      
     strtol(3)

STANDARDS    [Toc]    [Back]

     The a64l() and l64a() functions conform to X/Open Portability Guide
     Issue 4.2 (``XPG4.2'').  The l64a_r() function conforms to System V
     Interface Definition, Fourth Edition (``SVID4''), Multithreading Extension.

BUGS    [Toc]    [Back]

     The l64a() function is not reentrant.  The value returned by it points
     into a static buffer area; subsequent calls to la64a() may overwrite this
     buffer.  In multi-threaded applications, l64a_r() should be used instead.

BSD                            February 6, 1999                            BSD
[ Back ]
 Similar pages
Name OS Title
a64l Tru64 convert long integer and base-64 ASCII string
l64a Tru64 convert long integer and base-64 ASCII string
a64l IRIX convert between long integer and base-64 ASCII string
atoll FreeBSD convert ASCII string to long or long long integer
atol FreeBSD convert ASCII string to long or long long integer
atoll OpenBSD convert ASCII string to long long integer
atoll NetBSD convert ASCII string to long long integer
atol OpenBSD convert ASCII string to long integer
atol NetBSD convert ASCII string to long integer
wcstol IRIX convert wide character string to long integer, unsigned long integer, long long integer, unsigned long long in
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service