Changeset 113 for trunk/include/helpers


Ignore:
Timestamp:
Oct 23, 2001, 11:25:46 PM (24 years ago)
Author:
umoeller
Message:

Misc updates.

Location:
trunk/include/helpers
Files:
33 edited

Legend:

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

    r41 r113  
    99 *@@include #define INCL_WINWINDOWMGR
    1010 *@@include #include <os2.h>
    11  *@@include #include "animate.h"
     11 *@@include #include "helpers\animate.h"
    1212 */
    1313
  • trunk/include/helpers/apps.h

    r108 r113  
    99 *@@include #define INCL_WINPROGRAMLIST
    1010 *@@include #include <os2.h>
    11  *@@include #include "apps.h"
     11 *@@include #include "helpers\apps.h"
    1212 */
    1313
     
    9898        #define APP_RUN_SEPARATE        0x0008
    9999
    100         HAPP XWPENTRY appStartApp(HWND hwndNotify,
    101                                   const PROGDETAILS *pcProgDetails,
    102                                   ULONG ulFlags);
     100        APIRET XWPENTRY appStartApp(HWND hwndNotify,
     101                                    const PROGDETAILS *pcProgDetails,
     102                                    ULONG ulFlags,
     103                                    HAPP *phapp);
     104
     105        BOOL XWPENTRY appWaitForApp(HWND hwndNotify,
     106                                    HAPP happ,
     107                                    PULONG pulExitCode);
     108
     109        HAPP XWPENTRY appQuickStartApp(const char *pcszFile,
     110                                       ULONG ulProgType,
     111                                       const char *pcszArgs,
     112                                       PULONG pulExitCode);
     113
    103114    #endif
    104115
  • trunk/include/helpers/cnrh.h

    r106 r113  
    1111 *@@include #define INCL_WINSTDDRAG
    1212 *@@include #include <os2.h>
    13  *@@include #include "cnrh.h"
     13 *@@include #include "helpers\cnrh.h"
    1414 */
    1515
  • trunk/include/helpers/comctl.h

    r111 r113  
    2727 *@@include #define INCL_WINSHELLDATA
    2828 *@@include #include <os2.h>
    29  *@@include #include "comctl.h"
     29 *@@include #include "helpers\comctl.h"
    3030 */
    3131
  • trunk/include/helpers/configsys.h

    r24 r113  
    99 *@@added V0.9.7 (2001-01-15) [umoeller]
    1010 *@@include #include <os2.h>
    11  *@@include #include "xstring.h"            // for some funcs
    12  *@@include #include "configsys.h"
     11 *@@include #include "helpers\xstring.h"            // for some funcs
     12 *@@include #include "helpers\configsys.h"
    1313 */
    1414
  • trunk/include/helpers/datetime.h

    r41 r113  
    88 *
    99 *@@include #include <os2.h>
    10  *@@include #include "datetime.h"
     10 *@@include #include "helpers\datetime.h"
    1111 */
    1212
  • trunk/include/helpers/debug.h

    r41 r113  
    1313 *@@include #include <os2.h>
    1414 *@@include #include <stdio.h>
    15  *@@include #include "debug.h"
     15 *@@include #include "helpers\debug.h"
    1616 */
    1717
  • trunk/include/helpers/dosh.h

    r108 r113  
    1010 *@@include #define INCL_DOSDEVIOCTL    // for doshQueryDiskParams only
    1111 *@@include #include <os2.h>
    12  *@@include #include "dosh.h"
     12 *@@include #include "helpers\dosh.h"
    1313 */
    1414
     
    5454     *
    5555     ********************************************************************/
     56
     57    PVOID doshMalloc(ULONG cb,
     58                     APIRET *parc);
    5659
    5760    PVOID doshAllocSharedMem(ULONG ulSize,
     
    314317    BOOL doshMakeRealName(PSZ pszTarget, PSZ pszSource, CHAR cReplace, BOOL fIsFAT);
    315318
    316     ULONG doshQueryFileSize(HFILE hFile);
    317 
    318     ULONG doshQueryPathSize(PSZ pszFile);
     319    APIRET doshQueryFileSize(HFILE hFile,
     320                             PULONG pulSize);
     321
     322    APIRET doshQueryPathSize(PCSZ pcszFile,
     323                             PULONG pulSize);
    319324
    320325    APIRET doshQueryPathAttr(const char* pcszFile,
     
    340345                      PBYTE pbData);
    341346
     347    /*
     348     *@@ XFILE:
     349     *
     350     *@@added V0.9.16 (2001-10-19) [umoeller]
     351     */
     352
     353    typedef struct _XFILE
     354    {
     355        HFILE       hf;
     356        ULONG       hmtx;       // a HMTX really
     357        ULONG       cbInitial,  // intial file size on open (can be 0 if new)
     358                    cbCurrent;  // current file size (raised with each write)
     359    } XFILE, *PXFILE;
     360
     361    #define XOPEN_READ_EXISTING             1
     362    #define XOPEN_READWRITE_APPEND          2
     363    #define XOPEN_READWRITE_NEW             3
     364
     365    APIRET doshOpen(const char *pcszFilename,
     366                    ULONG ulOpenMode,
     367                    PULONG pcbFile,
     368                    PXFILE *ppFile);
     369
     370    APIRET doshWrite(PXFILE pFile,
     371                     PCSZ pcsz,
     372                     ULONG cb);
     373
     374    APIRET doshWriteLogEntry(PXFILE pFile,
     375                             const char* pcszFormat,
     376                             ...);
     377
     378    APIRET doshClose(PXFILE *ppFile);
     379
    342380    APIRET doshLoadTextFile(const char *pcszFile,
    343381                            PSZ* ppszContent);
     
    355393                             PSZ pszBackup);
    356394
    357     HFILE doshOpenLogFile(const char* pcszFilename);
    358 
    359     APIRET doshWriteToLogFile(HFILE hfLog, const char* pcsz);
    360395
    361396    /* ******************************************************************
     
    395430    typedef ULONG XWPENTRY DOSHMYTID(VOID);
    396431    typedef DOSHMYTID *PDOSHMYTID;
    397 
    398     APIRET doshFindExecutable(const char *pcszCommand,
    399                               PSZ pszExecutable,
    400                               ULONG cbExecutable,
    401                               const char **papcszExtensions,
    402                               ULONG cExtensions);
    403432
    404433    APIRET doshExecVIO(const char *pcszExecWithArgs,
     
    816845    APIRET doshExecFreeResources(PFSYSRESOURCE paResources);
    817846
     847    APIRET doshSearchPath(const char *pcszPath,
     848                          const char *pcszFile,
     849                          PSZ pszExecutable,
     850                          ULONG cbExecutable);
     851
     852    APIRET doshFindExecutable(const char *pcszCommand,
     853                              PSZ pszExecutable,
     854                              ULONG cbExecutable,
     855                              const char **papcszExtensions,
     856                              ULONG cExtensions);
     857
    818858    /********************************************************************
    819859     *
  • trunk/include/helpers/eah.h

    r14 r113  
    88 *
    99 *@@include #include <os2.h>
    10  *@@include #include "eah.h"
     10 *@@include #include "helpers\eah.h"
    1111 */
    1212
  • trunk/include/helpers/ensure.h

    r56 r113  
    5858 *            numbering.
    5959 *
    60  *@@include #include "ensure.h"
     60 *@@include #include "helpers\ensure.h"
    6161 */
    6262
  • trunk/include/helpers/except.h

    r81 r113  
    1212 *@@include #include <stdio.h>
    1313 *@@include #include <setjmp.h>
    14  *@@include #include "except.h"
     14 *@@include #include "helpers\except.h"
    1515 */
    1616
  • trunk/include/helpers/gpih.h

    r111 r113  
    99 *@@include #define INCL_GPILOGCOLORTABLE       // for some funcs
    1010 *@@include #include <os2.h>
    11  *@@include #include "gpih.h"
     11 *@@include #include "helpers\gpih.h"
    1212 */
    1313
  • trunk/include/helpers/linklist.h

    r91 r113  
    77 *            numbering.
    88 *
    9  *@@include #include "linklist.h"
     9 *@@include #include "helpers\linklist.h"
    1010 */
    1111
  • trunk/include/helpers/math.h

    r87 r113  
    66 *            numbering.
    77 *
    8  *@@include #include "math.h"
     8 *@@include #include "helpers\math.h"
    99 */
    1010
  • trunk/include/helpers/memdebug.h

    r91 r113  
    2020 *
    2121 *@@include #include <os2.h>
    22  *@@include #include "memdebug.h"
     22 *@@include #include "helpers\memdebug.h"
    2323 */
    2424
  • trunk/include/helpers/nls.h

    r109 r113  
    99 *@@include #define INCL_DOSDATETIME
    1010 *@@include #include <os2.h>
    11  *@@include #include "nls.h"
     11 *@@include #include "helpers\nls.h"
    1212 */
    1313
  • trunk/include/helpers/prfh.h

    r108 r113  
    1313 *@@include #include <os2.h>
    1414 *@@include #include <stdio.h>
    15  *@@include #include "prfh.h"
     15 *@@include #include "helpers\prfh.h"
    1616 */
    1717
  • trunk/include/helpers/procstat.h

    r64 r113  
    99 *
    1010 *@@include #include <os2.h>
    11  *@@include #include "procstat.h"
     11 *@@include #include "helpers\procstat.h"
    1212 */
    1313
  • trunk/include/helpers/semaphores.h

    r77 r113  
    99 *@@include #define INCL_DOSSEMAPHORES
    1010 *@@include #include <os2.h>
    11  *@@include #include "semaphores.h"
     11 *@@include #include "helpers\semaphores.h"
    1212 */
    1313
  • trunk/include/helpers/shapewin.h

    r41 r113  
    99 *@@include #define INCL_GPIBITMAPS
    1010 *@@include #include <os2.h>
    11  *@@include #include "shapewin.h"
     11 *@@include #include "helpers\shapewin.h"
    1212 */
    1313
  • trunk/include/helpers/standards.h

    r53 r113  
    88 *            numbering.
    99 *
    10  *@@include #include "standards.h"
     10 *@@include #include "helpers\standards.h"
    1111 */
    1212
  • trunk/include/helpers/stringh.h

    r108 r113  
    99 *@@include #define INCL_DOSDATETIME
    1010 *@@include #include <os2.h>
    11  *@@include #include "stringh.h"
     11 *@@include #include "helpers\stringh.h"
    1212 */
    1313
  • trunk/include/helpers/syssound.h

    r59 r113  
    99 *@@include #define INCL_WINSHELLDATA
    1010 *@@include #include <os2.h>
    11  *@@include #include "syssound.h"
     11 *@@include #include "helpers\syssound.h"
    1212 */
    1313
  • trunk/include/helpers/textv_html.h

    r21 r113  
    2020 *
    2121 *@@include #include <os2.h>
    22  *@@include #include "linklist.h"
    23  *@@include #include "textv_html.h"
     22 *@@include #include "helpers\linklist.h"
     23 *@@include #include "helpers\textv_html.h"
    2424 */
    2525
  • trunk/include/helpers/textview.h

    r85 r113  
    2121 *@@include #define INCL_SPL        // for printing functions
    2222 *@@include #include <os2.h>
    23  *@@include #include "linklist.h"   // for device-independent functions
    24  *@@include #include "xstring.h"    // for device-independent functions
    25  *@@include #include "textview.h"
     23 *@@include #include "helpers\linklist.h"   // for device-independent functions
     24 *@@include #include "helpers\xstring.h"    // for device-independent functions
     25 *@@include #include "helpers\textview.h"
    2626 */
    2727
  • trunk/include/helpers/threads.h

    r86 r113  
    99 *@@include #define INCL_DOSPROCESS
    1010 *@@include #include <os2.h>
    11  *@@include #include "threads.h"
     11 *@@include #include "helpers\threads.h"
    1212 */
    1313
  • trunk/include/helpers/timer.h

    r64 r113  
    99 *@@include #define INCL_DOSPROCESS
    1010 *@@include #include <os2.h>
    11  *@@include #include "threads.h"
     11 *@@include #include "helpers\threads.h"
    1212 */
    1313
  • trunk/include/helpers/tmsgfile.h

    r108 r113  
    1010 *
    1111 *@@include #include <os2.h>
    12  *@@include #include "tmsgfile.h"
     12 *@@include #include "helpers\tree.h"
     13 *@@include #include "helpers\xstring.h"
     14 *@@include #include "helpers\tmsgfile.h"
    1315 */
    1416
  • trunk/include/helpers/tree.h

    r108 r113  
    1515    #if (!defined OS2_INCLUDED) && (!defined _OS2_H) && (!defined __SIMPLES_DEFINED)   // changed V0.9.0 (99-10-22) [umoeller]
    1616        typedef unsigned long BOOL;
     17        typedef unsigned long ULONG;
     18        typedef long *PLONG;
    1719        #define TRUE (BOOL)1
    1820        #define FALSE (BOOL)0
     
    5254        nodeColor       color;          // the node's color (BLACK, RED)
    5355
    54         unsigned long   ulKey;          // the node's key (data)
     56        ULONG           ulKey;          // the node's key (data)
    5557
    5658    } TREE, *PTREE;
     
    6769    #define STATUS_INVALID_NODE         -2
    6870
    69     typedef int TREEENTRY FNTREE_COMPARE(unsigned long ul1, unsigned long ul2);
     71    typedef int TREEENTRY FNTREE_COMPARE(ULONG ul1, ULONG ul2);
    7072
    7173    //  Function prototypes
    72     void treeInit(TREE **root);
     74    void treeInit(TREE **root,
     75                  PLONG plCount);
    7376
    74     int TREEENTRY treeCompareKeys(unsigned long  ul1, unsigned long ul2);
     77    int TREEENTRY treeCompareKeys(ULONG  ul1, ULONG ul2);
    7578
    76     int TREEENTRY treeCompareStrings(unsigned long  ul1, unsigned long ul2);
     79    int TREEENTRY treeCompareStrings(ULONG  ul1, ULONG ul2);
    7780
    7881    int treeInsert(TREE **root,
     82                   PLONG plCount,
    7983                   TREE *x,
    8084                   FNTREE_COMPARE *pfnCompare);
    8185
    8286    int treeDelete(TREE **root,
     87                   PLONG plCount,
    8388                   TREE *z);
    8489
    8590    TREE* treeFind(TREE *root,
    86                    unsigned long key,
     91                   ULONG key,
    8792                   FNTREE_COMPARE *pfnCompare);
    8893
     
    96101
    97102    TREE** treeBuildArray(TREE* pRoot,
    98                           unsigned long *pulCount);
     103                          PLONG plCount);
    99104
    100105#endif
  • trunk/include/helpers/winh.h

    r111 r113  
    4343 *@@include #define INCL_WINHELP            // for help manager helpers
    4444 *@@include #include <os2.h>
    45  *@@include #include "winh.h"
     45 *@@include #include "helpers\winh.h"
    4646 */
    4747
  • trunk/include/helpers/wphandle.h

    r108 r113  
    1414 *@@include #define INCL_WINWORKPLACE
    1515 *@@include #include <os2.h>
    16  *@@include #include "wphandle.h"
     16 *@@include #include "helpers\wphandle.h"
    1717 */
    1818
    19 /*      This file Copyright (C) 1997-2000 Ulrich M”ller,
    20  *                                        Henk Kelder.
     19/*      This file Copyright (C) 1997-2001 Ulrich M”ller.
    2120 *      This file is part of the "XWorkplace helpers" source package.
    2221 *      This is free software; you can redistribute it and/or modify
     
    5150    #define ERROR_WPH_CORRUPT_HANDLES_DATA          (ERROR_WPH_FIRST +   5)
    5251    #define ERROR_WPH_INVALID_PARENT_HANDLE         (ERROR_WPH_FIRST +   6)
     52    #define ERROR_WPH_CANNOT_FIND_HANDLE            (ERROR_WPH_FIRST +   7)
     53    #define ERROR_WPH_DRIV_TREEINSERT_FAILED        (ERROR_WPH_FIRST +   8)
     54    #define ERROR_WPH_NODE_TREEINSERT_FAILED        (ERROR_WPH_FIRST +   9)
     55    #define ERROR_WPH_NODE_BEFORE_DRIV              (ERROR_WPH_FIRST +  10)
     56    #define ERROR_WPH_NO_MATCHING_DRIVE_BLOCK       (ERROR_WPH_FIRST +  11)
     57    #define ERROR_WPH_NO_MATCHING_ROOT_DIR          (ERROR_WPH_FIRST +  12)
    5358
    5459    /* ******************************************************************
     
    95100        USHORT  usUnknown2[2];
    96101        CHAR    szName[1];
    97     } DRIV, *PDRIV;
     102    } DRIVE, *PDRIVE;
    98103
    99104    #pragma pack()
    100105
    101     /*
    102      *@@ WPHANDLESBUF:
    103      *      structure created by wphLoadHandles.
    104      *
    105      *@@added V0.9.16 (2001-10-02) [umoeller]
    106      */
    107 
    108     typedef struct _WPHANDLESBUF
    109     {
    110         PBYTE       pbData;         // ptr to all handles (buffers from OS2SYS.INI)
    111         ULONG       cbData;         // byte count of *p
    112 
    113         USHORT      usHiwordAbstract,   // hiword for WPAbstract handles
    114                     usHiwordFileSystem; // hiword for WPFileSystem handles
    115 
    116         PNODE       NodeHashTable[65536];
    117         BOOL        fNodeHashTableValid;    // TRUE after wphRebuildNodeHashTable
    118 
    119     } HANDLESBUF, *PHANDLESBUF;
     106    /* ******************************************************************
     107     *
     108     *   Private declarations
     109     *
     110     ********************************************************************/
     111
     112    #ifdef INCLUDE_WPHANDLE_PRIVATE
     113
     114        /*
     115         *@@ DRIVETREENODE:
     116         *
     117         *@@added V0.9.16 (2001-10-19) [umoeller]
     118         */
     119
     120        typedef struct _DRIVETREENODE
     121        {
     122            TREE        Tree;       // ulKey points to the DRIVE.szName
     123                                    // (null terminated)
     124            PDRIVE      pDriv;      // actual DRIVE node
     125
     126            TREE        *ChildrenTree;  // NODETREENODE's, if any
     127            LONG        cChildren;
     128
     129        } DRIVETREENODE, *PDRIVETREENODE;
     130
     131        /*
     132         *@@ NODETREENODE:
     133         *
     134         *@@added V0.9.16 (2001-10-19) [umoeller]
     135         */
     136
     137        typedef struct _NODETREENODE
     138        {
     139            TREE        Tree;       // ulKey points to the NODE.szName
     140                                    // (null terminated)
     141            PNODE       pNode;      // actual NODE node
     142
     143            TREE        *ChildrenTree;  // NODETREENODE's, if any
     144            LONG        cChildren;
     145
     146        } NODETREENODE, *PNODETREENODE;
     147
     148        /*
     149         *@@ WPHANDLESBUF:
     150         *      structure created by wphLoadHandles.
     151         *
     152         *      The composed BLOCKs in the handles buffer make up a tree of
     153         *      DRIVE and NODE structures (see wphandle.h). Each NODE stands
     154         *      for either a directory or a file. (We don't care about the
     155         *      DRIVE structures because the root directory gets a NODE also.)
     156         *      Each NODE contains the non-qualified file name, an fshandle,
     157         *      and the fshandle of its parent NODE.
     158         *
     159         *@@added V0.9.16 (2001-10-02) [umoeller]
     160         */
     161
     162        typedef struct _WPHANDLESBUF
     163        {
     164            PBYTE       pbData;         // ptr to all handles (buffers from OS2SYS.INI)
     165            ULONG       cbData;         // byte count of *p
     166
     167            USHORT      usHiwordAbstract,   // hiword for WPAbstract handles
     168                        usHiwordFileSystem; // hiword for WPFileSystem handles
     169
     170            BOOL        fCacheValid;            // TRUE after wphRebuildNodeHashTable()
     171            PNODETREENODE NodeHashTable[65536]; // hash table with all nodes sorted by handle;
     172                                                // if item is NULL, no handle is assigned
     173            TREE        *DrivesTree;          // DRIVETREENODE structs really
     174            LONG        cDrives;
     175
     176            LINKLIST    llDuplicateHandles;     // linked list of NODETREENODE's that
     177                                                // have an fshandle that was already
     178                                                // occupied (i.e. same fshandle for two
     179                                                // NODEs)
     180            LINKLIST    llDuplicateShortNames;
     181
     182        } HANDLESBUF, *PHANDLESBUF;
     183
     184    #endif
    120185
    121186    /* ******************************************************************
     
    124189     *
    125190     ********************************************************************/
     191
     192    typedef unsigned long HHANDLES;
    126193
    127194    APIRET wphQueryActiveHandles(HINI hiniSystem,
     
    132199                                      PUSHORT pusHiwordFileSystem);
    133200
    134     APIRET wphRebuildNodeHashTable(PHANDLESBUF pHandlesBuf);
     201    APIRET wphRebuildNodeHashTable(HHANDLES hHandles);
    135202
    136203    APIRET wphLoadHandles(HINI hiniUser,
    137204                          HINI hiniSystem,
    138205                          const char *pcszActiveHandles,
    139                           PHANDLESBUF *ppHandlesBuf);
    140 
    141     APIRET wphFreeHandles(PHANDLESBUF *ppHandlesBuf);
     206                          HHANDLES *phHandles);
     207
     208    APIRET wphFreeHandles(HHANDLES *phHandles);
    142209
    143210    APIRET wphQueryHandleFromPath(HINI hiniUser,
     
    146213                                  HOBJECT *phobj);
    147214
    148     APIRET wphComposePath(PHANDLESBUF pHandlesBuf,
     215    APIRET wphComposePath(HHANDLES hHandles,
    149216                          USHORT usHandle,
    150217                          PSZ pszFilename,
  • trunk/include/helpers/xprf.h

    r64 r113  
    1111 *@@include #define INCL_WINSHELLDATA
    1212 *@@include #include <os2.h>
    13  *@@include #include "xprf.h"
     13 *@@include #include "helpers\xprf.h"
    1414 */
    1515
  • trunk/include/helpers/xstring.h

    r108 r113  
    99 *@@include #define INCL_DOSDATETIME
    1010 *@@include #include <os2.h>
    11  *@@include #include "xstring.h"
     11 *@@include #include "helpers\xstring.h"
    1212 */
    1313
Note: See TracChangeset for help on using the changeset viewer.