Commit 2450ffeb authored by Claes Sjofors's avatar Claes Sjofors

Merge branch 'master' of pwrcvs:/data1/git/pwr

parents baf0fb5f 12a967ab
......@@ -15,6 +15,8 @@ local_java_sources := \
JopUtilityIfc.java \
JopUtility.java \
JopSession.java \
JopLang.java \
JopMethods.java \
JopMethodsMenu.java \
JopConfirm.java \
JopConfirmDialog.java \
......@@ -69,6 +71,7 @@ local_java_sources := \
GeDynTable.java \
GeDynHostObject.java \
GeDynXYCurve.java \
GeDynSetValue.java \
JopXYCurve.java \
Proportion.java\
RatioLayout.java \
......@@ -76,6 +79,7 @@ local_java_sources := \
JopSpiderFrame.java \
JopLoginFrame.java \
JopLoginApplet.java \
JopLanguageFrame.java \
GeColorEditor.java \
GeColorBrightnessEditor.java \
GeColorToneEditor.java \
......@@ -85,6 +89,7 @@ local_java_sources := \
JopUtilities.java \
GeImage.java \
GeFrameThin.java \
GeGradient.java \
Flow.java \
FlowCtxInterface.java \
FlowCmn.java \
......@@ -138,6 +143,7 @@ local_java_sources := \
HistStatModel2.java \
HistStatistics.java \
HistSearch.java \
JopOp.java \
JopSessionRep.java
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
......
......@@ -15,6 +15,8 @@ local_java_sources := \
JopUtilityIfc.java \
JopUtility.java \
JopSession.java \
JopLang.java \
JopMethods.java \
JopMethodsMenu.java \
JopConfirm.java \
JopConfirmDialog.java \
......@@ -69,6 +71,7 @@ local_java_sources := \
GeDynTable.java \
GeDynHostObject.java \
GeDynXYCurve.java \
GeDynSetValue.java \
JopXYCurve.java \
Proportion.java\
RatioLayout.java \
......@@ -76,6 +79,7 @@ local_java_sources := \
JopSpiderFrame.java \
JopLoginFrame.java \
JopLoginApplet.java \
JopLanguageFrame.java \
GeColorEditor.java \
GeColorBrightnessEditor.java \
GeColorToneEditor.java \
......@@ -85,6 +89,7 @@ local_java_sources := \
JopUtilities.java \
GeImage.java \
GeFrameThin.java \
GeGradient.java \
Flow.java \
FlowCtxInterface.java \
FlowCmn.java \
......@@ -138,6 +143,7 @@ local_java_sources := \
HistStatModel2.java \
HistStatistics.java \
HistSearch.java \
JopOp.java \
JopSessionRep.java
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
......
......@@ -34,7 +34,6 @@ local_java_sources := \
JopcIi.java, \
JopcIoGen.java, \
JopcIo.java, \
JopcModeGen.java, \
JopcMode.java, \
JopcMode_sub.java, \
JopcPidGen.java, \
......
......@@ -34,7 +34,6 @@ local_java_sources := \
JopcIi.java, \
JopcIoGen.java, \
JopcIo.java, \
JopcModeGen.java, \
JopcMode.java, \
JopcMode_sub.java, \
JopcPidGen.java, \
......
......@@ -5,8 +5,10 @@ Modbus_Module
Modbus_Master
Modbus_TCP_Server
Modbus_TCP_ServerModule
#if OS_LINUX
GPIO
GPIO_Module
Maxim_DS18B20
USB_Agent
Velleman_K8055_Board
#endif
\ No newline at end of file
......@@ -21,6 +21,7 @@
#include <stdlib.h>
#include <string.h>
#include "pwr.h"
#include "co_cdh.h"
#include "co_dcli.h"
typedef enum {
......@@ -40,6 +41,25 @@ void usage()
");
}
static int check_os( char *str, char *os)
{
char os_vect[10][20];
int nr;
int i;
char os_element[20];
nr = dcli_parse( str, "||", "", (char *)os_vect,
sizeof( os_vect) / sizeof( os_vect[0]), sizeof( os_vect[0]), 0);
for ( i = 0; i < nr; i++) {
dcli_trim( os_element, os_vect[i]);
if ( cdh_NoCaseStrcmp( os, os_element) == 0)
return 1;
}
return 0;
}
int main( int argc, char *argv[])
{
pwr_tFileName filespec;
......@@ -61,6 +81,7 @@ int main( int argc, char *argv[])
char pwre_cxx[80];
char pwre_ar[80];
char *s;
int in_if = 0;
#if defined OS_LINUX
char dos[] = "OS_LINUX";
#elif defined OS_MACOS
......@@ -108,7 +129,19 @@ int main( int argc, char *argv[])
while( dcli_read_line( line, sizeof(line), fp)) {
dcli_trim( line, line);
if ( line[0] == 0 || line[0] == '#')
if ( strncmp( line, "#if" , 3) == 0) {
in_if = ! check_os( &line[5], dos);
continue;
}
else if ( in_if) {
if ( strncmp( line, "#endif", 6) == 0) {
if ( in_if)
in_if = 0;
continue;
}
continue;
}
else if ( line[0] == 0 || line[0] == '#')
continue;
strncpy( mtab[mtabcnt++], line, sizeof(mtab[0]));
if ( mtabcnt > (int) sizeof(mtab)/sizeof(mtab[0]) - 1)
......
......@@ -418,7 +418,7 @@ bool Lng::read()
lang_sKey key;
lang_sRecord *record;
strcpy( key.text, r1.text);
strncpy( key.text, r1.text, sizeof(key.text));
key.type = r1.type;
record = (lang_sRecord *) tree_Insert( &sts, tree, &key);
strcpy( record->transl, r2.text);
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment