Changeset 35597 in project


Ignore:
Timestamp:
06/13/18 11:45:52 (11 days ago)
Author:
evhan
Message:

system-information: Update and tag version 1.0

Location:
release/5
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • release/5/egg-locations

    r35596 r35597  
    2727(stb-image-resize "https://github.com/kristianlm/chicken-stb-image-resize/raw/master/stb-image-resize5.release-info")
    2828(stb-image-write "https://github.com/kristianlm/chicken-stb-image-write/raw/master/stb-image-write5.release-info")
     29(system-information "http://code.call-cc.org/release-info?egg={egg-name};release={chicken-release}")
    2930(vector-lib "http://code.call-cc.org/release-info?egg={egg-name};release={chicken-release}")
  • release/5/system-information/tags/1.0/system-information.egg

    r34250 r35597  
    1 ((synopsis "obtaining system- and host-information")
    2  (author "The CHICKEN Team")
     1((synopsis "Obtaining system and host information")
     2 (version "1.0")
    33 (license "BSD")
    44 (category os)
    5  (components (extension system-information)))
     5 (author "The CHICKEN Team")
     6 (components
     7  (extension system-information
     8   (source-dependencies "unix.scm" "windows.scm"))))
  • release/5/system-information/tags/1.0/system-information.scm

    r34250 r35597  
    22
    33
    4 (module system-information
    5   (system-information get-host-name)
    6   (import scheme chicken (chicken foreign)
    7           (chicken posix))  ; needed for ##sys#posix-error
    8 
     4(module system-information (system-information get-host-name)
     5  (import (scheme) (chicken base) (chicken fixnum) (chicken foreign))
    96  (cond-expand
    107    (unix (include "unix.scm"))
    11     (windows (include "windows.scm"))
    12        
    13 ))
     8    (windows (include "windows.scm"))))
  • release/5/system-information/tags/1.0/unix.scm

    r34250 r35597  
    11;;; system-information - UNIX version
    2 
    32
    43#>
     
    109<#
    1110
    12 
    1311(define get-host-name
    14   (let ([getit
    15         (foreign-lambda* c-string ()
    16            "if(gethostname(C_hostbuf, 256) == -1) C_return(NULL);"
    17            "else C_return(C_hostbuf);") ] )
     12  (let ((getit
     13        (foreign-lambda* c-string ()
     14           "if(gethostname(C_hostbuf, 256) == -1) C_return(NULL);"
     15           "else C_return(C_hostbuf);")))
    1816    (lambda ()
    19       (let ([host (getit)])
     17      (let ((host (getit)))
    2018        (unless host
    2119          (##sys#posix-error #:error 'get-host-name
    22                        "cannot retrieve host-name") )
    23         host) ) ) )
    24 
     20                             "cannot retrieve host-name"))
     21        host))))
    2522
    2623(define-foreign-variable _uname int "C_uname")
     
    3532    (when (fx< _uname 0)
    3633      (##sys#update-errno)
    37       (##sys#error 'system-information "cannot retrieve system information") )
     34      (##sys#error 'system-information "cannot retrieve system information"))
    3835    (list _uname-sysname
    3936          _uname-nodename
    4037          _uname-release
    4138          _uname-version
    42           _uname-machine) ) )
    43 
     39          _uname-machine)))
  • release/5/system-information/tags/1.0/windows.scm

    r34250 r35597  
    11;;; system-information - Windows version
    22
     3#>
    34
    4 #>
    55/* Windows NT or better */
    66static int C_isNT = 0;
     
    1111static C_TLS char C_osrel[16] = "";
    1212static C_TLS char C_processor[16] = "";
    13 
    1413
    1514static int C_fcall
     
    3332    }
    3433}
    35 
    3634
    3735#define C_get_hostname()   \
     
    126124  (lambda ()
    127125    (if (##core#inline "C_sysinfo")
    128       (list "windows" _hostname _osrel _osver _processor)
    129       (begin
    130         (##sys#update-errno)
    131         (##sys#error 'system-information "cannot retrieve system-information") ) ) ) )
     126        (list "windows" _hostname _osrel _osver _processor)
     127        (begin
     128          (##sys#update-errno)
     129          (##sys#error 'system-information "cannot retrieve system-information")))))
    132130
    133131(define get-host-name
    134132  (lambda ()
    135133    (if (##core#inline "C_get_hostname")
    136       _hostname
    137       (##sys#error 'get-host-name "cannot retrieve host-name") ) ) )
     134        _hostname
     135        (##sys#error 'get-host-name "cannot retrieve host-name"))))
  • release/5/system-information/trunk/system-information.egg

    r34250 r35597  
    1 ((synopsis "obtaining system- and host-information")
    2  (author "The CHICKEN Team")
     1((synopsis "Obtaining system and host information")
     2 (version "1.0")
    33 (license "BSD")
    44 (category os)
    5  (components (extension system-information)))
     5 (author "The CHICKEN Team")
     6 (components
     7  (extension system-information
     8   (source-dependencies "unix.scm" "windows.scm"))))
  • release/5/system-information/trunk/system-information.scm

    r34250 r35597  
    22
    33
    4 (module system-information
    5   (system-information get-host-name)
    6   (import scheme chicken (chicken foreign)
    7           (chicken posix))  ; needed for ##sys#posix-error
    8 
     4(module system-information (system-information get-host-name)
     5  (import (scheme) (chicken base) (chicken fixnum) (chicken foreign))
    96  (cond-expand
    107    (unix (include "unix.scm"))
    11     (windows (include "windows.scm"))
    12        
    13 ))
     8    (windows (include "windows.scm"))))
  • release/5/system-information/trunk/unix.scm

    r34250 r35597  
    11;;; system-information - UNIX version
    2 
    32
    43#>
     
    109<#
    1110
    12 
    1311(define get-host-name
    14   (let ([getit
    15         (foreign-lambda* c-string ()
    16            "if(gethostname(C_hostbuf, 256) == -1) C_return(NULL);"
    17            "else C_return(C_hostbuf);") ] )
     12  (let ((getit
     13        (foreign-lambda* c-string ()
     14           "if(gethostname(C_hostbuf, 256) == -1) C_return(NULL);"
     15           "else C_return(C_hostbuf);")))
    1816    (lambda ()
    19       (let ([host (getit)])
     17      (let ((host (getit)))
    2018        (unless host
    2119          (##sys#posix-error #:error 'get-host-name
    22                        "cannot retrieve host-name") )
    23         host) ) ) )
    24 
     20                             "cannot retrieve host-name"))
     21        host))))
    2522
    2623(define-foreign-variable _uname int "C_uname")
     
    3532    (when (fx< _uname 0)
    3633      (##sys#update-errno)
    37       (##sys#error 'system-information "cannot retrieve system information") )
     34      (##sys#error 'system-information "cannot retrieve system information"))
    3835    (list _uname-sysname
    3936          _uname-nodename
    4037          _uname-release
    4138          _uname-version
    42           _uname-machine) ) )
    43 
     39          _uname-machine)))
  • release/5/system-information/trunk/windows.scm

    r34250 r35597  
    11;;; system-information - Windows version
    22
     3#>
    34
    4 #>
    55/* Windows NT or better */
    66static int C_isNT = 0;
     
    1111static C_TLS char C_osrel[16] = "";
    1212static C_TLS char C_processor[16] = "";
    13 
    1413
    1514static int C_fcall
     
    3332    }
    3433}
    35 
    3634
    3735#define C_get_hostname()   \
     
    126124  (lambda ()
    127125    (if (##core#inline "C_sysinfo")
    128       (list "windows" _hostname _osrel _osver _processor)
    129       (begin
    130         (##sys#update-errno)
    131         (##sys#error 'system-information "cannot retrieve system-information") ) ) ) )
     126        (list "windows" _hostname _osrel _osver _processor)
     127        (begin
     128          (##sys#update-errno)
     129          (##sys#error 'system-information "cannot retrieve system-information")))))
    132130
    133131(define get-host-name
    134132  (lambda ()
    135133    (if (##core#inline "C_get_hostname")
    136       _hostname
    137       (##sys#error 'get-host-name "cannot retrieve host-name") ) ) )
     134        _hostname
     135        (##sys#error 'get-host-name "cannot retrieve host-name"))))
Note: See TracChangeset for help on using the changeset viewer.