Changeset 149 for trunk/src/sh_unix.c


Ignore:
Timestamp:
Jan 7, 2008, 8:52:13 PM (17 years ago)
Author:
katerina
Message:

Make sh_hash.c thread-safe, remove plenty of tiny allocations, improve sh_mem_dump, modify port check to run as thread, and fix unsetting of sh_thread_pause_flag (was too early).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_unix.c

    r143 r149  
    28812881int sh_unix_get_ftype(char * fullpath)
    28822882{
    2883   char        c_mode[16];
     2883  char        c_mode[CMODE_SIZE];
    28842884  struct stat buf;
    28852885  ShFileType  type;
     
    34493449  /* --- Determine file type. ---
    34503450   */
    3451   memset (theFile->c_mode, '-', 10);
    3452   theFile->c_mode[10] = '\0';
    3453 
    3454   memset (theFile->link_c_mode, '-', 10);
    3455   theFile->link_c_mode[10] = '\0';
     3451  memset (theFile->c_mode, '-', CMODE_SIZE-1);
     3452  theFile->c_mode[CMODE_SIZE-1] = '\0';
     3453
     3454  memset (theFile->link_c_mode, '-', CMODE_SIZE-1);
     3455  theFile->link_c_mode[CMODE_SIZE-1] = '\0';
    34563456
    34573457  sh_unix_getinfo_type (&buf, &type, theFile->c_mode);
     
    34623462  /* --- Determine file attributes. ---
    34633463   */
    3464   memset (theFile->c_attributes, '-', 12);
    3465   theFile->c_attributes[12] = '\0';
     3464  memset (theFile->c_attributes, '-', ATTRBUF_SIZE);
     3465  theFile->c_attributes[ATTRBUF_USED] = '\0';
    34663466  theFile->attributes      =    0;
    34673467
Note: See TracChangeset for help on using the changeset viewer.