version 1.24, 2011/06/21 15:26:35
|
version 1.51, 2014/04/25 07:37:34
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.0.prerelease.2 |
RPL/2 (R) version 4.1.18 |
Copyright (C) 1989-2011 Dr. BERTRAND Joël |
Copyright (C) 1989-2014 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
|
|
Line 23
|
Line 23
|
#include "rpl-conv.h" |
#include "rpl-conv.h" |
|
|
unsigned char ** |
unsigned char ** |
rpl(unsigned char *script, unsigned char *rpl_home) |
rpl(unsigned char *script, unsigned char *parametres, unsigned char *rpl_home) |
{ |
{ |
char *argv[3]; |
char *argv[5]; |
|
|
int argc; |
int argc; |
int succes; |
int succes; |
|
|
unsigned char **resultats; |
unsigned char **resultats; |
|
|
argc = 3; |
if (parametres == NULL) |
|
{ |
|
argc = 3; |
|
|
|
argv[0] = "rpl"; |
|
argv[1] = "-psS"; |
|
|
argv[0] = "rpl"; |
argv[2] = script; |
argv[1] = "-psS"; |
} |
|
else |
|
{ |
|
argc = 5; |
|
|
argv[2] = script; |
argv[0] = "rpl"; |
|
argv[1] = "-psS"; |
|
|
|
argv[2] = script; |
|
|
|
argv[3] = "-A"; |
|
argv[4] = parametres; |
|
} |
|
|
if ((resultats = malloc(sizeof(unsigned char **))) == NULL) |
if ((resultats = malloc(sizeof(unsigned char **))) == NULL) |
{ |
{ |
Line 49 rpl(unsigned char *script, unsigned char
|
Line 64 rpl(unsigned char *script, unsigned char
|
rpl_home = getenv("RPL_HOME"); |
rpl_home = getenv("RPL_HOME"); |
} |
} |
|
|
succes = rplinit(argc, argv, &resultats, rpl_home); |
succes = rplinit(argc, argv, NULL, &resultats, rpl_home); |
|
|
if (succes != EXIT_SUCCESS) |
if (succes != EXIT_SUCCESS) |
{ |
{ |