NuSMV/code/nusmv/shell/cmd/cmdInt.h File Reference

#include "nusmv/shell/cmd/cmd.h"
#include "nusmv/core/cinit/cinit.h"
#include "nusmv/core/opt/opt.h"
#include "nusmv/core/dd/dd.h"
#include "nusmv/core/utils/utils.h"
#include "nusmv/core/utils/array.h"
#include "nusmv/core/utils/avl.h"

Go to the source code of this file.

Data Structures

struct  CmdAliasDescr_t
struct  CommandDescr_t

Defines

#define BSD_COMP
#define dirent   direct
#define ENV_CMD_ALIAS_TABLE   "__cmd_alias_table__"
#define ENV_CMD_COMMAND_HISTORY   "__cmd_cmd_history__"
#define ENV_CMD_COMMAND_TABLE   "__cmd_cmd_table__"
#define NAMLEN(dirent)   (dirent)->d_namlen

Functions

boolean Cmd_CommandDefined (NuSMVEnv_ptr env, const char *name)
 True iff a command named 'name' is defined.
CommandDescr_tCmd_CommandGet (NuSMVEnv_ptr env, const char *name)
 Returns the command stored under 'name' in the command table.
void CmdAliasFree (char *value)
 required
CommandDescr_tCmdCommandCopy (CommandDescr_t *value)
 Copies value.
void CmdCommandFree (char *value)
 required
char * CmdFgetsFilec (NuSMVEnv_ptr env, char *buf, unsigned int size, FILE *stream, char *prompt)
 Duplicates the function of fgets, but also provides file completion in the same style as csh.
void CmdFreeArgv (int argc, char **argv)
 required
char * CmdHistorySubstitution (NuSMVEnv_ptr env, char *line, int *changed)
 Simple history substitution routine.
void free ()
 Internal declarations for command package.
char * strncpy (char *, const char *, size_t)

Define Documentation

#define BSD_COMP
Todo:
Missing synopsis
Todo:
Missing description
#define dirent   direct
#define ENV_CMD_ALIAS_TABLE   "__cmd_alias_table__"
Todo:
Missing synopsis
Todo:
Missing description
#define ENV_CMD_COMMAND_HISTORY   "__cmd_cmd_history__"
Todo:
Missing synopsis
Todo:
Missing description
#define ENV_CMD_COMMAND_TABLE   "__cmd_cmd_table__"
Todo:
Missing synopsis
Todo:
Missing description
#define NAMLEN ( dirent   )     (dirent)->d_namlen

Function Documentation

boolean Cmd_CommandDefined ( NuSMVEnv_ptr  env,
const char *  name 
)

True iff a command named 'name' is defined.

AutomaticStart

CommandDescr_t* Cmd_CommandGet ( NuSMVEnv_ptr  env,
const char *  name 
)

Returns the command stored under 'name' in the command table.

Returned value does not belong to caller.

void CmdAliasFree ( char *  value  ) 

required

optional

required

See also:
optional
CommandDescr_t* CmdCommandCopy ( CommandDescr_t value  ) 

Copies value.

void CmdCommandFree ( char *  value  ) 

required

optional

required

See also:
optional
char* CmdFgetsFilec ( NuSMVEnv_ptr  env,
char *  buf,
unsigned int  size,
FILE *  stream,
char *  prompt 
)

Duplicates the function of fgets, but also provides file completion in the same style as csh.

Input is read from `stream' and returned in `buf'. Up to `size' bytes will be placed into `buf'. If `stream' is not stdin, is equivalent to calling fgets(buf, size, stream).

`prompt' is the prompt you want to appear at the beginning of the line. The caller does not have to print the prompt string before calling this routine. The prompt has to be reprinted if the user hits ^D.

The file completion routines are derived from the source code for csh, which is copyrighted by the Regents of the University of California.

void CmdFreeArgv ( int  argc,
char **  argv 
)

required

optional

required

See also:
optional
char* CmdHistorySubstitution ( NuSMVEnv_ptr  env,
char *  line,
int *  changed 
)

Simple history substitution routine.

Simple history substitution routine. Not, repeat NOT, the complete csh history substitution mechanism.

In the following ^ is the SUBST character and ! is the HIST character. Deals with: !! last command !stuff last command that began with "stuff" !* all but 0'th argument of last command !$ last argument of last command !:n n'th argument of last command !n repeat the n'th command !-n repeat n'th previous command ^old^new replace "old" w/ "new" in previous command

Trailing spaces are significant. Removes all initial spaces.

Returns `line' if no changes were made. Returns pointer to a static buffer if any changes were made. Sets `changed' to 1 if a history substitution took place, o/w set to 0. Returns NULL if error occurred.

void free (  ) 

Internal declarations for command package.

Author:
Adapted to NuSMV by Marco Roveri
Todo:
: Missing description
char* strncpy ( char *  ,
const char *  ,
size_t   
)
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on 14 Oct 2015 for NuSMV Developers Manual by  doxygen 1.6.1