pike.git / src / modules / _Stdio / efuns.c

version» Context lines:

pike.git/src/modules/_Stdio/efuns.c:612: Inside #if defined(__NT__)
   {    pop_n_elems(args);    push_int( 0 );    return;    }       free_sectors = sectors_per_cluster * free_clusters;    total_sectors = sectors_per_cluster * total_clusters;       pop_n_elems( args ); -  push_text("blocksize"); +  push_static_text("blocksize");    push_int(bytes_per_sector); -  push_text("blocks"); +  push_static_text("blocks");    push_int(total_sectors); -  push_text("bfree"); +  push_static_text("bfree");    push_int(free_sectors); -  push_text("bavail"); +  push_static_text("bavail");    push_int(free_sectors);    f_aggregate_mapping( 8 );   }      #else /* !__NT__ */      #if !defined(HAVE_STRUCT_STATFS) && !defined(HAVE_STRUCT_FS_DATA)   #undef HAVE_STATFS   #endif   
pike.git/src/modules/_Stdio/efuns.c:732:   #endif /* HAVE_STATVFS */    THREADS_DISALLOW();    pop_n_elems(args);    if(i==-1)    {    push_int(0);    }else{    int num_fields = 0;   #ifdef HAVE_STATVFS   #if 0 -  push_text("id"); push_int(st.f_fsid); +  push_static_text("id"); push_int(st.f_fsid);    num_fields++;   #endif -  push_text("blocksize"); push_int(st.f_frsize); -  push_text("blocks"); push_int(st.f_blocks); -  push_text("bfree"); push_int(st.f_bfree); -  push_text("bavail"); push_int(st.f_bavail); -  push_text("files"); push_int(st.f_files); -  push_text("ffree"); push_int(st.f_ffree); -  push_text("favail"); push_int(st.f_favail); +  push_static_text("blocksize"); push_int(st.f_frsize); +  push_static_text("blocks"); push_int(st.f_blocks); +  push_static_text("bfree"); push_int(st.f_bfree); +  push_static_text("bavail"); push_int(st.f_bavail); +  push_static_text("files"); push_int(st.f_files); +  push_static_text("ffree"); push_int(st.f_ffree); +  push_static_text("favail"); push_int(st.f_favail);    num_fields += 7;   #ifdef HAVE_STATVFS_F_FSTR -  push_text("fsname"); push_text(st.f_fstr); +  push_static_text("fsname"); push_text(st.f_fstr);    num_fields++;   #endif /* HAVE_STATVFS_F_FSTR */   #ifdef HAVE_STATVFS_F_BASETYPE -  push_text("fstype"); push_text(st.f_basetype); +  push_static_text("fstype"); push_text(st.f_basetype);    num_fields++;   #endif /* HAVE_STATVFS_F_BASETYPE */   #else /* !HAVE_STATVFS */   #ifdef HAVE_STATFS   #ifdef HAVE_STRUCT_STATFS   #if 0 && HAVE_STATFS_F_FSID -  push_text("id"); push_int(st.f_fsid); +  push_static_text("id"); push_int(st.f_fsid);    num_fields++;   #endif -  push_text("blocksize"); push_int(st.f_bsize); -  push_text("blocks"); push_int(st.f_blocks); -  push_text("bfree"); push_int(st.f_bfree); -  push_text("files"); push_int(st.f_files); -  push_text("ffree"); push_int(st.f_ffree); -  push_text("favail"); push_int(st.f_ffree); +  push_static_text("blocksize"); push_int(st.f_bsize); +  push_static_text("blocks"); push_int(st.f_blocks); +  push_static_text("bfree"); push_int(st.f_bfree); +  push_static_text("files"); push_int(st.f_files); +  push_static_text("ffree"); push_int(st.f_ffree); +  push_static_text("favail"); push_int(st.f_ffree);    num_fields += 6;   #ifdef HAVE_STATFS_F_BAVAIL -  push_text("bavail"); push_int(st.f_bavail); +  push_static_text("bavail"); push_int(st.f_bavail);    num_fields++;   #endif /* HAVE_STATFS_F_BAVAIL */   #else /* !HAVE_STRUCT_STATFS */   #ifdef HAVE_STRUCT_FS_DATA    /* ULTRIX */ -  push_text("blocksize"); push_int(st.fd_bsize); -  push_text("blocks"); push_int(st.fd_btot); -  push_text("bfree"); push_int(st.fd_bfree); -  push_text("bavail"); push_int(st.fd_bfreen); +  push_static_text("blocksize"); push_int(st.fd_bsize); +  push_static_text("blocks"); push_int(st.fd_btot); +  push_static_text("bfree"); push_int(st.fd_bfree); +  push_static_text("bavail"); push_int(st.fd_bfreen);    num_fields += 4;   #else /* !HAVE_STRUCT_FS_DATA */    /* Should not be reached */   #error No struct to hold statfs() data.   #endif /* HAVE_STRUCT_FS_DATA */   #endif /* HAVE_STRUCT_STATFS */   #else /* !HAVE_STATFS */   #ifdef HAVE_USTAT -  push_text("bfree"); push_int(st.f_tfree); -  push_text("ffree"); push_int(st.f_tinode); -  push_text("fsname"); push_text(st.f_fname); +  push_static_text("bfree"); push_int(st.f_tfree); +  push_static_text("ffree"); push_int(st.f_tinode); +  push_static_text("fsname"); push_text(st.f_fname);    num_fields += 3;   #else    /* Should not be reached */   #error No stat function for filesystems.   #endif /* HAVE_USTAT */   #endif /* HAVE_STATFS */   #endif /* HAVE_STATVFS */    f_aggregate_mapping(num_fields*2);    }   }
pike.git/src/modules/_Stdio/efuns.c:1053: Inside #if defined(__NT__)
  void f_get_dir(INT32 args)   {    HANDLE dir;    WIN32_FIND_DATAW d;    struct string_builder sb;    struct pike_string *str=0;       get_all_args("get_dir",args,".%T",&str);       if(!str) { -  push_text("."); +  push_static_text(".");    str = Pike_sp[-1].u.string;    args++;    }       if (str->size_shift == 2) {    /* Filenames that are too wide are not supported. */    errno = ENOENT;    pop_n_elems(args);    push_int(0);    return;
pike.git/src/modules/_Stdio/efuns.c:1338:    DIR *dir = NULL;    ptrdiff_t name_max = -1;    struct pike_string *str=0;       get_all_args("get_dir",args,".%N",&str);       if(!str) {   #if defined(__amigaos4__)    push_empty_string();   #else -  push_text("."); +  push_static_text(".");   #endif    str = Pike_sp[-1].u.string;    args++;    }       if (string_has_null(str)) {    /* Filenames with NUL are not supported. */    errno = ENOENT;    pop_n_elems(args);    push_int(0);
pike.git/src/modules/_Stdio/efuns.c:1558: Inside #if defined(HAVE_EXECVE)
   struct keypair *k;       env=calloc(1+m_sizeof(en), sizeof(char *));    if(!env) {    free(argv);    SIMPLE_OUT_OF_MEMORY_ERROR("exece", (1+m_sizeof(en)*sizeof(char *)));    }       NEW_MAPPING_LOOP(en->data) {    ref_push_string(k->ind.u.string); -  push_text("="); +  push_static_text("=");    ref_push_string(k->val.u.string);    f_add(3);    env[i++]=sp[-1].u.string->str;    dmalloc_touch_svalue(sp-1);    }       env[i]=0;    }else{    env=environ;    }
pike.git/src/modules/_Stdio/efuns.c:1851: Inside #if defined(HAVE_STRERROR)
   else {   #ifdef HAVE_STRERROR    s=strerror(err);   #else    s=0;   #endif    }    if(s)    push_text(s);    else { -  push_text("Error "); +  push_static_text("Error ");    push_int(err);    f_add(2);    }   }      /*! @decl int errno()    *!    *! This function returns the system error from the last file operation.    *!    *! @note