Changeset 76388e in git


Ignore:
Timestamp:
May 19, 2011, 11:39:26 AM (12 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a657104b677b4c461d018cbf3204d72d34ad66a9')
Children:
8d1a1ab92a3fa4bf30daf110a860313ccf3ef58c
Parents:
9737a6f42bcd9b46097b69c99ba79ee2490e3131
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-05-19 11:39:26+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 12:36:11+01:00
Message:
ADD: improving resource handling (searching files...)
Location:
libpolys/resources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libpolys/resources/feFopen.cc

    r9737a6 r76388e  
    2424
    2525FILE * feFopen(const char *path, const char *mode, char *where,
    26                int useWerror, int path_only)
     26               BOOLEAN useWerror, BOOLEAN path_only)
    2727{
    2828  char longpath[MAXPATHLEN];
     
    8080    char *s;
    8181
    82     if (where==NULL) s=(char *)omAlloc(250);
     82    if (where==NULL) s=(char *)omAlloc(250 * sizeof(char));
    8383    else             s=where;
    8484
     
    122122}
    123123
    124 #ifdef ix86_Win
    125124// Make sure that mode contains binary option
    126125FILE* myfopen(const char *path, const char *mode)
    127126{
     127#if (defined(CYGWIN) || defined(ix86_Win))
    128128  char mmode[4];
    129129  int i;
     
    145145  }
    146146  return fopen(path, mmode);
     147#else
     148  return fopen(path, mode);
     149#endif
    147150}
    148 #endif
    149151// replace "\r\n" by " \n" and "\r" by "\n"
    150152
  • libpolys/resources/feFopen.h

    r9737a6 r76388e  
    11#ifndef FEFOPEN_H
    22#define FEFOPEN_H
     3
     4#include <misc/auxiliary.h>
     5
    36/*****************************************************************
    47 *
     
    69 *
    710 *****************************************************************/
    8 FILE *  feFopen(const char *path, const char *mode, char *where=NULL,
    9                 int useWerror=FALSE, int path_only=FALSE);
     11FILE*feFopen(const char *path, const char *mode, char *where=NULL, BOOLEAN useWerror=FALSE, BOOLEAN path_only=FALSE);
    1012
    1113/*
     
    1719// do never use fopen and fread
    1820*/
    19 #if (defined(CYGWIN) || defined(ix86_Win))
    2021
    2122FILE *myfopen(const char *path, const char *mode);
    22 
    23 #else
    24 
    25 #define myfopen fopen
    26 
    27 #endif
    2823
    2924size_t myfread(void *ptr, size_t size, size_t nmemb, FILE *stream);
Note: See TracChangeset for help on using the changeset viewer.