From: Dirk B. <db...@us...> - 2005-04-30 08:01:12
|
Update of /cvsroot/win32forth/win32forth-extsrc/extsrc/wincon/winconcpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14791/extsrc/wincon/winconcpp Modified Files: CPP.DSP MACRO.C Log Message: New Wincon.dll now 20,312 Windows Constants available Index: MACRO.C =================================================================== RCS file: /cvsroot/win32forth/win32forth-extsrc/extsrc/wincon/winconcpp/MACRO.C,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MACRO.C 22 Dec 2004 20:26:01 -0000 1.1 --- MACRO.C 30 Apr 2005 08:01:03 -0000 1.2 *************** *** 11,32 **** // A good name must start with an uppercase letter and be // compose if uppercase letters, numbers and underscores int goodname(Token *tp) { ! unsigned int i; ! if (tp->len < 1) return 0; ! if (!isupper(tp->t[0])) return 0; ! for (i = 1; i < tp->len; i++) ! if (!(isupper(tp->t[i]) || isdigit(tp->t[i]) || tp->t[i] == '_')) return 0; return 1; } ! #define MATCH(s) if (memcmp(tp->t, s, strlen(s)) == 0) return 1; // Determine if the token following a name is a good one for us. static int goodtoken(Token *tp) { switch (tp->type) { --- 11,54 ---- // A good name must start with an uppercase letter and be // compose if uppercase letters, numbers and underscores + // + // Changed 29.04.2005 dbu: + // - All names are good + int goodname(Token *tp) { ! if( tp->len < 1 ) return 0; ! ! if( tp->t[0] == '_' && tp->t[1] == '_' ) return 0; ! /* ! if( !isupper(tp->t[0]) ) ! return 0; ! for( unsigned int i = 1; i < tp->len; i++ ) ! { ! if( !(isupper(tp->t[i]) || isdigit(tp->t[i]) || tp->t[i] == '_') ) return 0; + } + */ return 1; } ! //#define MATCH(s) if (memcmp(tp->t, s, strlen(s)) == 0) return 1; ! //#define DONT_MATCH(s) if (memcmp(tp->t, s, strlen(s)) == 0) return 0; ! ! int match( const char *s, const char *s1 ) ! { ! if( strncmp( s, s1, strlen(s1) ) == 0 ) ! return 1; ! return 0; ! } // Determine if the token following a name is a good one for us. static int goodtoken(Token *tp) { + char *eol = NULL; + int len = tp->len; + int act = 0; + switch (tp->type) { *************** *** 36,39 **** --- 58,62 ---- return 1; case NAME: + /* MATCH("STATUS_") MATCH("THREAD_") *************** *** 58,61 **** --- 81,133 ---- MATCH("MM_") MATCH("AF_") + */ + if( tp->len < 1 ) + return 0; + + // if( tp->t[0] == '_' && tp->t[1] == '_' ) + // return 0; + + // eol = strchr(tp->t, '\n'); + // if( eol ) + // len = (eol+1) - tp->t; + + for( act = 0; act <= len; act++ ) + { + if( isdigit(tp->t[act]) ) + continue; + else if( tp->t[act] == '_' ) + continue; + else if( tp->t[act] == '(' || tp->t[act] == ')' ) + continue; + else if( tp->t[act] == '|' ) + continue; + else if( tp->t[act] == '~' ) + continue; + else if( tp->t[act] == '-' || tp->t[act] == '+' ) + continue; + else if( act == len && (tp->t[act] == '\r' || tp->t[act] == '\n' ) ) + continue; + else if( tp->t[act] == '"' || tp->t[act] == ' ' || !isupper(tp->t[act]) ) + return 0; + } + + if( match( tp->t, "WINAPI" ) ) + return 0; + if( match( tp->t, "POINTER_32" ) ) + return 0; + if( match( tp->t, "DECLSPEC_" ) ) + return 0; + if( match( tp->t, "(void)0" ) ) + return 0; + if( match( tp->t, "EXTERN_C" ) ) + return 0; + if( match( tp->t, "HRESULT" ) ) + return 0; + if( match( tp->t, "__stdcall" ) ) + return 0; + if( match( tp->t, "_HRESULT_TYPEDEF_" ) ) + return 1; + + return 1; } return 0; Index: CPP.DSP =================================================================== RCS file: /cvsroot/win32forth/win32forth-extsrc/extsrc/wincon/winconcpp/CPP.DSP,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CPP.DSP 22 Dec 2004 20:26:00 -0000 1.1 --- CPP.DSP 30 Apr 2005 08:01:03 -0000 1.2 *************** *** 1,23 **** # Microsoft Developer Studio Project File - Name="cpp" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Console Application" 0x0103 CFG=cpp - Win32 Release ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "CPP.MAK". !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "CPP.MAK" CFG="cpp - Win32 Release" !MESSAGE ! !MESSAGE Possible choices for configuration are: !MESSAGE ! !MESSAGE "cpp - Win32 Release" (based on "Win32 (x86) Console Application") ! !MESSAGE "cpp - Win32 Debug" (based on "Win32 (x86) Console Application") !MESSAGE --- 1,23 ---- # Microsoft Developer Studio Project File - Name="cpp" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** NICHT BEARBEITEN ** # TARGTYPE "Win32 (x86) Console Application" 0x0103 CFG=cpp - Win32 Release ! !MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE ! !MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl !MESSAGE !MESSAGE NMAKE /f "CPP.MAK". !MESSAGE ! !MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben ! !MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: !MESSAGE !MESSAGE NMAKE /f "CPP.MAK" CFG="cpp - Win32 Release" !MESSAGE ! !MESSAGE Für die Konfiguration stehen zur Auswahl: !MESSAGE ! !MESSAGE "cpp - Win32 Release" (basierend auf "Win32 (x86) Console Application") ! !MESSAGE "cpp - Win32 Debug" (basierend auf "Win32 (x86) Console Application") !MESSAGE *************** *** 40,43 **** --- 40,44 ---- # PROP Output_Dir ".\Release" # PROP Intermediate_Dir ".\Release" + # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c *************** *** 50,54 **** LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 !ELSEIF "$(CFG)" == "cpp - Win32 Debug" --- 51,55 ---- LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"..\cpp.exe" !ELSEIF "$(CFG)" == "cpp - Win32 Debug" *************** *** 63,66 **** --- 64,68 ---- # PROP Output_Dir ".\Debug" # PROP Intermediate_Dir ".\Debug" + # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c *************** *** 73,77 **** LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 !ENDIF --- 75,79 ---- LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"..\cpp.exe" !ENDIF |