CWB
Functions | Variables

cwb-atoi.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include "../cl/endian.h"
#include "../cl/globals.h"

Functions

Variables


Function Documentation

int main ( int  argc,
char **  argv 
)

Main function for cwb-atoi.

Parameters:
argcNumber of command-line arguments.
argvCommand-line arguments.

References little_endian, process_fd(), progname, and VERSION.

void process_fd ( FILE *  fd)

Reads from a stream one integer-representing string per line, and writes the corresponding integer to STDOUT.

Parameters:
fdThe file handle.

References buf, cl_bswap32(), CL_MAX_LINE_LENGTH, and little_endian.

Referenced by main().


Variable Documentation

int little_endian = 0

boolean: is the byte-order little-endian?

CWB default format is 4-byte big-endian = network

Referenced by main(), and process_fd().