Changeset 115


Ignore:
Timestamp:
Nov 1, 2001, 6:37:28 PM (24 years ago)
Author:
umoeller
Message:

More updates.

Location:
trunk/include/helpers
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/helpers/comctl.h

    r113 r115  
    5555                                        // coordinates); exclusive!
    5656
    57         ULONG       cxMiniIcon;         // system mini icon size
     57        ULONG       cxIconOrBitmap,     // icon size
     58                    cyIconOrBitmap;
    5859
    5960        LONG        lcol3DDark,         // lo-3D color
     
    6566    } XBUTTONDATA, *PXBUTTONDATA;
    6667
    67     #define XBF_FLAT                0x0001
     68    #define XBF_FLAT                0x00000001
     69    #define XBF_BITMAP              0x00000002
    6870
    6971    #define XBF_PRESSED             0x00010000
  • trunk/include/helpers/dosh.h

    r113 r115  
    6161                             const char* pcszName);
    6262
    63     PVOID doshRequestSharedMem(const char *pcszName);
     63    PVOID doshRequestSharedMem(PCSZ pcszName);
    6464
    6565    /* ******************************************************************
     
    172172
    173173    VOID XWPENTRY doshEnumDrives(PSZ pszBuffer,
    174                                  const char *pcszFileSystem,
     174                                 PCSZ pcszFileSystem,
    175175                                 BOOL fSkipRemoveables);
    176176    typedef VOID XWPENTRY DOSHENUMDRIVES(PSZ pszBuffer,
    177                                          const char *pcszFileSystem,
     177                                         PCSZ pcszFileSystem,
    178178                                         BOOL fSkipRemoveables);
    179179    typedef DOSHENUMDRIVES *PDOSHENUMDRIVES;
     
    304304    /* ******************************************************************
    305305     *
     306     *   File name parsing
     307     *
     308     ********************************************************************/
     309
     310    APIRET doshGetDriveSpec(PCSZ pcszFullFile,
     311                            PSZ pszDrive,
     312                            PULONG pulDriveLen,
     313                            PBOOL pfIsUNC);
     314
     315    PSZ doshGetExtension(PCSZ pcszFilename);
     316
     317    /* ******************************************************************
     318     *
    306319     *   File helpers
    307320     *
    308321     ********************************************************************/
    309 
    310     PSZ doshGetExtension(const char *pcszFilename);
    311322
    312323    BOOL doshIsFileOnFAT(const char* pcszFileName);
     
    329340                           ULONG ulAttr);
    330341
    331     APIRET doshOpenExisting(const char *pcszFilename,
     342    APIRET doshOpenExisting(PCSZ pcszFilename,
    332343                            ULONG ulOpenFlags,
    333344                            HFILE *phf);
     
    363374    #define XOPEN_READWRITE_NEW             3
    364375
    365     APIRET doshOpen(const char *pcszFilename,
     376    APIRET doshOpen(PCSZ pcszFilename,
    366377                    ULONG ulOpenMode,
    367378                    PULONG pcbFile,
     
    378389    APIRET doshClose(PXFILE *ppFile);
    379390
    380     APIRET doshLoadTextFile(const char *pcszFile,
     391    APIRET doshLoadTextFile(PCSZ pcszFile,
    381392                            PSZ* ppszContent);
    382393
     
    384395
    385396    APIRET doshCreateTempFileName(PSZ pszTempFileName,
    386                                   const char *pcszDir,
    387                                   const char *pcszPrefix,
    388                                   const char *pcszExt);
     397                                  PCSZ pcszDir,
     398                                  PCSZ pcszPrefix,
     399                                  PCSZ pcszExt);
    389400
    390401    APIRET doshWriteTextFile(const char* pszFile,
     
    400411     ********************************************************************/
    401412
    402     BOOL doshQueryDirExist(const char *pcszDir);
    403 
    404     APIRET doshCreatePath(const char *pcszPath,
     413    BOOL doshQueryDirExist(PCSZ pcszDir);
     414
     415    APIRET doshCreatePath(PCSZ pcszPath,
    405416                          BOOL fHidden);
    406417
    407418    APIRET doshQueryCurrentDir(PSZ pszBuf);
    408419
    409     APIRET doshSetCurrentDir(const char *pcszDir);
     420    APIRET doshSetCurrentDir(PCSZ pcszDir);
    410421
    411422    #define DOSHDELDIR_RECURSE      0x0001
    412423    #define DOSHDELDIR_DELETEFILES  0x0002
    413424
    414     APIRET doshDeleteDir(const char *pcszDir,
     425    APIRET doshDeleteDir(PCSZ pcszDir,
    415426                         ULONG flFlags,
    416427                         PULONG pulDirs,
     
    431442    typedef DOSHMYTID *PDOSHMYTID;
    432443
    433     APIRET doshExecVIO(const char *pcszExecWithArgs,
     444    APIRET doshExecVIO(PCSZ pcszExecWithArgs,
    434445                       PLONG plExitCode);
    435446
    436     APIRET doshQuickStartSession(const char *pcszPath,
    437                                  const char *pcszParams,
     447    APIRET doshQuickStartSession(PCSZ pcszPath,
     448                                 PCSZ pcszParams,
    438449                                 BOOL fForeground,
    439450                                 USHORT usPgmCtl,
     
    845856    APIRET doshExecFreeResources(PFSYSRESOURCE paResources);
    846857
    847     APIRET doshSearchPath(const char *pcszPath,
    848                           const char *pcszFile,
     858    APIRET doshSearchPath(PCSZ pcszPath,
     859                          PCSZ pcszFile,
    849860                          PSZ pszExecutable,
    850861                          ULONG cbExecutable);
    851862
    852     APIRET doshFindExecutable(const char *pcszCommand,
     863    APIRET doshFindExecutable(PCSZ pcszCommand,
    853864                              PSZ pszExecutable,
    854865                              ULONG cbExecutable,
    855                               const char **papcszExtensions,
     866                              PCSZ *papcszExtensions,
    856867                              ULONG cExtensions);
    857868
  • trunk/include/helpers/nls.h

    r113 r115  
    6060    } COUNTRYSETTINGS, *PCOUNTRYSETTINGS;
    6161
    62     VOID nlsQueryCountrySettings(PCOUNTRYSETTINGS pcs);
     62    VOID XWPENTRY nlsQueryCountrySettings(PCOUNTRYSETTINGS pcs);
    6363
    64     PSZ APIENTRY nlsThousandsULong(PSZ pszTarget, ULONG ul, CHAR cThousands);
    65     typedef PSZ APIENTRY NLSTHOUSANDSULONG(PSZ pszTarget, ULONG ul, CHAR cThousands);
     64    PSZ XWPENTRY nlsThousandsULong(PSZ pszTarget, ULONG ul, CHAR cThousands);
     65    typedef PSZ XWPENTRY NLSTHOUSANDSULONG(PSZ pszTarget, ULONG ul, CHAR cThousands);
    6666    typedef NLSTHOUSANDSULONG *PNLSTHOUSANDSULONG;
    6767
    68     PSZ nlsThousandsDouble(PSZ pszTarget, double dbl, CHAR cThousands);
     68    PSZ XWPENTRY nlsThousandsDouble(PSZ pszTarget, double dbl, CHAR cThousands);
    6969
    70     PSZ nlsVariableDouble(PSZ pszTarget, double dbl, PSZ pszUnits,
     70    PSZ XWPENTRY nlsVariableDouble(PSZ pszTarget, double dbl, PSZ pszUnits,
    7171                           CHAR cThousands);
    7272
    73     VOID nlsFileDate(PSZ pszBuf,
     73    VOID XWPENTRY nlsFileDate(PSZ pszBuf,
    7474                      FDATE *pfDate,
    7575                      ULONG ulDateFormat,
    7676                      CHAR cDateSep);
    7777
    78     VOID nlsFileTime(PSZ pszBuf,
     78    VOID XWPENTRY nlsFileTime(PSZ pszBuf,
    7979                      FTIME *pfTime,
    8080                      ULONG ulTimeFormat,
    8181                      CHAR cTimeSep);
    8282
    83     VOID APIENTRY nlsDateTime(PSZ pszDate,
     83    VOID XWPENTRY nlsDateTime(PSZ pszDate,
    8484                               PSZ pszTime,
    8585                               DATETIME *pDateTime,
     
    8888                               ULONG ulTimeFormat,
    8989                               CHAR cTimeSep);
    90     typedef VOID APIENTRY NLSDATETIME(PSZ pszDate,
     90    typedef VOID XWPENTRY NLSDATETIME(PSZ pszDate,
    9191                               PSZ pszTime,
    9292                               DATETIME *pDateTime,
     
    9797    typedef NLSDATETIME *PNLSDATETIME;
    9898
     99    APIRET XWPENTRY nlsUpper(PSZ psz, ULONG ulLength);
     100
    99101#endif
    100102
  • trunk/include/helpers/stringh.h

    r113 r115  
    3232    #define STRINGH_HEADER_INCLUDED
    3333
    34     PSZ strhcpy(PSZ string1, const char *string2);
     34    PSZ XWPENTRY strhcpy(PSZ string1, const char *string2);
    3535
    3636    #if defined(__DEBUG_MALLOC_ENABLED__) && !defined(DONT_REPLACE_STRINGH_MALLOC) // setup.h, helpers\memdebug.c
    37         PSZ strhdupDebug(const char *pszSource,
    38                          const char *pcszSourceFile,
    39                          unsigned long ulLine,
    40                          const char *pcszFunction);
    41         #define strhdup(a) strhdupDebug((a), __FILE__, __LINE__, __FUNCTION__)
     37        PSZ XWPENTRY strhdupDebug(const char *pcszSource,
     38                                  unsigned long *pulLength,
     39                                  const char *pcszSourceFile,
     40                                  unsigned long ulLine,
     41                                  const char *pcszFunction);
     42        #define strhdup(a, pul) strhdupDebug((a), (pul), __FILE__, __LINE__, __FUNCTION__)
    4243    #else
    43         PSZ strhdup(const char *pszSource);
     44        PSZ XWPENTRY strhdup(const char *pcszSource,
     45                             unsigned long *pulLength);
    4446    #endif
    4547
    46     int strhcmp(const char *p1, const char *p2);
    47 
    48     int strhicmp(const char *p1, const char *p2);
    49 
    50     PSZ strhistr(const char *string1, const char *string2);
    51 
    52     ULONG strhncpy0(PSZ pszTarget,
    53                     const char *pszSource,
    54                     ULONG cbSource);
    55 
    56     ULONG strhCount(const char *pszSearch, CHAR c);
    57 
    58     BOOL strhIsDecimal(PSZ psz);
     48    int XWPENTRY strhcmp(const char *p1, const char *p2);
     49
     50    int XWPENTRY strhicmp(const char *p1, const char *p2);
     51
     52    PSZ XWPENTRY strhistr(const char *string1, const char *string2);
     53
     54    ULONG XWPENTRY strhncpy0(PSZ pszTarget,
     55                             const char *pszSource,
     56                             ULONG cbSource);
     57
     58    ULONG XWPENTRY strhCount(const char *pszSearch, CHAR c);
     59
     60    BOOL XWPENTRY strhIsDecimal(PSZ psz);
    5961
    6062    #if defined(__DEBUG_MALLOC_ENABLED__) && !defined(DONT_REPLACE_STRINGH_MALLOC) // setup.h, helpers\memdebug.c
    61         PSZ strhSubstrDebug(const char *pBegin,      // in: first char
    62                             const char *pEnd,        // in: last char (not included)
    63                             const char *pcszSourceFile,
    64                             unsigned long ulLine,
    65                             const char *pcszFunction);
     63        PSZ XWPENTRY strhSubstrDebug(const char *pBegin,      // in: first char
     64                                     const char *pEnd,        // in: last char (not included)
     65                                     const char *pcszSourceFile,
     66                                     unsigned long ulLine,
     67                                     const char *pcszFunction);
    6668        #define strhSubstr(a, b) strhSubstrDebug((a), (b), __FILE__, __LINE__, __FUNCTION__)
    6769    #else
    68         PSZ strhSubstr(const char *pBegin, const char *pEnd);
     70        PSZ XWPENTRY strhSubstr(const char *pBegin, const char *pEnd);
    6971    #endif
    7072
    71     PSZ strhExtract(PSZ pszBuf,
    72                     CHAR cOpen,
    73                     CHAR cClose,
    74                     PSZ *ppEnd);
    75 
    76     PSZ strhQuote(PSZ pszBuf,
    77                   CHAR cQuote,
    78                   PSZ *ppEnd);
    79 
    80     ULONG strhStrip(PSZ psz);
    81 
    82     PSZ strhins(const char *pcszBuffer,
    83                 ULONG ulInsertOfs,
    84                 const char *pcszInsert);
    85 
    86     ULONG strhFindReplace(PSZ *ppszBuf,
    87                           PULONG pulOfs,
    88                           const char *pcszSearch,
    89                           const char *pcszReplace);
    90 
    91     ULONG strhWords(PSZ psz);
     73    PSZ XWPENTRY strhExtract(PSZ pszBuf,
     74                             CHAR cOpen,
     75                             CHAR cClose,
     76                             PSZ *ppEnd);
     77
     78    PSZ XWPENTRY strhQuote(PSZ pszBuf,
     79                           CHAR cQuote,
     80                           PSZ *ppEnd);
     81
     82    ULONG XWPENTRY strhStrip(PSZ psz);
     83
     84    PSZ XWPENTRY strhins(const char *pcszBuffer,
     85                         ULONG ulInsertOfs,
     86                         const char *pcszInsert);
     87
     88    ULONG XWPENTRY strhFindReplace(PSZ *ppszBuf,
     89                                   PULONG pulOfs,
     90                                   const char *pcszSearch,
     91                                   const char *pcszReplace);
     92
     93    ULONG XWPENTRY strhWords(PSZ psz);
    9294
    9395    #define STRH_BEGIN_CHARS    "\x0d\x0a "
    9496    #define STRH_END_CHARS      "\x0d\x0a /-"
    9597
    96     BOOL strhGetWord(PSZ *ppszStart,
    97                      const char *pLimit,
    98                      const char *pcszBeginChars,
    99                      const char *pcszEndChars, //  = "\x0d\x0a /-";
    100                      PSZ *ppszEnd);
    101 
    102     BOOL strhIsWord(const char *pcszBuf,
    103                     const char *p,
    104                     ULONG cbSearch,
    105                     const char *pcszBeginChars,
    106                     const char *pcszEndChars);
    107 
    108     PSZ strhFindWord(const char *pszBuf,
    109                      const char *pszSearch,
    110                      const char *pcszBeginChars,
    111                      const char *pcszEndChars);
    112 
    113     PSZ strhFindEOL(const char *pcszSearchIn, ULONG *pulOffset);
    114 
    115     PSZ strhFindNextLine(PSZ pszSearchIn, PULONG pulOffset);
    116 
    117     BOOL strhBeautifyTitle(PSZ psz);
    118 
    119     PSZ strhFindAttribValue(const char *pszSearchIn, const char *pszAttrib);
    120 
    121     PSZ strhGetNumAttribValue(const char *pszSearchIn,
    122                               const char *pszTag,
    123                               PLONG pl);
    124 
    125     PSZ strhGetTextAttr(const char *pszSearchIn, const char *pszTag, PULONG pulOffset);
    126 
    127     PSZ strhFindEndOfTag(const char *pszBeginOfTag);
    128 
    129     ULONG strhGetBlock(const char *pszSearchIn,
    130                        PULONG pulSearchOffset,
    131                        PSZ pszTag,
    132                        PSZ *ppszBlock,
    133                        PSZ *ppszAttribs,
    134                        PULONG pulOfsBeginTag,
    135                        PULONG pulOfsBeginBlock);
     98    BOOL XWPENTRY strhGetWord(PSZ *ppszStart,
     99                              const char *pLimit,
     100                              const char *pcszBeginChars,
     101                              const char *pcszEndChars, //  = "\x0d\x0a /-";
     102                              PSZ *ppszEnd);
     103
     104    BOOL XWPENTRY strhIsWord(const char *pcszBuf,
     105                             const char *p,
     106                             ULONG cbSearch,
     107                             const char *pcszBeginChars,
     108                             const char *pcszEndChars);
     109
     110    PSZ XWPENTRY strhFindWord(const char *pszBuf,
     111                              const char *pszSearch,
     112                              const char *pcszBeginChars,
     113                              const char *pcszEndChars);
     114
     115    PSZ XWPENTRY strhFindEOL(const char *pcszSearchIn, ULONG *pulOffset);
     116
     117    PSZ XWPENTRY strhFindNextLine(PSZ pszSearchIn, PULONG pulOffset);
     118
     119    BOOL XWPENTRY strhBeautifyTitle(PSZ psz);
     120
     121    PSZ XWPENTRY strhFindAttribValue(const char *pszSearchIn, const char *pszAttrib);
     122
     123    PSZ XWPENTRY strhGetNumAttribValue(const char *pszSearchIn,
     124                                       const char *pszTag,
     125                                       PLONG pl);
     126
     127    PSZ XWPENTRY strhGetTextAttr(const char *pszSearchIn, const char *pszTag, PULONG pulOffset);
     128
     129    PSZ XWPENTRY strhFindEndOfTag(const char *pszBeginOfTag);
     130
     131    ULONG XWPENTRY strhGetBlock(const char *pszSearchIn,
     132                                PULONG pulSearchOffset,
     133                                PSZ pszTag,
     134                                PSZ *ppszBlock,
     135                                PSZ *ppszAttribs,
     136                                PULONG pulOfsBeginTag,
     137                                PULONG pulOfsBeginBlock);
    136138
    137139    /* ******************************************************************
     
    146148                                  PULONG pcbRoot);
    147149
    148     PSZ strhCreateDump(PBYTE pb,
    149                        ULONG ulSize,
    150                        ULONG ulIndent);
     150    PSZ XWPENTRY strhCreateDump(PBYTE pb,
     151                                ULONG ulSize,
     152                                ULONG ulIndent);
    151153
    152154    /* ******************************************************************
     
    173175    #define FNM_PATHPREFIX      256
    174176
    175     BOOL strhMatchOS2(const char *pcszMask, const char *pcszName);
    176 
    177     BOOL strhMatchExt(const char *pcszMask,
    178                       const char *pcszName,
    179                       unsigned flags);
     177    BOOL XWPENTRY strhMatchOS2(const char *pcszMask, const char *pcszName);
     178
     179    BOOL XWPENTRY strhMatchExt(const char *pcszMask,
     180                               const char *pcszName,
     181                               unsigned flags);
    180182
    181183    /* ******************************************************************
     
    185187     ********************************************************************/
    186188
    187     void* strhmemfind(const void *in_block,
    188                       size_t block_size,
    189                       const void *in_pattern,
    190                       size_t pattern_size,
    191                       size_t *shift,
    192                       BOOL *repeat_find);
    193 
    194     char* strhtxtfind (const char *string,
    195                        const char *pattern);
     189    void* XWPENTRY strhmemfind(const void *in_block,
     190                               size_t block_size,
     191                               const void *in_pattern,
     192                               size_t pattern_size,
     193                               size_t *shift,
     194                               BOOL *repeat_find);
     195
     196    char* XWPENTRY strhtxtfind (const char *string,
     197                                const char *pattern);
    196198
    197199#endif
  • trunk/include/helpers/threads.h

    r113 r115  
    4848        ULONG   cbStruct;
    4949        void*   pThreadFunc;    // as passed to thrCreate, really a PTHREADFUNC
    50         PULONG  ptidRunning;      // as passed to thrCreate V0.9.12 (2001-05-20) [umoeller]
     50        volatile unsigned long *ptidRunning;
     51                                // as passed to thrCreate V0.9.12 (2001-05-20) [umoeller]
    5152        const char *pcszThreadName; // as passed to thrCreate
    5253        ULONG   flFlags;        // as passed to thrCreate
     
    7374    ULONG XWPENTRY thrCreate(PTHREADINFO pti,
    7475                             PTHREADFUNC pfn,
    75                              PULONG pfRunning,
     76                             volatile unsigned long *ptidRunning,
    7677                             const char *pcszThreadName,
    7778                             ULONG flFlags,
Note: See TracChangeset for help on using the changeset viewer.