Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

util.c File Reference

Implements several useful utility function used throughout the library. More...

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <malloc.h>
#include "libmacs.h"
#include "common.h"

Functions

char * _macs_util_adm2str (char **R, char *M)
 Converts a reply's morsel into a string.

char * _macs_util_itoa (long int num)
 Converts a digit to a string.

char * _macs_util_type2str (macs_profile_type type)
 Converts a macs_profile_type into the appropriate string.

char * _macs_util_svr2str (int server)
 Converts a server spec into the appropriate string.


Detailed Description

Implements several useful utility function used throughout the library.

Id:
util.c,v 1.3 2002/08/05 22:54:04 santana Exp


Function Documentation

char* _macs_util_adm2str char **    R,
char *    M
 

Converts a reply's morsel into a string.

Parameters:
R  The reply from _macs_read()
M  The morsel from _macs_read()
Returns:
The morsel as as string (free() it), or NULL on failure.

char* _macs_util_itoa long int    i
 

Converts a digit to a string.

Parameters:
i  the number to convert
Returns:
The converted string. free() it.

char* _macs_util_type2str macs_profile_type    type
 

Converts a macs_profile_type into the appropriate string.

Parameters:
type  The type to convert
Returns:
The type as a string (free() it), or NULL on failure

char* _macs_util_svr2str int    server
 

Converts a server spec into the appropriate string.

Parameters:
server  One of MACS_AUS, MACS_UPS or MACS_ATS
Returns:
The server spec as a string (free() it), or NULL on failure


Generated on Tue Oct 8 22:15:53 2002 for MACS Client C API by doxygen1.2.16