Diff for /rpl/src/librpl.c between versions 1.6 and 1.74

version 1.6, 2010/03/09 10:18:49 version 1.74, 2024/01/09 07:33:55
Line 1 Line 1
 /*  /*
 ================================================================================  ================================================================================
   RPL/2 (R) version 4.0.13    RPL/2 (R) version 4.1.35
   Copyright (C) 1989-2010 Dr. BERTRAND Joël    Copyright (C) 1989-2024 Dr. BERTRAND Joël
   
   This file is part of RPL/2.    This file is part of RPL/2.
   
Line 20 Line 20
 */  */
   
   
 #include "rpl.conv.h"  #include "rpl-conv.h"
   
 unsigned char **  unsigned char **
 rpl(unsigned char *script)  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[2] = script;
       }
       else
       {
           argc = 5;
   
     argv[0] = "rpl";          argv[0] = "rpl";
     argv[1] = "-cpsS";          argv[1] = "-psS";
   
     argv[2] = script;          argv[2] = script;
   
     if ((resultats = malloc(sizeof(unsigned char **))) == NULL)          argv[3] = "-A";
           argv[4] = parametres;
       }
   
       if ((resultats = sys_malloc(sizeof(unsigned char **))) == NULL)
     {      {
         return(NULL);          return(NULL);
     }      }
   
     succes = rplinit(argc, argv, &resultats, getenv("RPL_HOME"));      if (rpl_home == NULL)
       {
           rpl_home = getenv("RPL_HOME");
       }
   
       succes = rplinit(argc, argv, NULL, &resultats, rpl_home);
   
     if (succes != EXIT_SUCCESS)      if (succes != EXIT_SUCCESS)
     {      {

Removed from v.1.6  
changed lines
  Added in v.1.74


CVSweb interface <joel.bertrand@systella.fr>