Ignore:
Timestamp:
08/31/09 23:29:19 (11 years ago)
Author:
Kon Lovett
Message:

Parse errors are now failures. Added type checking for components. Made posix tz name be almost anything.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/locale/trunk/locale-current.scm

    r15643 r15682  
    7676;;;
    7777
    78 ;; Use posix locale system, for now
     78;; Use Posix locale system
    7979
    80 (posix-load-timezone)
    81 (posix-load-locale)
    82 (gnu-load-locale)
     80(unless (current-timezone) (posix-load-timezone))
     81(unless (current-locale) (posix-load-locale))
     82(unless (locale-category-ref 'language) (gnu-load-locale))
    8383
    84 ;; Need the current-timezone-components, and unless we
    85 ;; have a current-timezone need to fake one from system
    86 ;; time info.
     84;; Use Builtin (fake) locale system
    8785
    8886(unless (current-timezone) (use-builtin-timezone))
     
    9088(unless (locale-category-ref 'language) (use-builtin-language))
    9189
    92 ;; Chicken platform
     90;; Chicken platform extensions
    9391
    94 (unless (current-timezone-components) (error 'locale "cannot determine any timezone"))
    95 (set-timezone-component! (current-timezone-components) 'dst? (%current-dstflag))
     92(when (current-timezone-components)
     93  (set-timezone-component! (current-timezone-components) 'dst? (%current-dstflag)) )
     94
     95;; We really should have something by now
     96
     97(unless (current-timezone-components) (warning "cannot determine a timezone") )
     98(unless (current-locale-components) (warning "cannot determine a locale") )
    9699
    97100) ;module locale
Note: See TracChangeset for help on using the changeset viewer.