Main Page   Interface   Compound List   File List   Compound Members   File Members  

hd.c File Reference


Compounds

struct  _hd_config

Typedefs

typedef struct _hd_config  hd_config

Functions

int LineRead (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
int FileRewind (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
int LineAscii (ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
int Tcl_HdInit (Tcl_Interp *interp)
int ReadInteger (hd_config *g, Tcl_Interp *interp, int size, int numItems, char *format)
int ReadFloat (hd_config *g, Tcl_Interp *interp, int size, int numItems, char *format)
int main (int argc, char **argv)

Variables

hd_config hdConfig
const char* usageStr

Detailed Description

Function definitions for hd application.


Typedef Documentation

hd_config
 

The typedef for _hd_config.


Function Documentation

int FileRewind ( ClientData clientData,
Tcl_Interp * interp,
int argc,
char * argv[] ) [static]
 

Callback for the Tcl FileRewind command. Rewinds the dump file.

Parameters:
clientData   Application global config info.
interp   The Tcl interpreter handle.
argc   The number of arguments.
argv   Pointers to the argument strings.

Returns:
TCL_OK.

int LineAscii ( ClientData clientData,
Tcl_Interp * interp,
int argc,
char * argv[] ) [static]
 

Callback for the Tcl LineAscii command. Expects:
argv[1] = # of bytes to convert
The ASCII version of the binary data is linked to the Tcl interpreter result field.

Parameters:
clientData   Application global config info.
interp   The Tcl interpreter handle.
argc   The number of arguments.
argv   Pointers to the argument strings.

Returns:
TCL_OK.

int LineRead ( ClientData clientData,
Tcl_Interp * interp,
int argc,
char * argv[] ) [static]
 

Callback for the Tcl LineRead command. Expects:
argv[1] = # of bytes in data
argv[2] = data format
argv[3] = # of items to read
The ASCII version of the binary data is linked to the Tcl interpreter result field.

Parameters:
clientData   Application global config info.
interp   The Tcl interpreter handle.
argc   The number of arguments.
argv   Pointers to the argument strings.
Return values:
TCL_OK   Success.
TCL_ERROR   Failure.

int ReadFloat ( hd_config * g,
Tcl_Interp * interp,
int size,
int numItems,
char * format ) [static]
 

Reads in one or more floating point values from the input file. The data is converted to the appropriate ASCII string and appended to the Tcl interpreter result field.

Parameters:
g   Application global config info.
interp   The Tcl interpreter handle.
size   The size in bytes of each item to read.
numItems   The number of items to read and convert.
format   The format string to apply.
Return values:
TCL_OK   Success.
TCL_ERROR   Failure.

int ReadInteger ( hd_config * g,
Tcl_Interp * interp,
int size,
int numItems,
char * format ) [static]
 

Reads in one or more integer values from the input file. The data is converted to the appropriate ASCII string and appended to the Tcl interpreter result field.

Parameters:
g   Application global config info.
interp   The Tcl interpreter handle.
size   The size in bytes of each item to read.
numItems   The number of items to read and convert.
format   The format string to apply.
Return values:
TCL_OK   Success.
TCL_ERROR   Failure.

int Tcl_HdInit ( Tcl_Interp * interp ) [static]
 

The Tcl/Tk initialization callback. This function is called by Tcl after the interpreter is created but before the application starts. The Tcl interpreter is expanded to handle the application specific commands.

Parameters:
interp   The Tcl interpreter handle.
Return values:
TCL_OK   Success.
TCL_ERROR   Failure.

int main ( int argc,
char ** argv )
 

Application entry point. The program resources are intialized, then the Tcl and Tk interpreters are started using the script hd.tk".

Parameters:
argc   The number of command line arguments.
argv   Pointer to the command line argument strings.
Return values:
0   Success.
-1   Failure.


Variable Documentation

hd_config hdConfig [static]
 

The application global config info.

const char * usageStr [static]
 

Initializer:

"hd [-b|n|x|d|X|D|f|F] file_name\n\n"
                                  "\tb - 8-bit hex\n"
                                  "\tn - 8-bit dec\n"
                                  "\tx - 16-bit hex\n"
                                  "\td - 16-bit dec\n"
                                  "\tX - 32-bit hex\n"
                                  "\tD - 32-bit dec\n"
                                  "\tf - 32-bit single float\n"
                                  "\tF - 64-bin double float"
The help string for the application.


Generated at Wed Feb 20 11:55:09 2002 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000