Ignore:
Timestamp:
Apr 28, 2001, 3:33:49 PM (24 years ago)
Author:
sandervl
Message:

resync with latest wine

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/shlwapi/string_odin.cpp

    r4081 r5618  
    1  /* $Id: string_odin.cpp,v 1.1 2000-08-24 09:32:44 sandervl Exp $ */
     1 /* $Id: string_odin.cpp,v 1.2 2001-04-28 13:32:21 sandervl Exp $ */
    22
    33/*
     
    200200ODINFUNCTION2(LPSTR,  StrChrIA,
    201201              LPCSTR, lpStart,
    202               CHAR,   wMatch)
     202              WORD,   wMatch)
    203203{
    204204  LPSTR lpRes;
     
    250250
    251251/*****************************************************************************
    252  * Name      : StrStrIA
    253  * Purpose   : Finds the first occurrence of a substring within a string. The
    254  *             comparison is not case sensitive.
    255  * Parameters: LPCSTR lpFirst
    256  *             LPCSTR lpSrch
    257  * Variables :
    258  * Result    : Returns the address of the first occurrence of the matching
    259  *             substring if successful, or NULL otherwise.
    260  * Remark    : SHELL32.
    261  * Status    : COMPLETELY IMPLEMENTED UNTESTED UNKNOWN
    262  *
    263  * Author    : Patrick Haller [Wed, 1999/12/29 09:00]
    264  *****************************************************************************/
    265 
    266 ODINFUNCTION2(LPSTR,  StrStrIA,
    267               LPCSTR, lpFirst,
    268               LPCSTR, lpSrch)
    269 {
    270   char  ch = lpSrch[0];          // look for 1st character
    271   LONG  lLen = lstrlenA(lpSrch); // length of search string
    272   int   iRes;                    // comparsion result
    273 
    274   do
    275   {
    276     lpFirst = StrChrIA(lpFirst, // find first matching character
    277                        ch);
    278     if (NULL == lpFirst)        // not found
    279       return NULL;
    280 
    281     iRes   = StrCmpNIA((LPSTR)lpFirst, // compare search string
    282                        (LPSTR)lpSrch,
    283                        lLen);
    284 
    285     if (0 == iRes)              // Found!
    286       return (LPSTR)lpFirst;
    287 
    288     lpFirst = CharNextA(lpFirst); // skip to next character
    289   }
    290   while (*lpFirst != 0);        // safe termination
    291 
    292   return NULL;                  // default result
    293 }
    294 
    295 
    296 
    297 /*****************************************************************************
    298  * Name      : StrStrIW
    299  * Purpose   : Finds the first occurrence of a substring within a string. The
    300  *             comparison is not case sensitive.
    301  * Parameters: LPCWSTR lpFirst
    302  *             LPCWSTR lpSrch
    303  * Variables :
    304  * Result    : Returns the address of the first occurrence of the matching
    305  *             substring if successful, or NULL otherwise.
    306  * Remark    : SHELL32.
    307  * Status    : COMPLETELY IMPLEMENTED UNTESTED UNKNOWN
    308  *
    309  * Author    : Patrick Haller [Wed, 1999/12/29 09:00]
    310  *****************************************************************************/
    311 
    312 ODINFUNCTION2(LPWSTR,  StrStrIW,
    313               LPCWSTR, lpFirst,
    314               LPCWSTR, lpSrch)
    315 {
    316   WCHAR  ch = lpSrch[0];          // look for 1st character
    317   LONG   lLen = lstrlenW(lpSrch); // length of search string
    318   int   iRes;                    // comparsion result
    319 
    320   do
    321   {
    322     lpFirst = StrChrIW(lpFirst, // find first matching character
    323                        ch);
    324     if (NULL == lpFirst)        // not found
    325       return NULL;
    326 
    327     iRes   = StrCmpNIW((LPWSTR)lpFirst, // compare search string
    328                        (LPWSTR)lpSrch,
    329                        lLen);
    330 
    331     if (0 == iRes)              // Found!
    332       return (LPWSTR)lpFirst;
    333 
    334     lpFirst = CharNextW(lpFirst); // skip to next character
    335   }
    336   while (*lpFirst != 0);        // safe termination
    337 
    338   return NULL;                  // default result
    339 }
    340 
    341 
    342 
    343 
    344 
    345 
    346 /*****************************************************************************
    347252 * Name      : StrCpyA
    348253 * Purpose   : copy a string
Note: See TracChangeset for help on using the changeset viewer.