Example #1
0
String *
Swig_include(const String_or_char *name) {
    FILE         *f;
    String    *str;

    f = Swig_open(name);
    if (!f) return 0;
    str = Swig_read_file(f);
    fclose(f);
    Seek(str,0,SEEK_SET);
    Setfile(str,lastpath);
    Setline(str,1);
    return str;
}
Example #2
0
static String *Swig_include_any(const_String_or_char_ptr name, int sysfile) {
  FILE *f;
  String *str;
  String *file;

  f = Swig_open_file(name, sysfile, 1);
  if (!f)
    return 0;
  str = Swig_read_file(f);
  fclose(f);
  Seek(str, 0, SEEK_SET);
  file = Copy(Swig_last_file());
  Setfile(str, file);
  Delete(file);
  Setline(str, 1);
  return str;
}