Changeset 678


Ignore:
Timestamp:
Nov 20, 2020, 12:23:31 AM (4 years ago)
Author:
alain
Message:

Introduce the fget_string() function.

Location:
trunk/libs/libalmosmkh
Files:
2 edited

Legend:

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

    r661 r678  
    118118}
    119119
    120 ///////////////////////////////////////
    121 int get_uint32( unsigned int * buffer )
     120////////////////////////////////////////
     121void get_uint32( unsigned int * buffer )
    122122{
    123123    unsigned int  i;
     
    201201    }
    202202
    203     // final evaluation
     203    // write value to buffer
    204204    if ( overflow == 0 )
    205205    {
    206206        // return value
    207207        *buffer = value;
    208         return 0;
    209208    }
    210209    else
     
    221220        // return 0 value
    222221        *buffer = 0;
    223         return -1;
    224222    }
    225223}  // end get_uint32()
    226224
    227 //////////////////////////////
     225///////////////////////////////
    228226int get_string( char * string,
    229227                int    maxlen )
    230228{
    231229    int c;
    232     int done   = 0;
    233230    int length = 0;
    234231
    235     while( done == 0 )
     232    while( 1 )
    236233    {
    237234        // check buffer overflow
     
    256253            length++;                       // update length
    257254        }
    258         else if (c == 0x0A)                 // LF character marks end of string
    259         {
    260             putchar( c );
    261             done = 1;
     255        else if( c == 0x0A )                // LF character marks end of string
     256        {
     257            putchar( c );                   // echo
     258            string[length] = 0;             // register NUL character in string
     259            return length + 1;
    262260        }
    263261        else if ( (c == 0x7F) ||            // DEL character
     
    270268            }
    271269        }
    272         else if ( c == 0 )                  // EOF character
    273         {
    274             // cancel all echo characters
    275             while( length )
     270    }
     271
     272    // set NUL character in string and return success
     273
     274}  // end get_string()
     275
     276
     277/////////////////////////////
     278int fget_string( int    fdid,
     279                 char * string,
     280                 int    maxlen )
     281{
     282    int  ret;
     283    char c;
     284    int  length = 0;
     285
     286    while( 1 )
     287    {
     288        // check buffer overflow
     289        if( length >= maxlen-1 )  length = 0;                 
     290
     291        // read one character from stream
     292        ret = read( fdid , &c , 1 );
     293
     294        if( ret == 1 )
     295        {
     296            if ( (c >= 0x20) && (c < 0x7F) )    // printable character
    276297            {
    277                printf("\b \b");             // cancel one echo character
    278                length--;                   
     298                string[length] = (char)c;       // register character in string
     299                length++;                       // update length
    279300            }
    280             return -1;                      // return failure
    281         }
    282     }
    283 
    284     // set NUL character in string and return success
    285     string[length] = 0;
    286     return length + 1;
    287 
    288 }  // end get_string()
     301            else if ( c == 0 )                  // end of string
     302            {
     303                string[length] = (char)c;       // register character in string
     304                length++;                       // update length
     305                break;                          // exit loop
     306            }
     307            // discard all characters not printable or NUL
     308        }
     309        else
     310        {
     311            printf("\n[%s] cannot read stream %d\n", __FUNCTION__, fdid );
     312            length = 0;
     313            break;
     314        }
     315    }
     316}  // end fget_string()
     317
    289318
    290319//////////////////////////////////////////////////////////////////////////////////////
     
    418447}
    419448
     449////////////////////////////////////////
     450int display_fd_array( unsigned int pid )
     451{
     452    return hal_user_syscall( SYS_DISPLAY,
     453                             DISPLAY_FD,
     454                             (reg_t)pid, 0, 0 );
     455}
     456
     457///////////////////////////////////////////
     458int display_fbf_windows( unsigned int pid )
     459{
     460    return hal_user_syscall( SYS_DISPLAY,
     461                             DISPLAY_WINDOWS,
     462                             (reg_t)pid, 0, 0 );
     463}
     464
    420465///////////////////////////////
    421466int trace( unsigned int active,
     
    433478{
    434479   char          cmd;
    435    int           error;
    436480
    437481   while( 1 )
     
    450494
    451495            printf("b / pid = ");
    452             error = get_uint32( &pid );
     496            get_uint32( &pid );
    453497
    454498            printf(" / trdid = ");
    455             error |= get_uint32( &trdid );
    456 
    457             if( error == 0 ) display_busylocks( pid , trdid );
     499            get_uint32( &trdid );
     500
     501            display_busylocks( pid , trdid );
    458502        }
    459503        // return to calling process
     
    470514
    471515            printf(" / min = ");
    472             error = get_uint32( &min );
     516            get_uint32( &min );
    473517
    474518            printf(" / slots = ");
    475             error |= get_uint32( &slots );
    476 
    477             if( error == 0 ) display_fat( min , slots );
     519            get_uint32( &slots );
     520
     521            display_fat( min , slots );
    478522        }
    479523        // list all supported commands
     
    503547
    504548            printf("m / path = ");
    505             error = get_string( path , 128 );
     549            get_string( path , 128 );
    506550
    507551            printf(" / page = ");
    508             error |= get_uint32( &page );
     552            get_uint32( &page );
    509553
    510554            printf(" / nbytes = ");
    511             error |= get_uint32( &nbytes );
    512 
    513             if( error == 0 ) display_mapper( path , page , nbytes );
     555            get_uint32( &nbytes );
     556
     557            display_mapper( path , page , nbytes );
    514558        }
    515559        // display all processes in cluster(cxy)
     
    519563
    520564            printf("p / cxy = ");
    521             error = get_uint32( &cxy );
    522 
    523             if( error == 0 ) display_cluster_processes( cxy , 0 );
     565            get_uint32( &cxy );
     566
     567            display_cluster_processes( cxy , 0 );
    524568        }
    525569        // display DQDT
     
    536580
    537581            printf("s / cxy = ");
    538             error = get_uint32( &cxy );
     582            get_uint32( &cxy );
    539583
    540584            printf(" / lid = ");
    541             error |= get_uint32( &lid );
    542 
    543             if( error == 0 ) display_sched( cxy , lid );
     585            get_uint32( &lid );
     586
     587            display_sched( cxy , lid );
    544588        }
    545589        // display all processes attached to TXT(txt_id)
     
    549593
    550594            printf("t / txt_id = ");
    551             error = get_uint32( &txt_id );
    552 
    553             if( error == 0 ) display_txt_processes( txt_id );
     595            get_uint32( &txt_id );
     596
     597            display_txt_processes( txt_id );
    554598        }
    555599        // display vmm state for process(cxy, pid)
     
    561605
    562606            printf("v / cxy = ");
    563             error = get_uint32( &cxy );
     607            get_uint32( &cxy );
    564608
    565609            printf(" / pid = ");
    566             error |= get_uint32( &pid );
     610            get_uint32( &pid );
    567611
    568612            printf(" / mapping = ");
    569             error |= get_uint32( &map );
    570 
    571             if( error == 0 ) display_vmm( cxy , pid , map );
     613            get_uint32( &map );
     614
     615            display_vmm( cxy , pid , map );
    572616        }
    573617        // force the calling process to exit
     
    585629
    586630            printf("y / active = ");
    587             error = get_uint32( &active );
     631            get_uint32( &active );
    588632
    589633            printf(" / cxy = ");
    590             error |= get_uint32( &cxy );
     634            get_uint32( &cxy );
    591635
    592636            printf(" / lid = ");
    593             error |= get_uint32( &lid );
    594 
    595             if( error == 0 ) trace( active , cxy , lid );
     637            get_uint32( &lid );
     638
     639            trace( active , cxy , lid );
    596640        }
    597641    }  // en while
     
    13661410                if( child_sts[i][j] < 0 )  // failure => report error
    13671411                {
    1368                     printf("\n[ERROR] in %s select core for child[%d,%d] of <build> thread[%d,%d]\n",
     1412                    printf("\n[ERROR] in %s : child[%d,%d] of <build> thread[%d,%d]\n",
    13691413                    __FUNCTION__ , i , j , cid , level );
    13701414
     
    15581602/////////////////////////////////////////////////////////////////////////////////////////
    15591603
    1560 /////////////////////////////////////////
    1561 int fbf_get_config( unsigned int * width,
    1562                     unsigned int * height,
    1563                     unsigned int * type )
     1604////////////////////////////////
     1605int fbf_get_config( int * width,
     1606                    int * height,
     1607                    int * type )
    15641608{
    15651609    return hal_user_syscall( SYS_FBF,
     
    15701614}
    15711615
    1572 ////////////////////////////////////
    1573 int fbf_read( void         * buffer,
    1574               unsigned int   length,
    1575               unsigned int   offset )
    1576 {
     1616////////////////////////////
     1617int fbf_read( void * buffer,
     1618              int    length,
     1619              int    offset )
     1620{
     1621    printf("[WARNING] the <%s> syscall is deprecated\n", __FUNCTION__ );
     1622
    15771623    return hal_user_syscall( SYS_FBF,
    15781624                             (reg_t)FBF_DIRECT_READ,
     
    15821628}
    15831629
    1584 /////////////////////////////////////
    1585 int fbf_write( void         * buffer,
    1586                unsigned int   length,
    1587                unsigned int   offset )
    1588 {
     1630/////////////////////////////
     1631int fbf_write( void * buffer,
     1632               int    length,
     1633               int    offset )
     1634{
     1635    printf("[WARNING] the <%s> syscall is deprecated\n", __FUNCTION__ );
     1636
    15891637    return hal_user_syscall( SYS_FBF,
    15901638                             (reg_t)FBF_DIRECT_WRITE,
     
    15941642}
    15951643
    1596 //////////////////////////////////////////////
    1597 int fbf_create_window( unsigned int    l_zero,
    1598                        unsigned int    p_zero,
    1599                        unsigned int    nlines,
    1600                        unsigned int    npixels,
    1601                        void         ** buffer )
     1644//////////////////////////////////////
     1645int fbf_create_window( int     l_zero,
     1646                       int     p_zero,
     1647                       int     nlines,
     1648                       int     npixels,
     1649                       void ** buffer )
    16021650{
    16031651    return hal_user_syscall( SYS_FBF,
     
    16081656}
    16091657
    1610 //////////////////////////////////////////
    1611 int fbf_delete_window( unsigned int  wid )
     1658///////////////////////////////
     1659int fbf_active_window( int wid,
     1660                       int active )
     1661{
     1662    return hal_user_syscall( SYS_FBF,
     1663                             (reg_t)FBF_ACTIVE_WINDOW,
     1664                             (reg_t)wid,
     1665                             (reg_t)active, 0 );
     1666}
     1667
     1668/////////////////////////////////
     1669int fbf_delete_window( int  wid )
    16121670{
    16131671    return hal_user_syscall( SYS_FBF,
     
    16161674}
    16171675
    1618 ///////////////////////////////////////
    1619 int fbf_move_window( unsigned int  wid,
    1620                      unsigned int  l_zero,
    1621                      unsigned int  p_zero )
     1676//////////////////////////////
     1677int fbf_move_window( int  wid,
     1678                     int  l_zero,
     1679                     int  p_zero )
    16221680{
    16231681    return hal_user_syscall( SYS_FBF,
     
    16281686}
    16291687
    1630 /////////////////////////////////////////
    1631 int fbf_resize_window( unsigned int  wid,
    1632                        unsigned int  width,
    1633                        unsigned int  height )
     1688////////////////////////////////
     1689int fbf_resize_window( int  wid,
     1690                       int  width,
     1691                       int  height )
    16341692{
    16351693    return hal_user_syscall( SYS_FBF,
     
    16401698}
    16411699
    1642 //////////////////////////////////////////
    1643 int fbf_refresh_window( unsigned int  wid,
    1644                         unsigned int  line_first,
    1645                         unsigned int  line_last )
     1700/////////////////////////////////
     1701int fbf_refresh_window( int  wid,
     1702                        int  line_first,
     1703                        int  line_last )
    16461704{
    16471705    return hal_user_syscall( SYS_FBF,
     
    16521710}
    16531711
     1712/////////////////////////////////
     1713int fbf_front_window( int   wid )
     1714{
     1715    return hal_user_syscall( SYS_FBF,
     1716                             (reg_t)FBF_FRONT_WINDOW,
     1717                             (reg_t)wid, 0, 0 );
     1718}
    16541719
    16551720// Local Variables:
  • trunk/libs/libalmosmkh/almosmkh.h

    r661 r678  
    141141
    142142/***************************************************************************************
    143  * This syscall returns an 32 bits integer from the standard "stdin" stream.
     143 * This syscall returns an 32 bits integer from the TXT terminal.
    144144 * The value is copied in buffer pointed by the <buf> argument
    145145 * Both decimal numbers and hexadecimal numbers (prefixed by 0x) are supported.
     
    148148 * @ returns 0 if success / returns -1 if failure.
    149149 **************************************************************************************/
    150 int get_uint32( unsigned int * buffer );
     150void get_uint32( unsigned int * buffer );
     151
    151152
    152153/***************************************************************************************
    153  * This syscall returns a character string from the standard "stdin" stream.
    154  * The string is copied in buffer pointed by the <string> argument.
    155  * If the number of characters exceed the buffer length, all character are canceled
    156  * in both the buffer & the echoed string, and a new string capture start.
     154 * These syscalls return a NUL terminated character string from the TXT terminal.
     155 * The characters are copied in buffer pointed by the <string> argument.
     156 * If the number of characters exceeds <maxlen>, all read characters are discarded,
     157 * and removed from the <string> buffer, and a new string capture start.
    157158 * - Only printable characters c such as (0x20 <= c) and (c < 0x7f) are echoed
    158159 *   and copied in the target buffer.
     
    162163 *   used to correct both the buffer content and the echoed string.
    163164 ***************************************************************************************
    164  * @ string   : pointer on the string buffer.
     165 * @ string   : pointer on the user space string buffer.
    165166 * @ maxlen   : max number of bytes in string buffer, including the terminating NUL.
    166  * @ returns string length (including NUL) if success / returns -1 if failure.
     167 * @ returns string length (including NUL) if success / returns 0 if failure.
    167168 **************************************************************************************/
    168169int get_string( char * string,
     
    327328                    unsigned int fdid );
    328329
    329 /*****************************************************************************************
     330/***************************************************************************************
     331 * This debug syscall displays on the kernel terminal the set of open file descriptors
     332 * registered in the fd_array of a process identified by the <pid> argument.
     333 * It can be called by any thread running in any cluster.
     334 ***************************************************************************************
     335 * @ pid        : target process identifier.
     336 setoreturn 0 if success / return -1 if undefined pid.
     337 **************************************************************************************/
     338int display_fd_array( unsigned int pid );
     339
     340/***************************************************************************************
     341 * This debug syscall displays on the kernel terminal the set of registered windows
     342 * in the FBF device. It can be called by any thread running in any cluster.
     343 ***************************************************************************************
     344 * @ pid    : target process identifier / all processes when pid == 0
     345 * return 0 if success / return -1 if undefined pid.
     346 **************************************************************************************/
     347int display_fbf_windows( unsigned int pid );
     348
     349/***************************************************************************************
    330350* This debug syscall is used to activate / desactivate the context switches trace
    331351* for a core identified by the <cxy> and <lid> arguments.
    332352* It can be called by any thread running in any cluster.
    333 *****************************************************************************************
     353****************************************************************************************
    334354* @ active     : activate trace if non zero / desactivate if zero.
    335355* @ cxy        : cluster identifier.
    336356* @ lid        : core local index.
    337357* @ returns O if success / returns -1 if illegal arguments.
    338 ****************************************************************************************/
     358***************************************************************************************/
    339359int trace( unsigned int active,
    340360           unsigned int cxy,
    341361           unsigned int lid );
    342362
    343 /****************************************************************************************
     363/***************************************************************************************
    344364 * This syscall implements an user-level interactive debugger that can be
    345365 * introduced in any user application to display various kernel distributed structures.
    346  ***************************************************************************************/
     366 **************************************************************************************/
    347367void idbg( void );
    348368
    349369
    350 /****************** Non standard (ALMOS-MKH specific) malloc operations  ***************/
    351 
    352 /////////////////////////////////////////////////////////////////////////////////////////
     370/****************** Non standard (ALMOS-MKH specific) malloc operations  **************/
     371
     372////////////////////////////////////////////////////////////////////////////////////////
    353373// General principles:
    354374// - In user space the HEAP zone spread between the ELF zone and the STACK zone,
     
    367387//        is allocated on demand in each cluster.
    368388//        We should introduce the possibility to dynamically allocate
    369 //        several vsegs in each cluster, using several mmap when required.
    370 /////////////////////////////////////////////////////////////////////////////////////////
     389//        several vsegs in each cluster (using several mmap) when required.
     390////////////////////////////////////////////////////////////////////////////////////////
    371391// Free blocks organisation in each cluster :
    372392// - All free blocks have a size that is a power of 2, larger or equal
     
    379399// - The pointers on the first free block for each size are stored in an
    380400//   array of pointers free[32] in the storage(x,y) descriptor.
    381 /////////////////////////////////////////////////////////////////////////////////////////
     401////////////////////////////////////////////////////////////////////////////////////////
    382402// Allocation policy:
    383403// - The block size required by the user can be any value, but the allocated
     
    400420//   If the vseg is aligned (the vseg base is a multiple of the
    401421//   vseg size), all allocated blocks are aligned on the actual_size.
    402 /////////////////////////////////////////////////////////////////////////////////////////
     422////////////////////////////////////////////////////////////////////////////////////////
    403423// Free policy:
    404424// - Each allocated block is registered in an alloc[] array of unsigned char.
     
    598618
    599619/*****************************************************************************************
    600  * This function returns in the <width>, <height> and <type> arguments
     620 * This syscall returns in the <width>, <height> and <type> arguments
    601621 * the implementation specific frame buffer features.
    602622 *****************************************************************************************
     
    606626 * @ returns 0 if success / returns -1 if not found.
    607627 ****************************************************************************************/
    608 int fbf_get_config( unsigned int * width,
    609                     unsigned int * height,
    610                     unsigned int * type );
    611 
    612 /*****************************************************************************************
    613  * This function creates a new window defined by the <l_zero>, <p_zero>, <nlines>,
    614  * and <npixels> arguments for the calling process, and register the process PID, the
    615  * allocated <wid>, and the window size and coordinates in the FBF device descriptor.
    616  * It returns in the output argument <buffer> the pointer on the buffer associated to
    617  * the window, mapped in user space.
     628int fbf_get_config( int * width,
     629                    int * height,
     630                    int * type );
     631
     632/*****************************************************************************************
     633 * This syscall creates a new window defined by the <l_zero>, <p_zero>, <nlines>,
     634 * and <npixels> arguments for the calling process, and register the client process PID,
     635 * the allocated <wid>, and the window size and coordinates in the list of windows rooted
     636 * in the FBF device descriptor. It returns in the output argument <buffer> the pointer
     637 * on the buffer associated to the window, mapped in user space.
    618638 * Warning : Both pixel [p_zero,l_zero] and pixel [p_zero+npixels-1,l_zero+nlines-1]
    619639 * must be contained in the frame buffer.
     
    623643 * @ nlines  : [in]  number of lines in the window.
    624644 * @ npixels : [in]  number of pixels per line in the window.
    625  * @ buffer  : [out] pointer on
    626  * @ returns <wid> if success / returns -1 if illegal size or coordinates.
    627  ****************************************************************************************/
    628 int fbf_create_window( unsigned int   l_zero,
    629                        unsigned int   p_zero,
    630                        unsigned int   nlines,
    631                        unsigned int   npixels,
    632                        void        ** buffer );
    633 
    634 /*****************************************************************************************
    635  * This function deletes an existing window, identified by the <wid> argument.
     645 * @ buffer  : [out] pointer on buffer associated to window, mapped in user space.
     646 * @ returns <kern_wid> if success / returns -1 if illegal size or coordinates.
     647 ****************************************************************************************/
     648int fbf_create_window( int     l_zero,
     649                       int     p_zero,
     650                       int     nlines,
     651                       int     npixels,
     652                       void ** buffer );
     653
     654/*****************************************************************************************
     655 * This syscall activates/desactivates the window identified by the <wid> argument,
     656 * according to the <active> argument.  The calling process must be the window owner.
     657 *****************************************************************************************
     658 * @ wid        : window identifier.
     659 * @ active     : activate window if non zero / desactivate window if zero.
     660 * @ returns 0 if success / returns -1 if illegal wid argument.
     661 ****************************************************************************************/
     662int fbf_active_window( int   wid,
     663                       int   active );
     664
     665/*****************************************************************************************
     666 * This syscall deletes an existing window, identified by the <wid> argument.
    636667 * The calling process must be the window owner.
    637668 *****************************************************************************************
    638669 * @ wid     : window identifier.
    639  * @ returns 0 if success / returns -1 if not found or process not owner.
    640  ****************************************************************************************/
    641 int fbf_delete_window( unsigned int  wid );
    642 
    643 /*****************************************************************************************
    644  * This function refreshes in FBF all lines of a window identified by the <wid> argument,
     670 * @ returns 0 if success / returns -1 if illegal wid argument.
     671 ****************************************************************************************/
     672int fbf_delete_window( int  wid );
     673
     674/*****************************************************************************************
     675 * This syscall refreshes in FBF all lines of a window identified by the <wid> argument,
    645676 * when the line index is in the interval [line_first,line_last[.
    646677 * It scans all registered windows to take into account the windows overlap.
     678 * The calling process must be the window owner, and the line_fist / line_last indexes
     679 * must be compatible with the window height.
    647680 *****************************************************************************************
    648681 * @ wid        : window identifier.
    649  * @ line_first : first line index.
    650  * @ line_last  : last line index (excluded).
    651  * @ returns 0 if success / returns -1 if illegal argument.
    652  ****************************************************************************************/
    653 int fbf_refresh_window( unsigned int   wid,
    654                         unsigned int   line_first,
    655                         unsigned int   line_last );
    656 
    657 /*****************************************************************************************
    658  * This function changes the size of a window identified by the <wid> argument as defined
     682 * @ line_first : first line index in window.
     683 * @ line_last  : last line index in window (excluded).
     684 * @ returns 0 if success / returns -1 if illegal arguments.
     685 ****************************************************************************************/
     686int fbf_refresh_window( int   wid,
     687                        int   line_first,
     688                        int   line_last );
     689
     690/*****************************************************************************************
     691 * This syscall gives the highest priority to the window identified by the <wid>
     692 * argument, and refresh the FBF to take into account the new windows overlap priorities.
     693 * The calling process must be the window owner.
     694 *****************************************************************************************
     695 * @ wid        : window identifier.
     696 * @ returns 0 if success / returns -1 if wid illegal argument.
     697 ****************************************************************************************/
     698int fbf_front_window( int   wid );
     699
     700/*****************************************************************************************
     701 * This syscall changes the size of a window identified by the <wid> argument as defined
    659702 * by the <width> and height> arguments. The calling process must be the window owner.
    660  * WARNING : Both pixel [p_zero,l_zero] and pixel [p_zero+width-1,l_zero+height-1]
    661  * must be contained in the frame buffer.
     703 * Both pixel [p_zero,l_zero] and pixel [p_zero+width-1,l_zero+height-1] must be
     704 * contained in the frame buffer.
    662705 *****************************************************************************************
    663706 * @ wid     : window identifier.
     
    666709 * @ returns 0 if success / returns -1 if illegal arguments.
    667710 ****************************************************************************************/
    668 int fbf_resize_window( unsigned int   wid,
    669                        unsigned int   width,
    670                        unsigned int   height );
    671 
    672 /*****************************************************************************************
    673  * This function changes the <l_zero> & <p_zero> coordinates of a window identified
     711int fbf_resize_window( int   wid,
     712                       int   width,
     713                       int   height );
     714
     715/*****************************************************************************************
     716 * This syscall changes the <l_zero> & <p_zero> coordinates of a window identified
    674717 * by the <wid> argument. The calling process must be the window owner.
    675  * WARNING : Both pixel [p_zero,l_zero] and pixel [p_zero+width-1,l_zero+height-1]
     718 * Both pixel [p_zero,l_zero] and pixel [p_zero+width-1,l_zero+height-1]
    676719 * must be contained in the frame buffer.
    677720 *****************************************************************************************
     
    681724 * @ returns 0 if success / returns -1 if illegal arguments.
    682725 ****************************************************************************************/
    683 int fbf_move_window( unsigned int  wid,
    684                      unsigned int  l_zero,
    685                      unsigned int  p_zero );
     726int fbf_move_window( int  wid,
     727                     int  l_zero,
     728                     int  p_zero );
     729
     730
     731
    686732
    687733/*****************************************************************************************
     
    695741 * @ returns 0 if success / returns -1 if illegal arguments.
    696742 ****************************************************************************************/
    697 int fbf_write( void         * buffer,
    698                unsigned int   length,
    699                unsigned int   offset );
     743int fbf_write( void * buffer,
     744               int    length,
     745               int    offset );
    700746
    701747/*****************************************************************************************
     
    709755 * @ returns 0 if success / returns -1 if illegal arguments.
    710756 ****************************************************************************************/
    711 int fbf_read( void         * buffer,
    712               unsigned int   length,
    713               unsigned int   offset );
     757int fbf_read( void * buffer,
     758              int    length,
     759              int    offset );
    714760
    715761
Note: See TracChangeset for help on using the changeset viewer.