Changeset 647 for trunk/libs


Ignore:
Timestamp:
Oct 22, 2019, 1:48:51 PM (5 years ago)
Author:
alain
Message:

...miscelaneous...

Location:
trunk/libs
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/libs/libalmosmkh/almosmkh.c

    r643 r647  
    14561456/////////////////////////////////////////////////////////////////////////////////////////
    14571457
    1458 /////////////////////////////////
    1459 int fbf_get_config( int * width,
    1460                     int * height,
    1461                     int * type )
     1458/////////////////////////////////////////
     1459int fbf_get_config( unsigned int * width,
     1460                    unsigned int * height,
     1461                    unsigned int * type )
    14621462{
    14631463    return hal_user_syscall( SYS_FBF,
     
    14681468}
    14691469
    1470 ////////////////////////////
    1471 int fbf_read( void * buffer,
    1472               int    length,
    1473               int    offset )
     1470////////////////////////////////////
     1471int fbf_read( void         * buffer,
     1472              unsigned int   length,
     1473              unsigned int   offset )
    14741474{
    14751475    return hal_user_syscall( SYS_FBF,
     
    14801480}
    14811481
    1482 ////////////////////////////
    1483 int fbf_write( void * buffer,
    1484                int    length,
    1485                int    offset )
     1482/////////////////////////////////////
     1483int fbf_write( void         * buffer,
     1484               unsigned int   length,
     1485               unsigned int   offset )
    14861486{
    14871487    return hal_user_syscall( SYS_FBF,
  • trunk/libs/libalmosmkh/almosmkh.h

    r643 r647  
    538538 * @ returns 0 if success / returns -1 if error.
    539539 ****************************************************************************************/
    540 int fbf_get_config( int * width,
    541                     int * height,
    542                     int * type );
     540int fbf_get_config( unsigned int * width,
     541                    unsigned int * height,
     542                    unsigned int * type );
    543543
    544544/*****************************************************************************************
     
    551551 * @ returns 0 if success / returns -1 if error.
    552552 ****************************************************************************************/
    553 int fbf_read( void * buffer,
    554               int    length,
    555               int    offset );
     553int fbf_read( void         * buffer,
     554              unsigned int   length,
     555              unsigned int   offset );
    556556
    557557/*****************************************************************************************
     
    564564 * @ returns 0 if success / returns -1 if error.
    565565 ****************************************************************************************/
    566 int fbf_write( void * buffer,
    567                int    length,
    568                int    offset );
     566int fbf_write( void         * buffer,
     567               unsigned int   length,
     568               unsigned int   offset );
    569569
    570570#endif /* _LIBALMOSMKH_H_ */
  • trunk/libs/libpthread/pthread.h

    r640 r647  
    3232
    3333/*********************************************************************************************
    34  * This function creates a new user thread. The <user_attr> argument is a pointer
     34 * This function creates a new user thread. The <attr> argument is a pointer
    3535 * on a structure containing the thread attributes, defined in the shared_pthread.h file.
     36 * The thread entry point is defined by the <start_func> and <start_args> arguments.
    3637 *********************************************************************************************
    3738 * @ trdid       : [out] buffer for created thread identifier in process.
  • trunk/libs/mini-libc/stdio.c

    r643 r647  
    412412
    413413    // compute nbytes
    414     unsigned int nbytes = size * nitems;
     414    int nbytes = size * nitems;
    415415
    416416    if( hal_user_syscall( SYS_READ,
     
    435435
    436436    // compute nbytes
    437     unsigned int nbytes = size * nitems;
     437    int nbytes = size * nitems;
    438438
    439439    if( hal_user_syscall( SYS_WRITE,
     
    444444
    445445}  // end fwrite()
     446
     447//////////////////////////////////////////
     448unsigned int fseek( FILE         * stream,
     449                    unsigned int   offset,
     450                    int            whence )
     451{
     452    // check stream valid
     453    if( stream->key != VALID_OPEN_FILE ) return -1;
     454
     455    // get file descriptor from stream pointer
     456    int fd = stream->fd;
     457
     458    return( hal_user_syscall( SYS_LSEEK,
     459                              (reg_t)fd,
     460                              (reg_t)offset,
     461                              (reg_t)whence, 0 ) );
     462}  // end fseek()
    446463
    447464/////////////////////////////////
  • trunk/libs/mini-libc/stdio.h

    r643 r647  
    146146 * It can be a regular file or a character oriented input device.
    147147 *********************************************************************************************
     148 * @ buffer    : pointer on user buffer.
     149 * @ size      : item size in bytes.
     150 * @ nitems    : number of items.
    148151 * @ stream    : pointer on a stream.
    149  * @ format    : formated string.
    150152 * @ returns actual number of items read if success / returns 0 if failure.
    151153 ********************************************************************************************/
     
    160162 * It can be a  regular file or a character oriented input device.
    161163 *********************************************************************************************
     164 * @ buffer    : pointer on user buffer.
     165 * @ size      : item size in bytes.
     166 * @ nitems    : number of items.
    162167 * @ stream    : pointer on a stream.
    163  * @ format    : formated string.
    164168 * @ returns actual number of written items if success / returns 0 if failure.
    165169 ********************************************************************************************/
     
    169173                     FILE         * stream ); 
    170174
     175/*********************************************************************************************
     176 * This function moves <nitems> oblects, each <size> bytes long, from an input stream
     177 * identified by <stream>, to the user buffer identified by the <buffer> argument.
     178 * It can be a regular file or a character oriented input device.
     179 *********************************************************************************************
     180 * @ stream    : pointer on a stream.
     181 * @ offset    : used to compute new offset value.
     182 * @ whence    : operation type (SEEK_SET / SEEK_CUR / SEEK_END)
     183 * @ return 0 if success / returns -1 if failure.
     184 ********************************************************************************************/
     185unsigned int fseek( FILE        * stream,
     186                    unsigned int  offset,
     187                    int           whence );
     188
     189
    171190#endif  // _STDIO_H_
Note: See TracChangeset for help on using the changeset viewer.