Annotation of rpl/src/librpl.c, revision 1.2

1.1       bertrand    1: /*
                      2: ================================================================================
1.2     ! bertrand    3:   RPL/2 (R) version 4.0.10
1.1       bertrand    4:   Copyright (C) 1989-2010 Dr. BERTRAND Joël
                      5: 
                      6:   This file is part of RPL/2.
                      7: 
                      8:   RPL/2 is free software; you can redistribute it and/or modify it
                      9:   under the terms of the CeCILL V2 License as published by the french
                     10:   CEA, CNRS and INRIA.
                     11:  
                     12:   RPL/2 is distributed in the hope that it will be useful, but WITHOUT
                     13:   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
                     14:   FITNESS FOR A PARTICULAR PURPOSE.  See the CeCILL V2 License
                     15:   for more details.
                     16:  
                     17:   You should have received a copy of the CeCILL License
                     18:   along with RPL/2. If not, write to info@cecill.info.
                     19: ================================================================================
                     20: */
                     21: 
                     22: 
                     23: #include "rpl.conv.h"
                     24: 
                     25: unsigned char **
                     26: rpl(unsigned char *script)
                     27: {
                     28:    char                        *argv[3];
                     29: 
                     30:    int                         argc;
                     31:    int                         succes;
                     32: 
                     33:    unsigned char               **resultats;
                     34: 
                     35:    argc = 3;
                     36: 
                     37:    argv[0] = "rpl";
                     38:    argv[1] = "-csS";
                     39: 
                     40:    argv[2] = script;
                     41: 
                     42:    if ((resultats = malloc(sizeof(unsigned char **))) == NULL)
                     43:    {
                     44:        return(NULL);
                     45:    }
                     46: 
                     47:    succes = rplinit(argc, argv, &resultats);
                     48: 
                     49:    if (succes != EXIT_SUCCESS)
                     50:    {
                     51:        return(NULL);
                     52:    }
                     53: 
                     54:    /*
                     55:     * Formattage des valeurs renvoyées
                     56:     */
                     57: 
                     58:    return(resultats);
                     59: }
                     60: 
                     61: // vim: ts=4

CVSweb interface <joel.bertrand@systella.fr>