From ec331e1c244e72aad5917cfe07ba3ff84f2671b6 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Fri, 7 May 2010 17:23:27 +0200 Subject: CWS gnumake2: dependencies for windows --- soltools/mkdepend/def.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'soltools') diff --git a/soltools/mkdepend/def.h b/soltools/mkdepend/def.h index 9da82495f024..eaa1f506e263 100644 --- a/soltools/mkdepend/def.h +++ b/soltools/mkdepend/def.h @@ -60,8 +60,9 @@ in this Software without prior written authorization from the X Consortium. #endif #define MAXDEFINES 512 -#define MAXFILES 2048 /* Increased from 512. -mcafee */ - /* Increased from 1024. -mh */ +#define MAXFILES 1<<16 /* Increased from 512. -mcafee */ + /* Increased from 1024. -mh */ + /* Increased from 2048. -b_michaelsen */ #define MAXDIRS 64 #define SYMHASHSEED 131 /* 131 1313 13131 ... */ #define SYMHASHMEMBERS 64 /* must be 2^x to work right */ -- cgit From ad41732f4a707be8b2b3f622574176958ac4039f Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Mon, 10 May 2010 14:30:37 +0200 Subject: CWS gnumake2: fixing mkdepend fix for gcc, thanks ause --- soltools/mkdepend/def.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'soltools') diff --git a/soltools/mkdepend/def.h b/soltools/mkdepend/def.h index eaa1f506e263..943e81dc0915 100644 --- a/soltools/mkdepend/def.h +++ b/soltools/mkdepend/def.h @@ -60,9 +60,9 @@ in this Software without prior written authorization from the X Consortium. #endif #define MAXDEFINES 512 -#define MAXFILES 1<<16 /* Increased from 512. -mcafee */ - /* Increased from 1024. -mh */ - /* Increased from 2048. -b_michaelsen */ +#define MAXFILES ( 1<<16 ) /* Increased from 512. -mcafee */ + /* Increased from 1024. -mh */ + /* Increased from 2048. -b_michaelsen */ #define MAXDIRS 64 #define SYMHASHSEED 131 /* 131 1313 13131 ... */ #define SYMHASHMEMBERS 64 /* must be 2^x to work right */ -- cgit From 8055347982382fd210f2df989202956fb6118b20 Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Wed, 30 Jun 2010 20:32:15 +0100 Subject: cmcfixes76: #i112823# only needed on windows --- soltools/javadep/javadep.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'soltools') diff --git a/soltools/javadep/javadep.c b/soltools/javadep/javadep.c index a573d78eed75..d0517d832f45 100644 --- a/soltools/javadep/javadep.c +++ b/soltools/javadep/javadep.c @@ -733,6 +733,7 @@ usage() pprogname); } +#ifdef WNT /* my very simple minded implementation of getopt() * it's to sad that getopt() is not available everywhere * note: this is not a full POSIX conforming getopt() @@ -770,6 +771,7 @@ int simple_getopt(char *pargv[], const char *poptstring) } return -1; } +#endif int CDECL main(int argc, char *argv[]) -- cgit From 86bfc8c31eaf79bc5b2d28d1025e7e104155eb54 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Thu, 15 Jul 2010 15:26:26 +0200 Subject: CWS changehid: #i111874#: use HID generation to create conversion list for testtool and help --- soltools/HIDCompiler/hidclex.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'soltools') diff --git a/soltools/HIDCompiler/hidclex.l b/soltools/HIDCompiler/hidclex.l index e99618f30225..565e42960462 100755 --- a/soltools/HIDCompiler/hidclex.l +++ b/soltools/HIDCompiler/hidclex.l @@ -697,7 +697,7 @@ num4tag (([Pp][Oo][Ss][Ss][Ii][Zz][Ee])) globsuffix = globsuffix==NULL ? glob:globsuffix+1; if( ares->helpID ) { - fprintf( outfile,"\n\t printf(\"%s \\t %cs %cu \\n\",\n", + fprintf( outfile,"\n\t printf(\"%s \\t %cs %cs \\n\",\n", ares->helpID,'%','%'); fprintf(outfile,"\t\"HelpID\", (%s) ); \n", ares->helpID); } -- cgit From 318a0ac824a03a39417fbd521dd5801f3ab3c4a5 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Thu, 21 Oct 2010 14:22:09 +0200 Subject: CWS changehid: no hid.lst generation anymore --- soltools/HIDCompiler/hidclex.l | 951 ---------------------------------- soltools/HIDCompiler/makefile.mk | 63 --- soltools/HIDCompiler/wrap_hidclex.cxx | 31 -- soltools/prj/build.lst | 1 - soltools/prj/d.lst | 2 - 5 files changed, 1048 deletions(-) delete mode 100755 soltools/HIDCompiler/hidclex.l delete mode 100644 soltools/HIDCompiler/makefile.mk delete mode 100644 soltools/HIDCompiler/wrap_hidclex.cxx (limited to 'soltools') diff --git a/soltools/HIDCompiler/hidclex.l b/soltools/HIDCompiler/hidclex.l deleted file mode 100755 index 565e42960462..000000000000 --- a/soltools/HIDCompiler/hidclex.l +++ /dev/null @@ -1,951 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -%{ -// Suppress any warnings from generated code: -#if defined __GNUC__ -#pragma GCC system_header -#elif defined __SUNPRO_CC -#pragma disable_warn -#elif defined _MSC_VER -#pragma warning(push, 1) -#endif - -static char const Revision[] = "$Revision: 1.9 $" ; - -/* - -XX XX XXXX XXXXXX -XX XX XX XX XX -XX XX XX XX XX -XXXXXX XX XX XX -XX XX XX XX XX -XX XX XX XX XX -XX XX XXXX XXXXXX - - - XXXX XX XXX - XX XX XX -XX XXXX XXX XX XX XXX XXX XX XXXXX XX XXX -XX XX XX XX X XX XX XX XX XX XX X XXX XX -XX X XX XX XX X XX XX XX XX XX XXXXXXX XX - XX XX XX XX XX XX XXXXX XX XX XX XX - XXXX XXXX XXX XXX XX XXXX XXXX XXXXX XXXX - XXXX - -*/ - - -/* length of buffer for reading with lex */ -/**/ -/* enlarge token buffer to tokenize whole strings */ -#undef YYLMAX -#define YYLMAX 64000 - -int exclude_bracelevel=0; /* count braces in that start state */ -static YY_BUFFER_STATE InputFiles[127]; // for recursive parse -static int nInputFileDepth = 0; - - -#include -#include -#include - -#include - -int alloc_cnt = 0; -static bool bVerbose = false; -void freestring( char const * ); //forward - -char* dot2underline( char* str ) -{ - size_t len=strlen(str); - for( size_t i=0; i base - - if( base == NULL || suffix == NULL ) - return; - if( strlen(suffix) == 0 ) - return; - if( (strlen(suffix)+1) > strlen(base) ) - return; - char * pos=strstr( base, suffix); - if( pos && (pos-1 >= base) && ( *(pos-1) == '.') ) - if( *(pos+strlen(suffix)) == '\0' ) //only if at end of base - *(pos-1)= '\0'; - return; -} - -int level = 0; -char levelbuffer[512]; - -void adjust_levelbuffer() -{ - int i; - for(i=0; i(ptr)), ptr = NULL; -} - -void makestring(char** newstr, char* oldstr) -{ - alloc_cnt++; - adjust_levelbuffer(); - if ( bVerbose ) - fprintf(stdout,"%sinfo: makestring on line %d\n",levelbuffer,__LINE__); - strcpy( (*newstr=(char*)malloc(strlen(oldstr)+1)), oldstr); - if( *newstr==NULL ) { - fprintf( stderr, - "error: cannot malloc for makestring() alloc_cnt==%d \n", alloc_cnt); - exit(1); - } -} - -#ifndef WNT -int strcmpi(char const * stra, char const * strb) -{ - // like strcmp() but case insensitive - size_t i; - char a,b; - for(i=0; ;i++){ - a = (char) tolower(stra[i]); - b = (char) tolower(strb[i]); - if( a < b ) - return -1; - if( a > b ) - return 1; - if( a == '\0' && b == '\0' ) - return 0; - } -} -#endif - -/* variables for listfile ( with project + pathname of src file ) */ -char* listfilename; -#define MAXSRCFILES 2048 -char* filename_tab[MAXSRCFILES]; -char* project_tab[MAXSRCFILES]; -int tab_entries = 0; -//int fileno = 0; /* currently used filenumber */ - -/* globale variablen */ -FILE* outfile; -char const *filename = ""; //incl. path -//char *basename = ""; -char const *project = ""; -char const *subpath = ""; //from project name downwards like source\ui\xxx.src - -int firstprint = 1; - -int in_define = 0; - -class ident_ring -{ - #define MAXRING 2 - //nicht aendern wg externer Abfrage ->size() == 2 - - char* ring[MAXRING]; - int ringpos; - int last; - int broken; -public: - ident_ring() { - last = ringpos = -1; - for(int i=0; i' -#define TOK_OPENPAREN '(' -#define TOK_CLOSEPAREN ')' -#define TOK_PLUS '+' -#define TOK_MINUS '-' -#define TOK_STAR '*' -#define TOK_SLASH '/' -// -#define TOK_POSorSIZE 146 -#define TOK_POSSIZE 147 -#define TOK_TEXTTAG 148 -#define TOK_IDNUM 149 -// -#define TOK_EXTRADATA 151 -#define TOK_TEXT 152 -#define TOK_MESSAGE 153 -#define TOK_HELPTEXT 154 -#define TOK_TRUE 155 -#define TOK_FALSE 156 -// -#define TOK_RESID 180 -// -#define TOK_STRING 190 -// -#define TOK_INVALID (-1) - -token lasttoken = TOK_INVALID; - - - - -#define UNDEF (-1) - -char *globalID = const_cast< char * >(""); -char const *globalKLASSE = NULL; - -void reset_globalID() { - // - if( globalID && (strlen(globalID) > 0 ) ) { - freestring( globalID ); - globalID = const_cast< char * >(""); - } -} - - -//-------------------------------------------------------------------- -class resource -{ -private: - resource ( const resource& ); //copy-ctor soll keiner benutzen - void operator=( const resource& ); // zuweisung auch nicht -public: - resource(); - ~resource(); -public: - int lineno; - token lasttoken; //before opening { - char const *klasse ; - char *localID; - char *helpID; - int residfound; -}; - -resource *ares ; /* aktuell bearbeitete resource */ - -resource::~resource() -{ - if( klasse != NULL ) freestring(klasse); - if( localID != NULL ) freestring(localID); - if( helpID != NULL ) freestring(helpID); - -} - -resource::resource() -{ - lineno = UNDEF; - lasttoken= TOK_INVALID; - klasse = NULL ; - localID = NULL ; - helpID = NULL ; - residfound= 0; -} - -int residfound = 0; // "Identifier = " auf momentanem level gefunden - -#define MAXSTACK 32 -resource* stack[MAXSTACK]; /* resource stack */ -#define EMPTYSTACK (-1) -int stackptr = EMPTYSTACK; - -void push_resource( resource* r ) -{ - stackptr++; - if( stackptr >= MAXSTACK ) { - fprintf( stderr, "error: resource stack is full %d \n", stackptr); - exit(1); - } - stack[ stackptr ] = r; -} - -resource* pop_resource() -{ - if( stackptr < 0 ) { - fprintf( stderr, "error: pop resource from empty stack \n"); - exit(1); - } - return stack[ stackptr-- ]; -} - -/* forward */ -int eat_comment(); -int eat_cpp_comment(); - -/*===================================================*/ -// -// '+' im identifier wg basic\source\classes\sb.src -// -// '<' im identifier wg sc subtdlg.src -// -// '&' im identifier wg scerror.src so2..nocode.src svxerr.src scwarngs.src - - -//string (\"[^"]*\") alter einfacher string ohne " - -%} - -/* 89012 */ -%option never-interactive - - -simple ([^\n\"]*) -%p 7000 -string \"{simple}((((\\\\)*(\\\"))?){simple})*\" - -%x MACRO_STATE - -%x EXCLUDE_STATE -resfilelist ([Ff][Ii][Ll][Ee][Ll][Ii][Ss][Tt]) -resstringlist ([Ss][Tt][Rr][Ii][Nn][Gg][Ll][Ii][Ss][Tt]) -resstring ([Ss][Tt][Rr][Ii][Nn][Gg]) - -identifier ([a-z_A-Z]+[a-z_A-Z<+&0-9]*) -number (([0-9]+)|(0x[0-9a-fA-F]+)) -residentifier ([Ii][Dd][Ee][Nn][Tt][Ii][Ff][Ii][Ee][Rr]) -w ([ \t\n]*) -wspecial ([\\ \t\n]*) -texttag (([Tt][Ii][Tt][Ll][Ee])|([Tt][Ee][Xx][Tt])|([Mm][Ee][Ss][Ss][Aa][Gg][Ee])) -qhelptag (([Qq][Uu][Ii][Cc][Kk])?([Hh][Ee][Ll][Pp][Tt][Ee][Xx][Tt])) -langtag ([a-zA-Z_]+) -helptag ([Hh][Ee][Ll][Pp][Ii][Dd]) -helpid ([a-zA-Z_0-9]+) -num2tag (([Pp][Oo][Ss])|([Ss][Ii][Zz][Ee])) -num4tag (([Pp][Oo][Ss][Ss][Ii][Zz][Ee])) - -%% -[ \t] { - /* forget whitespace */; - } - -^[ \t]*#include.*\.src[">].* { - char NewFile[255]; //long names??? - int i, j, GetIt; - - GetIt = 0; - j = 0; - nInputFileDepth++; -// nicht schoen aber geht... - for (i = 0; yytext[i+1] != 0; i++) - { - if ( GetIt == 1 ) - { - if ( yytext[i] == '"' || yytext[i] == '>' ) - GetIt = 0; - else - NewFile[j++] = yytext[i]; - } - if ( yytext[i] == '"' || yytext[i] == '<' ) - GetIt = 1; - } - NewFile[j] = '\0'; - FILE* pFile = NULL; - pFile = fopen( NewFile, "r" ); - if( pFile == NULL ) { - fprintf( stdout, "warning: could not open inputfile %s \n", NewFile ); - // try the new *_tmpl.src version instead - // this hack was introduced to allow localisation of included src files - const char* sStrTmpl = "_tmpl"; - j -= 4; - for ( i = 0 ; i <5 ; i++,j++ ) - { - NewFile[j+5] = NewFile[j]; - NewFile[j] = sStrTmpl[i]; - } - NewFile[j+4] = '\0'; - fprintf( stderr, "trying inputfile %s \n", NewFile ); - pFile = fopen( NewFile, "r" ); - if( pFile == NULL ) { - fprintf( stderr, "error: could not open inputfile %s \n", NewFile ); - exit(1); - } - } - InputFiles[ nInputFileDepth ] = yy_create_buffer( pFile, YY_BUF_SIZE ); - yy_switch_to_buffer( InputFiles[ nInputFileDepth ] ); - - if ( bVerbose ) - fprintf( stdout, "%s //ATTENTION!! %s gets included here\n", yytext, NewFile ); - fprintf( outfile, "// %s //ATTENTION!! %s gets included here\n\n", yytext, NewFile ); - } - -^[ \t]*#include.* { - fprintf( outfile, "%s\n\n", yytext ); - } - -^[ \t]*#(if|ifdef|ifndef|elif).* { - ; - } - -^[ \t]*#else { - ; - } -^[ \t]*#endif { - ; - } - -^[ \t]*#(undef|error|pragma).* { - ; - } - -^[ \t]*#define { - fprintf( outfile, "%s", yytext ); - BEGIN MACRO_STATE; - } - -"/*" { - eat_comment(); - } - -"//" { - eat_cpp_comment(); - } - -\n { - fprintf( outfile, "%s\n", yytext ); - BEGIN INITIAL; - } - -\\\n { - fprintf( outfile, "\\\n" ); - ;/* macro schadet nicht, koennte gebraucht werden */ - } - - -. { - fprintf( outfile, "%s", yytext ); - ;/* ignore all this unused input */ - } - -";" {ring->set_zero(); lasttoken = TOK_SEMICOLON; } -"=" {ring->set_zero(); lasttoken = TOK_EQUAL; } -"[" {ring->set_broken(); lasttoken = TOK_OPENBRACKET; } -"]" {ring->set_broken(); lasttoken = TOK_CLOSEBRACKET; } - - -"{" { - exclude_bracelevel += 1; - if ( bVerbose ) - fprintf( stdout,"info: lev %d : found {\n", exclude_bracelevel ); - } - - -\\\n | -"{" { - // define continues - // or a brace opens a block - - if( in_define && !strcmp(yytext,"\\\n") ) { - - if( in_define++ == 1 ) - ;// keep on working - else - goto blockend; - } - - level++; - if( ares != NULL ){ - if( level > 1 ) - dotappend( globalID, ares->localID ); - ares->residfound = residfound; - push_resource( ares ); - } - ares = new resource; - - residfound = 0; - ares->residfound = 0; - - ares->lineno = yylineno; - ares->lasttoken = lasttoken; - if( ring->size() == 2 ) { - ares->klasse = ring->extract_last(); - ares->localID = ring->extract_actual(); - } else if(ring->size() == 1) { - ares->klasse = ring->extract_actual(); - } - if( level==1 ){ //Ausnahme: Resource auf Ebene 1 - globalID= ares->localID; - ares->localID = NULL; - globalKLASSE= ares->klasse; - } - - if ( bVerbose ) - fprintf(stdout,"info: { level: %d\n", level); - - lasttoken = TOK_OPENBRACE; - ring->set_zero(); - } - -"}" { - //----------------------------- - exclude_bracelevel -= 1; - if ( bVerbose ) - fprintf( stdout,"info: lev %d : found }\n", exclude_bracelevel ); - if( exclude_bracelevel==1 ) { - BEGIN INITIAL; - exclude_bracelevel=0; - } - } - - -\n | -"}" { - if ( bVerbose ) - fprintf(stdout,"info: } level: %d\n",level); - - if( !strcmp(yytext,"}") ) - ; - else if( in_define && (!strcmp(yytext,"\n") )) { - if( in_define==1 ) { - //no continuation line for #define - in_define=0; - goto blockend; - } - else { - //there was a continuation line for #define - in_define=0; - } - } - else - goto blockend; - - // ares ausgeben - if( ares != NULL ) { - - #define LEER "leer" - char const * globklasse = - globalKLASSE==NULL ? LEER:globalKLASSE; - char const * local = - ares->localID==NULL ? LEER:ares->localID; - char const * klasse = - ares->klasse==NULL ? LEER:ares->klasse; - char const * glob = - globalID==NULL ? LEER:globalID; - - - //wg. Starview-Klasse String in ehdl.c und doc.c - // wenn generierte C++-Quellen compiliert werden - // - //if( !strcmp(globklasse,"String" )) globklasse = "string"; - //if( !strcmp(klasse,"String" )) klasse = "string"; - - - //--------------------------------------------------- - // generate the body of a new C main program, - // which is filled with printf statements - // to compute (via preproseccor & compiler) - // the codenumbers for resource names like menu$RID_SVX$xyz - - if( firstprint ) { - firstprint=0; - fprintf(outfile, "#include \"starview.hid\" \n\n"); - fprintf(outfile, " int main() { \n\n\n"); - } - - char globunder[256]; - strcpy(globunder,glob); - dot2underline( globunder ); - char const * globsuffix = strrchr(glob,'.'); - globsuffix = globsuffix==NULL ? glob:globsuffix+1; - - if( ares->helpID ) { - fprintf( outfile,"\n\t printf(\"%s \\t %cs %cs \\n\",\n", - ares->helpID,'%','%'); - fprintf(outfile,"\t\"HelpID\", (%s) ); \n", ares->helpID); - } - else if( ares->localID ) { - fprintf( outfile,"\n\t printf(\"%s:%s:%s:%s \\t %cs %cu %cs %cu \\n\",\n", - project,klasse,globunder,local,'%','%','%','%'); - fprintf( outfile,"\t\"Norm %s\", (%s), \"%s\", (%s) );\n", - globklasse,globsuffix, klasse,local); - } - else if( (strcmpi("MenuItem",klasse)==0) || - (strcmpi("ToolBoxItem",klasse)==0) ) { - ; //no output (99% is a separator) - } - else { - fprintf( outfile,"\n\t printf(\"%s:%s:%s \\t %cs %cu %cs \\n\",\n", - project,klasse,globunder,'%','%','%'); - fprintf( outfile,"\t\"Norm %s\", (%s), \"%s\" );\n", - globklasse,globsuffix, klasse); - } - - delete ares; - } - - - // ein level zurueck - if( level == 1) { - reset_globalID(); - globalKLASSE = NULL; - } - level--; - ares = pop_resource(); - residfound = ares->residfound; - dotsubtract( globalID, ares->localID ); - - - // - lasttoken = TOK_CLOSEBRACE; - ring->set_zero(); - blockend: ; - } - -"," {ring->set_broken(); lasttoken = TOK_KOMMA; } - -"<" {ring->set_broken(); lasttoken = TOK_LESS; } -">" {ring->set_broken(); lasttoken = TOK_GREATER; } - -"(" {ring->set_broken(); lasttoken = TOK_OPENPAREN; } -")" {ring->set_broken(); lasttoken = TOK_CLOSEPAREN; } -"+" {ring->set_broken(); lasttoken = TOK_PLUS; } -"-" {ring->set_broken(); lasttoken = TOK_MINUS; } -"*" {ring->set_broken(); lasttoken = TOK_STAR; } -"/" {ring->set_broken(); lasttoken = TOK_SLASH; } - - -{helptag}{w}"="{w}{helpid}{w}";" { - - // extract text for helpid and put to ares - char* pos = strchr(yytext,'='); - size_t offset = strspn(pos+1," \t\n"); - char* start = pos+1+offset; - size_t offset2= strcspn( start, "; \t\n"); - char* end = start+offset2; - *end = '\0'; - char *helpid; - makestring( &helpid, start ); - ares->helpID = helpid; - } - -{residentifier}{w}"="[ \t\n]*({identifier}|{number}) { - ring->set_zero(); - lasttoken = TOK_RESID; - residfound=1; - - //extract resource id and store as localID - char *after = strrchr(yytext,'='); - char *resid = after + strspn(after,"= \t\n"); - char *localID; - makestring( &localID, resid ); - ares->localID = localID; - } - -{resfilelist} | -{resstring} | -{resstringlist} { - BEGIN EXCLUDE_STATE; - exclude_bracelevel = 1; - if ( bVerbose ) - fprintf( stdout,"info: lev %d : found exclusion\n", exclude_bracelevel ); - } - -^[ \t]*#define | -{number} | -{identifier} { - /* identifier/number in einem ring ablegen */ - char *identifier; - char *def=strstr(yytext,"#define"); - if( def ) { - in_define = 1; - makestring( &identifier, def+1 ); - } - else - makestring( &identifier, yytext ); - ring->set( identifier ); - lasttoken = TOK_IDNUM; - - } -{string} { - ring->set_broken(); - lasttoken = TOK_STRING; - if ( bVerbose ) - fprintf(stdout, "%6s %11s %8d %s \n",project,filename,yylineno, yytext); - } - - -. { if ( bVerbose ) fprintf( stdout,"warning: unused input on line %d of %s \n%s\n", - yylineno, filename, yytext); - } - -\n { - ; //do nothing, ignore - } - - -%% - - -void makeversion( char* version ) -{ - char const *pos = strpbrk( Revision, "0123456789." ); - size_t siz = strspn( pos, "0123456789." ); - if( pos && siz ) { - strncpy(version, pos, siz); - strcat( version, " "); - } - else - strcpy( version," unknown " ); -} - -int main( int argc, char* argv[] ) -{ - static char const *Compiler = "HID-Compiler "; - static char const *Author = "OG "; - static char HIDCompiler[100]; - static char Version[100]; - - // check for switches given on the command line - if ( ( argc > 0 ) && ( 0 == strcmp( argv[0], "-verbose" ) ) ) - { - bVerbose = true; - for ( size_t i=0; i -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=.. - -PRJNAME=soltools -TARGET=hidc -TARGETTYPE=CUI -LIBTARGET=no -NO_DEFAULT_STL=TRUE -INCPRE=$(MISC) - -# --- Settings ----------------------------------------------------- - -.INCLUDE : $(PRJ)$/util$/makefile.pmk -.INCLUDE : settings.mk -.INCLUDE : libs.mk -CDEFS+= -DYY_NEVER_INTERACTIVE=1 - -UWINAPILIB=$(0) - -# --- Files -------------------------------------------------------- - -# HID compiler -APP1TARGET= $(TARGET) -APP1OBJS= $(OBJ)$/wrap_hidclex.obj -APP1DEPN= $(OBJ)$/wrap_hidclex.obj -APP1LIBSALCPPRT= - -DEPOBJFILES=$(APP1OBJS) - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -$(MISC)$/%_yy.cxx : %lex.l - flex -l -8 -o$@ $< - -$(OBJ)$/wrap_hidclex.obj: $(MISC)$/hidc_yy.cxx diff --git a/soltools/HIDCompiler/wrap_hidclex.cxx b/soltools/HIDCompiler/wrap_hidclex.cxx deleted file mode 100644 index 1eb79e80a5da..000000000000 --- a/soltools/HIDCompiler/wrap_hidclex.cxx +++ /dev/null @@ -1,31 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_soltools.hxx" - -#include "hidc_yy.cxx" diff --git a/soltools/prj/build.lst b/soltools/prj/build.lst index 73611addf782..578723b0e09d 100644 --- a/soltools/prj/build.lst +++ b/soltools/prj/build.lst @@ -10,5 +10,4 @@ so soltools\javadep nmake - all so_jvdep so_mkdep so_adjvis.u NULL so soltools\support nmake - all so_supp so_mkdep so_adjvis.u NULL so soltools\giparser nmake - all so_gip so_supp so_adjvis.u NULL so soltools\adjustvisibility nmake - u so_adjvis so_mkdep NULL -so soltools\HIDCompiler nmake - all so_hidc so_mkdep so_adjvis.u so_wunistd.n NULL so soltools\testhxx nmake - all so_testhxx so_mkdep NULL diff --git a/soltools/prj/d.lst b/soltools/prj/d.lst index ee3ae5e2f907..970805f5d60c 100644 --- a/soltools/prj/d.lst +++ b/soltools/prj/d.lst @@ -8,6 +8,4 @@ ..\%__SRC%\bin\cpp.exe %_DEST%\bin%_EXT%\cpplcc.exe ..\%__SRC%\bin\cpp %_DEST%\bin%_EXT%\cpp.lcc ..\%__SRC%\inc\unistd.h %_DEST%\inc%_EXT%\unistd.h -..\%__SRC%\bin\hidc.exe %_DEST%\bin%_EXT%\hidc.exe -..\%__SRC%\bin\hidc %_DEST%\bin%_EXT%\hidc ..\%__SRC%\bin\testhxx* %_DEST%\bin%_EXT%\testhxx* -- cgit From e09da93efa3046dea97be4490f30942cae5f16bc Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Mon, 13 Dec 2010 18:21:24 +0100 Subject: gnumake2: fixing broken makedepend behaviour --- soltools/mkdepend/include.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'soltools') diff --git a/soltools/mkdepend/include.c b/soltools/mkdepend/include.c index 45d0730393a3..4446489ba259 100644 --- a/soltools/mkdepend/include.c +++ b/soltools/mkdepend/include.c @@ -71,15 +71,18 @@ struct inclist *inc_path(file, include, dot, incCollection) * If the path was surrounded by "" or is an absolute path, * then check the exact path provided. */ - if (!found && (dot || *include == '/')) { - - if ((exists_path(incCollection, include)) && stat(include, &st) == 0 && !( st.st_mode & S_IFDIR)) { - ip = newinclude(include, include); - found = TRUE; - } - else if (show_where_not) - warning1("\tnot in %s\n", include); - } +// FIXME: creates duplicates in the dependency files if absolute paths are +// given, which certainly is not the intended behavior. Also it slows down +// makedepend performance considerably. +// if (!found && (dot || *include == '/')) { +// +// if ((exists_path(incCollection, include)) && stat(include, &st) == 0 && !( st.st_mode & S_IFDIR)) { +// ip = newinclude(include, include); +// found = TRUE; +// } +// else if (show_where_not) +// warning1("\tnot in %s\n", include); +// } /* * See if this include file is in the directory of the -- cgit