project_files/hwc/rtl/system.h
changeset 10131 4b4a043111f4
parent 10127 7f29a65aa1e4
child 10566 cc90ea6448c7
equal deleted inserted replaced
10130:a9d509848390 10131:4b4a043111f4
    28  * Delete removes Count characters from string S, starting at position Index.
    28  * Delete removes Count characters from string S, starting at position Index.
    29  * All characters after the deleted characters are shifted Count positions to the left,
    29  * All characters after the deleted characters are shifted Count positions to the left,
    30  * and the length of the string is adjusted.
    30  * and the length of the string is adjusted.
    31  */
    31  */
    32 #define     fpcrtl_delete(s, index, count)                  fpcrtl_delete__vars(&(s), index, count)
    32 #define     fpcrtl_delete(s, index, count)                  fpcrtl_delete__vars(&(s), index, count)
    33 void        fpcrtl_delete__vars(string255 *s, SizeInt index, SizeInt count);
    33 void        __attribute__((overloadable))                   fpcrtl_delete__vars(string255 *s, SizeInt index, SizeInt count);
       
    34 void        __attribute__((overloadable))                   fpcrtl_delete__vars(astring *s, SizeInt index, SizeInt count);
    34 
    35 
    35 string255   fpcrtl_floatToStr(double n);
    36 string255   fpcrtl_floatToStr(double n);
    36 
    37 
    37 /*
    38 /*
    38  * Move data from one location in memory to another
    39  * Move data from one location in memory to another
    42 #define     fpcrtl_Move                                     fpcrtl_move
    43 #define     fpcrtl_Move                                     fpcrtl_move
    43 
    44 
    44 Integer     __attribute__((overloadable))                   fpcrtl_pos(Char c, string255 str);
    45 Integer     __attribute__((overloadable))                   fpcrtl_pos(Char c, string255 str);
    45 Integer     __attribute__((overloadable))                   fpcrtl_pos(string255 substr, string255 str);
    46 Integer     __attribute__((overloadable))                   fpcrtl_pos(string255 substr, string255 str);
    46 Integer     __attribute__((overloadable))                   fpcrtl_pos(string255 substr, astring str);
    47 Integer     __attribute__((overloadable))                   fpcrtl_pos(string255 substr, astring str);
       
    48 Integer     __attribute__((overloadable))                   fpcrtl_pos(Char c, astring str);
    47 
    49 
    48 Integer     fpcrtl_length(string255 s);
    50 Integer     fpcrtl_length(string255 s);
    49 #define     fpcrtl_Length                                   fpcrtl_length
    51 #define     fpcrtl_Length                                   fpcrtl_length
    50 Integer     fpcrtl_lengthA(astring s);
    52 Integer     fpcrtl_lengthA(astring s);
    51 #define     fpcrtl_LengthA                                  fpcrtl_lengthA
    53 #define     fpcrtl_LengthA                                  fpcrtl_lengthA
       
    54 
       
    55 #define     fpcrtl_SetLengthA(s, l)                         do{(s).len = (l);}while(0)
    52 
    56 
    53 #define     fpcrtl_sqr(x)                                   ((x) * (x))
    57 #define     fpcrtl_sqr(x)                                   ((x) * (x))
    54 
    58 
    55 #define     fpcrtl_odd(x)                                   ((x) % 2 != 0 ? true : false)
    59 #define     fpcrtl_odd(x)                                   ((x) % 2 != 0 ? true : false)
    56 
    60