Changeset 33


Ignore:
Timestamp:
Jul 11, 2016, 2:44:46 PM (9 years ago)
Author:
Alex Taylor
Message:

Move common functions into shared directory. Rename FUNCTIONS to rxutilex.txt.

Location:
rxutilex/trunk
Files:
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • rxutilex/trunk/Makefile

    r24 r33  
    11# Makefile for IBM C Compiler 3.x and NMAKE32.
     2
     3SHARED = ..\..\shared
     4
    25CC     = icc
    36LINK   = ilink
    47RC     = rc
    5 CFLAGS = /Ss /Q /Wuse /Gm
    6 #CFLAGS = /Ss /Q /Wuse /Gm /Gd
     8CFLAGS = /Ss /Q /Wuse /Gm /I$(SHARED) /DSZ_ERROR_NAME="\"SYS2ERR\""
     9#CFLAGS = /Ss /Q /Wuse /Gm /Gd /I$(SHARED) /DSZ_ERROR_NAME="\"SYS2ERR\""
    710LFLAGS = /NOLOGO
    811NAME   = rxutilex
     
    1518!endif
    1619
    17 $(NAME).dll : $(NAME).obj Makefile
     20$(NAME).dll : $(NAME).obj shfuncs.obj Makefile
    1821                makedesc -D"Extended REXX Utility Functions" -N"Alex Taylor" -V"^#define=SZ_VERSION,rxutilex.c" $(NAME).def
    19                 $(LINK) $(LFLAGS) $(NAME).obj $(NAME).def $(LIBS) /O:$@
     22                $(LINK) $(LFLAGS) $(NAME).obj shfuncs.obj $(NAME).def $(LIBS) /O:$@
    2023#                @dllrname.exe $@ CPPOM30=OS2OM30 /Q /R
    2124
    22 $(NAME).obj : $(NAME).c $(NAME).def Makefile
     25$(NAME).obj : $(NAME).c {$(SHARED)}shfuncs.h $(NAME).def Makefile
    2326                $(CC) $(CFLAGS) /C /Ge- $(NAME).c
     27
     28shfuncs.obj : $(SHARED)\shfuncs.c {$(SHARED)}shfuncs.h Makefile
     29                $(CC) $(CFLAGS) /C /Ge- $(SHARED)\shfuncs.c
    2430
    2531clean       :
    2632                if exist $(NAME).dll del $(NAME).dll
    2733                if exist $(NAME).obj del $(NAME).obj
     34                if exist shfuncs.obj del shfuncs.obj
    2835
    2936
  • rxutilex/trunk/rxutilex.c

    r31 r33  
    7272#include <rexxsaa.h>
    7373
     74
     75#include "shfuncs.h"
     76
     77
    7478#pragma import( DosGetPrty, "DosGetPrty", "DOSCALL1", 9 )
    7579USHORT APIENTRY16 DosGetPrty( USHORT usScope, PUSHORT pusPriority, USHORT pid );
     
    8387
    8488#define SZ_LIBRARY_NAME         "RXUTILEX"  // Name of this library
    85 #define SZ_ERROR_NAME           "SYS2ERR"   // REXX variable used to store error codes
     89//#define SZ_ERROR_NAME           "SYS2ERR"   // REXX variable used to store error codes
    8690#define SZ_VERSION              "0.1.3"     // Current version of this library
    8791
    8892// Maximum string lengths...
    89 #define US_COMPOUND_MAXZ        250                                  // ...of a compound variable
     93#ifdef NO_SHARED_SOURCE
     94    #define US_COMPOUND_MAXZ    250                                  // ...of a compound variable
     95    #define US_ERRSTR_MAXZ      250                                  // ...of an error string
     96
     97    static const char *PSZ_ZERO = "0";
     98    static const char *PSZ_ONE = "1";
     99#endif
     100
    90101#define US_INTEGER_MAXZ         12                                   // ...of a 32-bit integer string
    91102#define US_LONGLONG_MAXZ        21                                   // ...of a 64-bit integer string
    92103#define US_STEM_MAXZ          ( US_COMPOUND_MAXZ - US_INTEGER_MAXZ ) // ...of a stem
    93 #define US_ERRSTR_MAXZ          250                                  // ...of an error string
    94104#define US_PIDSTR_MAXZ        ( CCHMAXPATH + 100 )                   // ...of a process information string
    95105#define US_TIMESTR_MAXZ         256                                  // ...of a formatted time string
     
    103113#define FL_TIME_ISO8601         1
    104114#define FL_TIME_LOCALE          2
    105 
    106 static const char *PSZ_ZERO = "0";
    107 static const char *PSZ_ONE = "1";
    108115
    109116// List of functions to be registered by Sys2LoadFuncs or dropped by Sys2DropFuncs
     
    177184// Private internal functions
    178185ULONG GetProcess( PCSZ pszProgram, PSZ pszFullName, PULONG pulPID, PULONG pulPPID, PULONG pulType, PUSHORT pusPriority, PULONG pulCPU );        // 2016-02-20 SHL
    179 BOOL  SaveResultString( PRXSTRING prsResult, PCSZ pchBytes, ULONG ulBytes );    // 2016-02-20 SHL
    180 BOOL  WriteStemElement( PCSZ pszStem, ULONG ulIndex, PCSZ pszValue );   // 2016-02-20 SHL
    181 void  WriteErrorCode( ULONG ulError, PCSZ pszContext ); // 2016-02-20 SHL
     186
     187#ifdef NO_SHARED_SOURCE
     188    BOOL  SaveResultString( PRXSTRING prsResult, PCSZ pchBytes, ULONG ulBytes );    // 2016-02-20 SHL
     189    BOOL  WriteStemElement( PCSZ pszStem, ULONG ulIndex, PCSZ pszValue );   // 2016-02-20 SHL
     190    void  WriteErrorCode( ULONG ulError, PCSZ pszContext ); // 2016-02-20 SHL
     191#endif
    182192
    183193// MACROS
     
    24672477
    24682478
     2479/* MOVED */
     2480#ifdef NO_SHARED_SOURCE
     2481
    24692482/* ------------------------------------------------------------------------- *
    24702483 * SaveResultString                                                          *
     
    25942607}
    25952608
     2609#endif
  • rxutilex/trunk/rxutilex.def

    r31 r33  
    11LIBRARY     RXUTILEX INITINSTANCE TERMINSTANCE
    22DATA        MULTIPLE NONSHARED
    3 DESCRIPTION '@#Alex Taylor:0.1.3#@##1## 30 Mar 2016 18:58:46     REINFORCE::::::@@Extended REXX Utility Functions'
     3DESCRIPTION '@#Alex Taylor:0.1.3#@##1## 10 May 2016 22:01:20     REINFORCE::::::@@Extended REXX Utility Functions'
    44
    55EXPORTS     Sys2LoadFuncs
Note: See TracChangeset for help on using the changeset viewer.