GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > RIM / V0-0-2

Constituent: lrd_parser     Tag: linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

fileUtils.c File Reference

Initialisation of the RegState structure. More...

#include "error_p.h"
#include "fileUtils_p.h"
#include "lString_p.h"
#include <string.h>
#include <stdlib.h>

Include dependency graph for fileUtils.c:


Functions

FILE * openFile (const char *filename, const char *header, const char *brief)
 Create a new file and write some initial statements into it.
void closeFile (FILE *fp, int isHeader)
 Terminate the file and close it.
unsigned makeName (char *name, size_t size, const char *path, const char *file, const char *ext)
 Build a filename from the constituent parts (path/AG_file.ext).
void print_des (FILE *fp, const char *cptName, const char *regName, const char *fldName)
 Prints a descriptor declaration to the file pointed to by fp.
unsigned print_list (FILE *fp, L_head *list)
 Write out the list of strings to file seperated by commas and new-lines, and terminated by closing braces, semicolons and newlines.

Detailed Description

Initialisation of the RegState structure.

Author:
James Swain -- jswain@slac.stanford.edu

Function Documentation

void closeFile FILE *  fp,
int  isHeader
 

Terminate the file and close it.

Parameters:
fp File pointer
isHeader Indicates that a closing #endif is needed for an include protection macro

unsigned makeName char *  name,
size_t  size,
const char *  path,
const char *  file,
const char *  ext
 

Build a filename from the constituent parts (path/AG_file.ext).

Parameters:
name Pointer to storage for the constructed name
size Size of the available storage (including terminating NULL)
path Path portion of the filename
file File portion of the filename (without extension)
ext Extension portion of the filename

FILE* openFile const char *  filename,
const char *  header,
const char *  brief
 

Create a new file and write some initial statements into it.

Parameters:
filename Name of the file to open
header String to use in the #ifdef, #define statements - NULL implies that this is not a header file so this step will be missed
brief Brief description for the doxygen block
Returns:
Pointer to the opened file or NULL on error.

void print_des FILE *  fp,
const char *  cptName,
const char *  regName,
const char *  fldName
 

Prints a descriptor declaration to the file pointed to by fp.

Parameters:
fp Pointer to file to add to
cptName Component name
regName Register name
fldName Field name

unsigned print_list FILE *  fp,
L_head *  list
 

Write out the list of strings to file seperated by commas and new-lines, and terminated by closing braces, semicolons and newlines.

Parameters:
fp Pointer to the target file
list Head of the linked list of lStrings to print
Returns:
Number of elements written


Generated on Thu Apr 13 23:38:32 2006 by  doxygen 1.4.4