GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> CLI / V0-1-2 > cli / rhel6-64


Interface   Data Structures   File List   Data Fields   Globals  

CLI_stitch.c File Reference

Stitch together a unix command line. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <CLI/CLI_pubdefs.h>

Functions

char * CLI_stitchCommandLine (int argc, char *argv[])
 Reconstruct the unix (?) command line, preserving tokenization.
void CLI_stitchCommandFree (char *line)
 Free the buffer allocated by CLI_stitchCommandLine().


Detailed Description

Stitch together a unix command line.

CVS $Id: CLI_stitch.c,v 1.3 2011/03/25 00:51:25 apw Exp $
Author:
A.P.Waite

Function Documentation

void CLI_stitchCommandFree ( char *  line  ) 

Free the buffer allocated by CLI_stitchCommandLine().

Parameters:
line (in) Command line pointer returned by CLI_stitchCommandLine()
CLI_stitchCommandFree() frees the memory allocated by a call to CLI_stitchCommandLine().

char* CLI_stitchCommandLine ( int  argc,
char *  argv[] 
)

Reconstruct the unix (?) command line, preserving tokenization.

Parameters:
argc (in) Number of command line tokens (pass through from "main")
argv (in) Token pointers (pass through from "main")
Returns:
x Pointer to reconstructed command line
Warning:
CLI_stitchCommandLine() allocates memory in which to construct the reconstructed command line. The caller is responsible for freeing this memory using the CLI_stitchCommandFree() call.
The canonical command line tokens delivered to a "main" routine can be stitched together by CLI_stitchCommandLine() in such a fashion that any tokenization constructed on the command line (via assorted quoting) is correctly preserved. This is a courtesy function and has no real function within CLI processing.


Generated on Tue Nov 29 16:30:28 2011 by  doxygen 1.5.8