Changeset 541 for trunk

Show
Ignore:
Timestamp:
07/09/08 00:48:39 (5 months ago)
Author:
krobillard
Message:

Fixes for date! on windows.
Fixed c_string.t to handle last line with no newline.

Location:
trunk/thune
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/thune/context.c

    r458 r541  
    147147    AtomRec* end = table + ut->env->atoms.used; 
    148148 
    149     while( it != end ) 
    150     { 
    151         dprint( "%4ld %08x %5d %5d %s\n", it - table, it->hash, 
     149#if __WORDSIZE == 64 
     150#define OFFINT  "%4ld" 
     151#else 
     152#define OFFINT  "%4d" 
     153#endif 
     154 
     155    while( it != end ) 
     156    { 
     157        dprint( OFFINT " %08x %5d %5d %s\n", it - table, it->hash, 
    152158                it->head, it->chain, 
    153159                names + it->nameIndex ); 
     
    158164    while( it != end ) 
    159165    { 
    160         dprint( "%4ld %08x %5d %5d none\n", it - table, it->hash, 
     166        dprint( OFFINT " %08x %5d %5d none\n", it - table, it->hash, 
    161167                it->head, it->chain ); 
    162168        ++it; 
  • trunk/thune/print.c

    r540 r541  
    403403#if defined(_WIN32) 
    404404#if _MSC_VER >= 1400 
    405     _localtime_s( &st, &tt ); 
     405    localtime_s( &st, &tt ); 
    406406#else 
    407407    st = *localtime( &tt ); 
  • trunk/thune/scripts/c_string.t

    r500 r541  
    1818    next dup tail prev remove drop   ; Remove first & last bracket 
    1919    trim.in 
     20        dup eol push 
    2021    ;dup first eol eq? ift next 
    2122    [some[ 
  • trunk/thune/tokenize.c

    r540 r541  
    313313        *pos = it; 
    314314#ifdef _WIN32 
     315#if _MSC_VER >= 1400 
     316    return sec + (double) (utc ? _mkgmtime( &tmp ) : mktime( &tmp )); 
     317#else 
    315318    return sec + (double) mktime( &tmp );   // TODO: Handle utc. 
     319#endif 
    316320#else 
    317321    return sec + (double) (utc ? timegm( &tmp ) : mktime( &tmp ));