/usr/include/ug/cmdline.h is in libdune-uggrid-dev 2.5.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
/****************************************************************************/
/* */
/* File: cmdline.h */
/* */
/* Purpose: defines the command abstract data type */
/* */
/* Author: Peter Bastian, */
/* Institut fuer Computeranwendungen III */
/* Universitaet Stuttgart */
/* Pfaffenwaldring 27 */
/* 70569 Stuttgart */
/* email: ug@ica3.uni-stuttgart.de */
/* */
/* */
/* History: 18.02.92 begin, ug version 2.0 */
/* 05 Sep 1992, split cmd.c into cmdint.c and commands.c */
/* 17.12.94 ug 3.0 */
/* */
/* Remarks: */
/* */
/****************************************************************************/
/****************************************************************************/
/* */
/* auto include mechanism and other include files */
/* */
/****************************************************************************/
#ifndef __CMDLINE__
#define __CMDLINE__
#include "ugtypes.h"
#include "ugenv.h"
#include "namespace.h"
START_UGDIM_NAMESPACE
/****************************************************************************/
/* */
/* defines in the following order */
/* */
/* compile time constants defining static data size (i.e. arrays) */
/* other constants */
/* macros */
/* */
/****************************************************************************/
/* return values for commands */
#define DONE 0 /* command exectuted properly */
#define OKCODE 0 /* command exectuted properly */
#define QUITCODE 12345 /* indicates end of program to calling if */
#define PARAMERRORCODE 3 /* not enough parameters */
#define CMDERRORCODE 4 /* other error condition */
#define INTERRUPTCODE 5 /* cmd terminated by user interrupt */
#define FATAL 9999 /* fatal error, quit program */
#define MAXOPTIONS 256 /* maximum number of options for a command */
#define OPTIONBUFFERLEN 16384 /* length of option buffer */
/****************************************************************************/
/* */
/* data structures exported by the corresponding source file */
/* */
/****************************************************************************/
typedef INT (*CommandProcPtr)(INT,char **);
typedef struct { /* executable command variable */
NS_PREFIX ENVVAR v; /* this is an environment variable */
CommandProcPtr cmdProc; /* function to be executed */
} COMMAND ;
/****************************************************************************/
/* */
/* function declarations */
/* */
/****************************************************************************/
INT InitCmdline (void);
/* command creation and execution */
COMMAND *GetFirstCommand (void);
COMMAND *GetNextCommand (const COMMAND *cmd);
COMMAND *SearchUgCmd (const char *cmdName);
COMMAND *CreateCommand (const char *name, CommandProcPtr cmdProc);
COMMAND *GetCommand (const char *name);
COMMAND *ReplaceCommand (const char *name, CommandProcPtr cmdProc);
INT ExecCommand (char *cmdLine);
END_UGDIM_NAMESPACE
#endif
|