Changeset 238 for trunk/kernel/libk


Ignore:
Timestamp:
Jul 19, 2017, 3:31:39 PM (7 years ago)
Author:
alain
Message:

Fixing bugs in vfs_lookup()

Location:
trunk/kernel/libk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/libk/string.c

    r223 r238  
    152152}
    153153
     154/////////////////////////////////////
     155inline uint8_t to_lower( uint8_t  c )
     156{
     157   if (c >= 'A' && c <= 'Z') return (c | 0x20);
     158   else                      return c;
     159}
     160
     161
     162/////////////////////////////////////
     163inline uint8_t to_upper( uint8_t  c )
     164{
     165   if (c >= 'a' && c <= 'z') return (c & ~(0x20));
     166   else                      return c;
     167}
     168
     169
  • trunk/kernel/libk/string.h

    r23 r238  
    122122                 int          c );
    123123
     124/********************************************************************************************
     125 * This function returns a lower case ASCII code if input is in [A...Z] range.
     126 ********************************************************************************************
     127 * @ c     : character to be forced to lower case.
     128 * @ return lower case ASCII code.
     129 *******************************************************************************************/
     130inline uint8_t to_lower( uint8_t  c );
     131
     132/********************************************************************************************
     133 * This function returns an upper case ASCII code if input is in [a...z] range.
     134 ********************************************************************************************
     135 * @ c     : character to be forced to upper case.
     136 * @ return upper case ASCII code.
     137 *******************************************************************************************/
     138inline uint8_t to_upper( uint8_t  c );
     139
    124140#endif  /* _STRING_H_ */
Note: See TracChangeset for help on using the changeset viewer.