ooRexx  4.2.0-source
About: ooRexx (Open Object Rexx) is a free implementation of Object Rexx. Object Rexx is an enhancement of the classic Rexx interpreter; a full-featured programming language with a human-oriented syntax.
  Fossies Dox: ooRexx-4.2.0-source.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

SystemCommands.cpp File Reference
#include <string.h>
#include <sys/wait.h>
#include <stdlib.h>
#include <unistd.h>
#include "RexxCore.h"
#include "StringClass.hpp"
#include "RexxActivity.hpp"
#include "ActivityManager.hpp"
#include "SystemInterpreter.hpp"
#include "InterpreterInstance.hpp"
#include "SysInterpreterInstance.hpp"
#include "RexxInternalApis.h"
#include <sys/types.h>
#include <pwd.h>
#include <limits.h>
Include dependency graph for SystemCommands.cpp:

Go to the source code of this file.


#define CMDBUFSIZE   1024 /* Max size of executable cmd */
#define MAX_COMMAND_ARGS   400
#define CMDDEFNAME   "/bin/bash" /* Bourne Again Shell is default */
#define UNKNOWN_COMMAND   127 /* unknown command return code */
#define SYSENV   "command" /* Default cmd environment */
#define SHELL   "SHELL" /* UNIX cmd handler env. var. name*/
#define EXPORT_FLAG   1
#define SET_FLAG   2
#define UNSET_FLAG   3
#define MAX_VALUE   1280


bool sys_process_export (RexxExitContext *context, const char *cmd, RexxObjectPtr &rc, int flag)
char * unquote (const char *s)
bool sys_process_cd (RexxExitContext *context, const char *cmd, RexxObjectPtr rc)
bool scan_cmd (const char *parm_cmd, char **argPtr)
RexxObjectPtr RexxEntry systemCommandHandler (RexxExitContext *context, RexxStringObject address, RexxStringObject command)


int putflag

Macro Definition Documentation


#define CMDBUFSIZE   1024 /* Max size of executable cmd */

Definition at line 73 of file SystemCommands.cpp.


#define CMDDEFNAME   "/bin/bash" /* Bourne Again Shell is default */

Definition at line 81 of file SystemCommands.cpp.


#define EXPORT_FLAG   1

Definition at line 88 of file SystemCommands.cpp.


#define MAX_COMMAND_ARGS   400

Definition at line 74 of file SystemCommands.cpp.


#define MAX_VALUE   1280

Definition at line 91 of file SystemCommands.cpp.


#define SET_FLAG   2

Definition at line 89 of file SystemCommands.cpp.


#define SHELL   "SHELL" /* UNIX cmd handler env. var. name*/

Definition at line 87 of file SystemCommands.cpp.


#define SYSENV   "command" /* Default cmd environment */

Definition at line 86 of file SystemCommands.cpp.


#define UNKNOWN_COMMAND   127 /* unknown command return code */

Definition at line 84 of file SystemCommands.cpp.


#define UNSET_FLAG   3

Definition at line 90 of file SystemCommands.cpp.

Function Documentation

◆ scan_cmd()

bool scan_cmd ( const char *  parm_cmd,
char **  argPtr 

Definition at line 533 of file SystemCommands.cpp.


Referenced by systemCommandHandler().

◆ sys_process_cd()

bool sys_process_cd ( RexxExitContext context,
const char *  cmd,
RexxObjectPtr  rc 

Definition at line 400 of file SystemCommands.cpp.

References unquote().

Referenced by systemCommandHandler().

◆ sys_process_export()

bool sys_process_export ( RexxExitContext context,
const char *  cmd,
RexxObjectPtr rc,
int  flag 

Definition at line 107 of file SystemCommands.cpp.

References EXPORT_FLAG, getEnvironment(), MAX_VALUE, putflag, SET_FLAG, and UNSET_FLAG.

Referenced by systemCommandHandler().

◆ systemCommandHandler()

◆ unquote()

char* unquote ( const char *  s)

Definition at line 361 of file SystemCommands.cpp.

Referenced by sys_process_cd().

Variable Documentation

◆ putflag

int putflag

Definition at line 116 of file ExternalFunctions.cpp.

Referenced by sys_process_export().