Changeset 108 for trunk/include/helpers


Ignore:
Timestamp:
Oct 13, 2001, 7:57:58 PM (24 years ago)
Author:
umoeller
Message:

Lots of updates from the last week for conditional compiles and other stuff.

Location:
trunk/include/helpers
Files:
9 edited

Legend:

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

    r101 r108  
    7070    APIRET appFreeEnvironment(PDOSENVIRONMENT pEnv);
    7171
     72    #ifdef INCL_WINPROGRAMLIST
     73        // additional PROG_* flags for appQueryAppType
     74        // #define PROG_XWP_DLL            998      // dynamic link library
     75                    // removed, PROG_DLL exists already
     76                    // V0.9.16 (2001-10-06)
     77
     78        APIRET appQueryAppType(const char *pcszExecutable,
     79                                PULONG pulDosAppType,
     80                                PULONG pulWinAppType);
     81
     82        PCSZ appDescribeAppType(PROGCATEGORY progc);
     83
     84        ULONG appIsWindowsApp(ULONG ulProgCategory);
     85
    7286    /* ******************************************************************
    7387     *
     
    7690     ********************************************************************/
    7791
    78     #ifdef INCL_WINPROGRAMLIST
    79         // additional PROG_* flags for appQueryAppType
    80         #define PROG_XWP_DLL            998      // dynamic link library
    81 
    82         APIRET appQueryAppType(const char *pcszExecutable,
    83                                 PULONG pulDosAppType,
    84                                 PULONG pulWinAppType);
    85 
    86         ULONG appIsWindowsApp(ULONG ulProgCategory);
    8792
    8893        PSZ appQueryDefaultWin31Environment(VOID);
  • trunk/include/helpers/dosh.h

    r94 r108  
    836836    } LVMINFO, *PLVMINFO;
    837837
    838     #define DOSH_PARTITIONS_LIMIT   10
     838    /* #define DOSH_PARTITIONS_LIMIT   10
    839839
    840840    #define PAR_UNUSED      0x00    // Unused
     
    881881    #define PAR_FREEBSD     0xA5    // FreeBSD
    882882    #define PAR_BBT         0xFF    // BBT
     883    */
    883884
    884885    // one-byte alignment
     
    966967    typedef struct _PARTITIONINFO
    967968    {
    968         BYTE  bDisk;                 // drive number
    969         CHAR  cLetter;               // probable drive letter or ' ' if none
    970         BYTE  bFSType;               // file system type
    971         CHAR  szFSType[10];          // file system name (created by us)
    972         BOOL  fPrimary;              // primary partition?
    973         BOOL  fBootable;             // bootable by Boot Manager?
    974         CHAR  szBootName[9];         // Boot Manager name, if (fBootable)
    975         ULONG ulSize;                // size MBytes
     969        BYTE    bDisk;                 // drive number
     970        CHAR    cLetter;               // probable drive letter or ' ' if none
     971        BYTE    bFSType;               // file system type
     972        PCSZ    pcszFSType;            // file system name (as returned by
     973                                       // doshType2FSName, can be NULL!)
     974        BOOL    fPrimary;              // primary partition?
     975        BOOL    fBootable;             // bootable by Boot Manager?
     976        CHAR    szBootName[9];         // Boot Manager name, if (fBootable)
     977        ULONG   ulSize;                // size MBytes
    976978        PPARTITIONINFO pNext;        // next info or NULL if last
    977979    } PARTITIONINFO;
  • trunk/include/helpers/prfh.h

    r71 r108  
    3535    #define PRFH_HEADER_INCLUDED
    3636
    37     /* common error codes used by the prfh* functions */
     37    /* ******************************************************************
     38     *
     39     *   Errors
     40     *
     41     ********************************************************************/
    3842
    3943    #define PRFERR_DATASIZE     10001   // couldn't query data size for key
     
    4751    #define PRFERR_INVALID_KEY  10009
    4852    #define PRFERR_KEY_EXISTS   10010
     53
     54    /* ******************************************************************
     55     *
     56     *   Strings
     57     *
     58     ********************************************************************/
     59
     60    // DECLARE_PRFH_STRING is a handy macro which saves us from
     61    // keeping two string lists in both the .h and the .c file.
     62    // If this include file is included from the .c file, the
     63    // string is defined as a global variable. Otherwise
     64    // it is only declared as "extern" so other files can
     65    // see it.
     66
     67    #ifdef INCLUDE_PRFH_PRIVATE
     68        #define DECLARE_PRFH_STRING(str, def) const char *str = def
     69    #else
     70        #define DECLARE_PRFH_STRING(str, def) extern const char *str;
     71    #endif
     72
     73    /*
     74     * OS2.INI applications
     75     *
     76     */
     77
     78    // NLS settings section
     79    DECLARE_PRFH_STRING(PMINIAPP_NATIONAL, "PM_National");
     80
     81    // system font settings section
     82    DECLARE_PRFH_STRING(PMINIAPP_SYSTEMFONTS, "PM_SystemFonts");
     83    DECLARE_PRFH_STRING(PMINIKEY_DEFAULTFONT, "DefaultFont");
     84    DECLARE_PRFH_STRING(PMINIKEY_ICONTEXTFONT, "IconText");
     85    DECLARE_PRFH_STRING(PMINIKEY_MENUSFONT, "Menus");
     86
     87    // installed fonts secsion
     88    DECLARE_PRFH_STRING(PMINIAPP_FONTS, "PM_Fonts");
     89
     90    // general WPS settings
     91    DECLARE_PRFH_STRING(WPINIAPP_WORKPLACE, "PM_Workplace");
     92    DECLARE_PRFH_STRING(WPINIKEY_MENUBAR, "FolderMenuBar");
     93
     94    // abstract objects per folder handle
     95    DECLARE_PRFH_STRING(WPINIAPP_FDRCONTENT, "PM_Abstract:FldrContent");
     96    // all defined abstract objects on the system
     97    DECLARE_PRFH_STRING(WPINIAPP_OBJECTS, "PM_Abstract:Objects");
     98    // their icons, if set individually
     99    DECLARE_PRFH_STRING(WPINIAPP_ICONS, "PM_Abstract:Icons");
     100
     101    // object ID's (<WP_DESKTOP> etc.)
     102    DECLARE_PRFH_STRING(WPINIAPP_LOCATION, "PM_Workplace:Location");
     103
     104    // folder positions
     105    DECLARE_PRFH_STRING(WPINIAPP_FOLDERPOS, "PM_Workplace:FolderPos");
     106
     107    // palette positions
     108    DECLARE_PRFH_STRING(WPINIAPP_PALETTEPOS, "PM_Workplace:PalettePos");
     109    // ???
     110    DECLARE_PRFH_STRING(WPINIAPP_STATUSPOS, "PM_Workplace:StatusPos");
     111    // startup folders
     112    DECLARE_PRFH_STRING(WPINIAPP_STARTUP, "PM_Workplace:Startup");
     113    // all the defined templates on the system
     114    DECLARE_PRFH_STRING(WPINIAPP_TEMPLATES, "PM_Workplace:Templates");
     115
     116    // all work area folders
     117    DECLARE_PRFH_STRING(WPINIAPP_WORKAREARUNNING, "FolderWorkareaRunningObjects");
     118    // spooler windows ?!?
     119    DECLARE_PRFH_STRING(WPINIAPP_JOBCNRPOS, "PM_PrintObject:JobCnrPos");
     120
     121    // associations by type ("Plain Text")
     122    DECLARE_PRFH_STRING(WPINIAPP_ASSOCTYPE, "PMWP_ASSOC_TYPE");
     123    // associations by filter ("*.txt")
     124    DECLARE_PRFH_STRING(WPINIAPP_ASSOCFILTER, "PMWP_ASSOC_FILTER");
     125    // checksums ?!?
     126    DECLARE_PRFH_STRING(WPINIAPP_ASSOC_CHECKSUM, "PMWP_ASSOC_CHECKSUM");
     127
     128    /*
     129     * OS2SYS.INI applications
     130     *
     131     */
     132
     133    DECLARE_PRFH_STRING(WPINIAPP_ACTIVEHANDLES, "PM_Workplace:ActiveHandles");
     134    DECLARE_PRFH_STRING(WPINIAPP_HANDLES, "PM_Workplace:Handles");
     135    DECLARE_PRFH_STRING(WPINIAPP_HANDLESAPP, "HandlesAppName");
     136
     137    /*
     138     * some default WPS INI keys:
     139     *
     140     */
     141
     142    DECLARE_PRFH_STRING(WPOBJID_DESKTOP, "<WP_DESKTOP>");
     143
     144    DECLARE_PRFH_STRING(WPOBJID_KEYB, "<WP_KEYB>");
     145    DECLARE_PRFH_STRING(WPOBJID_MOUSE, "<WP_MOUSE>");
     146    DECLARE_PRFH_STRING(WPOBJID_CNTRY, "<WP_CNTRY>");
     147    DECLARE_PRFH_STRING(WPOBJID_SOUND, "<WP_SOUND>");
     148    DECLARE_PRFH_STRING(WPOBJID_SYSTEM, "<WP_SYSTEM>"); // V0.9.9
     149    DECLARE_PRFH_STRING(WPOBJID_POWER, "<WP_POWER>");
     150    DECLARE_PRFH_STRING(WPOBJID_WINCFG, "<WP_WINCFG>");
     151
     152    DECLARE_PRFH_STRING(WPOBJID_HIRESCLRPAL, "<WP_HIRESCLRPAL>");
     153    DECLARE_PRFH_STRING(WPOBJID_LORESCLRPAL, "<WP_LORESCLRPAL>");
     154    DECLARE_PRFH_STRING(WPOBJID_FNTPAL, "<WP_FNTPAL>");
     155    DECLARE_PRFH_STRING(WPOBJID_SCHPAL96, "<WP_SCHPAL96>");
     156
     157    DECLARE_PRFH_STRING(WPOBJID_LAUNCHPAD, "<WP_LAUNCHPAD>");
     158    DECLARE_PRFH_STRING(WPOBJID_WARPCENTER, "<WP_WARPCENTER>");
     159
     160    DECLARE_PRFH_STRING(WPOBJID_SPOOL, "<WP_SPOOL>");
     161    DECLARE_PRFH_STRING(WPOBJID_VIEWER, "<WP_VIEWER>");
     162    DECLARE_PRFH_STRING(WPOBJID_SHRED, "<WP_SHRED>");
     163    DECLARE_PRFH_STRING(WPOBJID_CLOCK, "<WP_CLOCK>");
     164
     165    DECLARE_PRFH_STRING(WPOBJID_START, "<WP_START>");
     166    DECLARE_PRFH_STRING(WPOBJID_TEMPS, "<WP_TEMPS>");
     167    DECLARE_PRFH_STRING(WPOBJID_DRIVES, "<WP_DRIVES>");
     168
     169    /* ******************************************************************
     170     *
     171     *   Functions
     172     *
     173     ********************************************************************/
    49174
    50175    APIRET prfhQueryKeysForApp(HINI hIni,
     
    75200    LONG prfhQueryColor(const char *pcszKeyName, const char *pcszDefault);
    76201
    77     /*
    78      *@@ COUNTRYSETTINGS:
    79      *      structure used for returning country settings
    80      *      with prfhQueryCountrySettings.
    81      */
    82 
    83     typedef struct _COUNTRYSETTINGS
    84     {
    85         ULONG   ulDateFormat,
    86                         // date format:
    87                         // --  0   mm.dd.yyyy  (English)
    88                         // --  1   dd.mm.yyyy  (e.g. German)
    89                         // --  2   yyyy.mm.dd  (Japanese)
    90                         // --  3   yyyy.dd.mm
    91                 ulTimeFormat;
    92                         // time format:
    93                         // --  0   12-hour clock
    94                         // --  >0  24-hour clock
    95         CHAR    cDateSep,
    96                         // date separator (e.g. '/')
    97                 cTimeSep,
    98                         // time separator (e.g. ':')
    99                 cDecimal,
    100                         // decimal separator (e.g. '.')
    101                 cThousands;
    102                         // thousands separator (e.g. ',')
    103     } COUNTRYSETTINGS, *PCOUNTRYSETTINGS;
    104 
    105     VOID prfhQueryCountrySettings(PCOUNTRYSETTINGS pcs);
    106 
    107202    APIRET prfhCopyKey(HINI hiniSource,
    108203                       const char *pcszSourceApp,
  • trunk/include/helpers/stringh.h

    r104 r108  
    9191    ULONG strhWords(PSZ psz);
    9292
    93     PSZ APIENTRY strhThousandsULong(PSZ pszTarget, ULONG ul, CHAR cThousands);
    94     typedef PSZ APIENTRY STRHTHOUSANDSULONG(PSZ pszTarget, ULONG ul, CHAR cThousands);
    95     typedef STRHTHOUSANDSULONG *PSTRHTHOUSANDSULONG;
    96 
    97     PSZ strhThousandsDouble(PSZ pszTarget, double dbl, CHAR cThousands);
    98 
    99     PSZ strhVariableDouble(PSZ pszTarget, double dbl, PSZ pszUnits,
    100                            CHAR cThousands);
    101 
    102     VOID strhFileDate(PSZ pszBuf,
    103                       FDATE *pfDate,
    104                       ULONG ulDateFormat,
    105                       CHAR cDateSep);
    106 
    107     VOID strhFileTime(PSZ pszBuf,
    108                       FTIME *pfTime,
    109                       ULONG ulTimeFormat,
    110                       CHAR cTimeSep);
    111 
    112     VOID APIENTRY strhDateTime(PSZ pszDate,
    113                                PSZ pszTime,
    114                                DATETIME *pDateTime,
    115                                ULONG ulDateFormat,
    116                                CHAR cDateSep,
    117                                ULONG ulTimeFormat,
    118                                CHAR cTimeSep);
    119     typedef VOID APIENTRY STRHDATETIME(PSZ pszDate,
    120                                PSZ pszTime,
    121                                DATETIME *pDateTime,
    122                                ULONG ulDateFormat,
    123                                CHAR cDateSep,
    124                                ULONG ulTimeFormat,
    125                                CHAR cTimeSep);
    126     typedef STRHDATETIME *PSTRHDATETIME;
    127 
    12893    #define STRH_BEGIN_CHARS    "\x0d\x0a "
    12994    #define STRH_END_CHARS      "\x0d\x0a /-"
  • trunk/include/helpers/tmsgfile.h

    r102 r108  
    2020    #define TMSGFILE_HEADER_INCLUDED
    2121
    22     APIRET tmfGetMessage(PCHAR *pTable,
     22    #ifndef XSTRING_HEADER_INCLUDED
     23        #error tmsgfile.h requires xstring.h to be included first.
     24    #endif
     25
     26    #ifndef XWPTREE_INCLUDED
     27        #error tmsgfile.h requires tree.h to be included first.
     28    #endif
     29
     30    /*
     31     *@@ TMFMSGFILE:
     32     *
     33     *@@added V0.9.16 (2001-10-08) [umoeller]
     34     */
     35
     36    typedef struct _TMFMSGFILE
     37    {
     38        PSZ     pszFilename;            // copy of .TMF file name
     39
     40        XSTRING strContent;             // file's full contents (converted to C LF format)
     41
     42        TREE    *IDsTreeRoot;           // root of tree with MSGENTRY's (a TREE* really)
     43        ULONG   cIDs;                   // count of entries in the tree
     44    } TMFMSGFILE, *PTMFMSGFILE;
     45
     46    APIRET tmfOpenMessageFile(const char *pcszMessageFile,
     47                              PTMFMSGFILE *ppMsgFile);
     48
     49    APIRET tmfCloseMessageFile(PTMFMSGFILE *ppMsgFile);
     50
     51    APIRET tmfGetMessage(PTMFMSGFILE pMsgFile,
     52                         PCSZ pcszMessageName,
     53                         PXSTRING pstr,
     54                         PSZ *pTable,
     55                         ULONG cTableEntries);
     56
     57    /* APIRET tmfGetMessage(PCHAR *pTable,
    2358                         ULONG cTable,
    2459                         PBYTE pbBuffer,
     
    3570                            PCSZ pszFile,
    3671                            PULONG pcbMsg);
     72       */
    3773
    3874#endif // TMSGFILE_HEADER_INCLUDED
  • trunk/include/helpers/tree.h

    r106 r108  
    1010#endif
    1111
    12 #ifndef SFLTREE_INCLUDED               //  Allow multiple inclusions
    13     #define SFLTREE_INCLUDED
     12#ifndef XWPTREE_INCLUDED               //  Allow multiple inclusions
     13    #define XWPTREE_INCLUDED
    1414
    1515    #if (!defined OS2_INCLUDED) && (!defined _OS2_H) && (!defined __SIMPLES_DEFINED)   // changed V0.9.0 (99-10-22) [umoeller]
  • trunk/include/helpers/winh.h

    r106 r108  
    101101        #define WinQueryWindowPtr(a,b) winhQueryWindowPtr((a),(b))
    102102
    103         BOOL XWPENTRY winhSetWindowText(HWND hwnd, const char *pcsz);
    104         #define WinSetWindowText(a,b) winhSetWindowText((a),(b))
     103        BOOL XWPENTRY winhSetWindowText2(HWND hwnd, const char *pcsz);
     104        #define WinSetWindowText(a,b) winhSetWindowText2((a),(b))
    105105
    106106        BOOL XWPENTRY winhSetDlgItemText(HWND hwnd, ULONG id, const char *pcsz);
     
    758758    PSZ XWPENTRY winhQueryWindowText(HWND hwnd);
    759759
     760    BOOL XWPENTRY winhSetWindowText(HWND hwnd,
     761                                    const char *pcszFormat,
     762                                    ...);
     763
    760764    /*
    761765     *@@ winhQueryDlgItemText:
  • trunk/include/helpers/wphandle.h

    r106 r108  
    5151    #define ERROR_WPH_CORRUPT_HANDLES_DATA          (ERROR_WPH_FIRST +   5)
    5252    #define ERROR_WPH_INVALID_PARENT_HANDLE         (ERROR_WPH_FIRST +   6)
    53 
    54     /* ******************************************************************
    55      *
    56      *   Strings
    57      *
    58      ********************************************************************/
    59 
    60     // DECLARE_WPH_STRING is a handy macro which saves us from
    61     // keeping two string lists in both the .h and the .c file.
    62     // If this include file is included from the .c file, the
    63     // string is defined as a global variable. Otherwise
    64     // it is only declared as "extern" so other files can
    65     // see it.
    66 
    67     #ifdef INCLUDE_WPHANDLE_PRIVATE
    68         #define DECLARE_WPH_STRING(str, def) const char *str = def
    69     #else
    70         #define DECLARE_WPH_STRING(str, def) extern const char *str;
    71     #endif
    72 
    73     /*
    74      * OS2.INI applications
    75      *
    76      */
    77 
    78     // abstract objects per folder handle
    79     DECLARE_WPH_STRING(WPINIAPP_FDRCONTENT, "PM_Abstract:FldrContent");
    80     // all defined abstract objects on the system
    81     DECLARE_WPH_STRING(WPINIAPP_OBJECTS, "PM_Abstract:Objects");
    82     // their icons, if set individually
    83     DECLARE_WPH_STRING(WPINIAPP_ICONS, "PM_Abstract:Icons");
    84 
    85     // object ID's (<WP_DESKTOP> etc.)
    86     DECLARE_WPH_STRING(WPINIAPP_LOCATION, "PM_Workplace:Location");
    87 
    88     // folder positions
    89     DECLARE_WPH_STRING(WPINIAPP_FOLDERPOS, "PM_Workplace:FolderPos");
    90 
    91     // palette positions
    92     DECLARE_WPH_STRING(WPINIAPP_PALETTEPOS, "PM_Workplace:PalettePos");
    93     // ???
    94     DECLARE_WPH_STRING(WPINIAPP_STATUSPOS, "PM_Workplace:StatusPos");
    95     // startup folders
    96     DECLARE_WPH_STRING(WPINIAPP_STARTUP, "PM_Workplace:Startup");
    97     // all the defined templates on the system
    98     DECLARE_WPH_STRING(WPINIAPP_TEMPLATES, "PM_Workplace:Templates");
    99 
    100     // all work area folders
    101     DECLARE_WPH_STRING(WPINIAPP_WORKAREARUNNING, "FolderWorkareaRunningObjects");
    102     // spooler windows ?!?
    103     DECLARE_WPH_STRING(WPINIAPP_JOBCNRPOS, "PM_PrintObject:JobCnrPos");
    104 
    105     // associations by type ("Plain Text")
    106     DECLARE_WPH_STRING(WPINIAPP_ASSOCTYPE, "PMWP_ASSOC_TYPE");
    107     // associations by filter ("*.txt")
    108     DECLARE_WPH_STRING(WPINIAPP_ASSOCFILTER, "PMWP_ASSOC_FILTER");
    109     // checksums ?!?
    110     DECLARE_WPH_STRING(WPINIAPP_ASSOC_CHECKSUM, "PMWP_ASSOC_CHECKSUM");
    111 
    112     /*
    113      * OS2SYS.INI applications
    114      *
    115      */
    116 
    117     DECLARE_WPH_STRING(WPINIAPP_ACTIVEHANDLES, "PM_Workplace:ActiveHandles");
    118     DECLARE_WPH_STRING(WPINIAPP_HANDLES, "PM_Workplace:Handles");
    119     DECLARE_WPH_STRING(WPINIAPP_HANDLESAPP, "HandlesAppName");
    120 
    121     /*
    122      * some default WPS INI keys:
    123      *
    124      */
    125 
    126     DECLARE_WPH_STRING(WPOBJID_DESKTOP, "<WP_DESKTOP>");
    127 
    128     DECLARE_WPH_STRING(WPOBJID_KEYB, "<WP_KEYB>");
    129     DECLARE_WPH_STRING(WPOBJID_MOUSE, "<WP_MOUSE>");
    130     DECLARE_WPH_STRING(WPOBJID_CNTRY, "<WP_CNTRY>");
    131     DECLARE_WPH_STRING(WPOBJID_SOUND, "<WP_SOUND>");
    132     DECLARE_WPH_STRING(WPOBJID_SYSTEM, "<WP_SYSTEM>"); // V0.9.9
    133     DECLARE_WPH_STRING(WPOBJID_POWER, "<WP_POWER>");
    134     DECLARE_WPH_STRING(WPOBJID_WINCFG, "<WP_WINCFG>");
    135 
    136     DECLARE_WPH_STRING(WPOBJID_HIRESCLRPAL, "<WP_HIRESCLRPAL>");
    137     DECLARE_WPH_STRING(WPOBJID_LORESCLRPAL, "<WP_LORESCLRPAL>");
    138     DECLARE_WPH_STRING(WPOBJID_FNTPAL, "<WP_FNTPAL>");
    139     DECLARE_WPH_STRING(WPOBJID_SCHPAL96, "<WP_SCHPAL96>");
    140 
    141     DECLARE_WPH_STRING(WPOBJID_LAUNCHPAD, "<WP_LAUNCHPAD>");
    142     DECLARE_WPH_STRING(WPOBJID_WARPCENTER, "<WP_WARPCENTER>");
    143 
    144     DECLARE_WPH_STRING(WPOBJID_SPOOL, "<WP_SPOOL>");
    145     DECLARE_WPH_STRING(WPOBJID_VIEWER, "<WP_VIEWER>");
    146     DECLARE_WPH_STRING(WPOBJID_SHRED, "<WP_SHRED>");
    147     DECLARE_WPH_STRING(WPOBJID_CLOCK, "<WP_CLOCK>");
    148 
    149     DECLARE_WPH_STRING(WPOBJID_START, "<WP_START>");
    150     DECLARE_WPH_STRING(WPOBJID_TEMPS, "<WP_TEMPS>");
    151     DECLARE_WPH_STRING(WPOBJID_DRIVES, "<WP_DRIVES>");
    15253
    15354    /* ******************************************************************
  • trunk/include/helpers/xstring.h

    r91 r108  
    103103    typedef XSTRRESERVE *PXSTRRESERVE;
    104104
     105    void XWPENTRY xstrShrink(PXSTRING pxstr);
     106    typedef void XWPENTRY XSTRSHRINK(PXSTRING pxstr);
     107    typedef XSTRSHRINK *PXSTRSHRINK;
     108
    105109    PXSTRING XWPENTRY xstrCreate(ULONG ulPreAllocate);
    106110    typedef PXSTRING XWPENTRY XSTRCREATE(ULONG ulPreAllocate);
Note: See TracChangeset for help on using the changeset viewer.