[BACK]Return to glob.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / parse

Diff for /OpenXM_contrib2/asir2000/parse/glob.c between version 1.78 and 1.80

version 1.78, 2010/08/01 08:44:15 version 1.80, 2011/06/16 08:17:15
Line 45 
Line 45 
  * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,   * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,
  * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.   * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.
  *   *
  * $OpenXM: OpenXM_contrib2/asir2000/parse/glob.c,v 1.77 2010/05/26 06:32:49 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2000/parse/glob.c,v 1.79 2010/08/03 04:34:44 noro Exp $
 */  */
 #include "ca.h"  #include "ca.h"
 #include "al.h"  #include "al.h"
Line 167  void glob_init() {
Line 167  void glob_init() {
         reallocarray((char **)&APVS->va,(int *)&APVS->asize,(int *)&APVS->n,(int)sizeof(struct oPV));          reallocarray((char **)&APVS->va,(int *)&APVS->asize,(int *)&APVS->n,(int)sizeof(struct oPV));
         reallocarray((char **)&PPVS->va,(int *)&PPVS->asize,(int *)&PPVS->n,(int)sizeof(struct oPV));          reallocarray((char **)&PPVS->va,(int *)&PPVS->asize,(int *)&PPVS->n,(int)sizeof(struct oPV));
         CPVS = GPVS;          CPVS = GPVS;
         MKNODE(ONENODE,mkfnode(1,I_FORMULA,ONE),0);          MKNODE(ONENODE,mkfnode(1,I_FORMULA,ONE),NULLP);
         OID(F_TRUE)=O_F; FOP(F_TRUE)=AL_TRUE; F_TRUE->arg.dummy = 0;          OID(F_TRUE)=O_F; FOP(F_TRUE)=AL_TRUE; F_TRUE->arg.dummy = 0;
         OID(F_FALSE)=O_F; FOP(F_FALSE)=AL_FALSE; F_FALSE->arg.dummy = 0;          OID(F_FALSE)=O_F; FOP(F_FALSE)=AL_FALSE; F_FALSE->arg.dummy = 0;
         OID(Symbol_grlex) = O_SYMBOL; Symbol_grlex->name = "@grlex";          OID(Symbol_grlex) = O_SYMBOL; Symbol_grlex->name = "@grlex";
Line 318  static int which(char *prog, char *path, char *buf, si
Line 318  static int which(char *prog, char *path, char *buf, si
 void cppname_init()  void cppname_init()
 {  {
 #if !defined(VISUAL)  #if !defined(VISUAL)
     char oxcpp[BUFSIZ];          char *oxhome;
     if(which("ox_cpp", getenv("PATH"), oxcpp, BUFSIZ) && access(oxcpp, X_OK&R_OK) == 0) {          char oxcpp[BUFSIZ];
         strncpy(cppname,oxcpp,BUFSIZ-1);  #define OXCPP "/bin/ox_cpp"
     }else if (access(cppname, X_OK&R_OK) != 0) {  
           if ( oxhome = getenv("OpenXM_HOME") ) {
                   if ( strlen(oxhome)+strlen(OXCPP)<BUFSIZ ) {
                           sprintf(oxcpp,"%s%s",oxhome,OXCPP);
                           if ( access(oxcpp,X_OK&R_OK) == 0 ) {
                           strcpy(cppname,oxcpp);
                                   return;
                           }
                   }
           }
       if (access(cppname, X_OK&R_OK) != 0) {
         which("cpp", "/lib:/usr/ccs/lib:/usr/bin", cppname, BUFSIZ) ||          which("cpp", "/lib:/usr/ccs/lib:/usr/bin", cppname, BUFSIZ) ||
         which("cpp", getenv("PATH"), cppname, BUFSIZ);          which("cpp", getenv("PATH"), cppname, BUFSIZ);
     }      }

Legend:
Removed from v.1.78  
changed lines
  Added in v.1.80

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>