Commit b1f720d7 authored by Claes Sjofors's avatar Claes Sjofors

Type Text8102 and class DataArithmL added

parent 4dfe3bd2
...@@ -1050,6 +1050,7 @@ int CnvWblToH::check_typename( char *type_volume, char *type_name) ...@@ -1050,6 +1050,7 @@ int CnvWblToH::check_typename( char *type_volume, char *type_name)
"pwr_tString1", "pwr_tString1",
"pwr_tText256", "pwr_tText256",
"pwr_tText1024", "pwr_tText1024",
"pwr_tText8192",
"pwr_tURL", "pwr_tURL",
"pwr_tOpSysEnum", "pwr_tOpSysEnum",
"pwr_tPrivMask", "pwr_tPrivMask",
......
...@@ -451,6 +451,10 @@ typedef char pwr_tText256 [256]; //!< 256 byte text type. ...@@ -451,6 +451,10 @@ typedef char pwr_tText256 [256]; //!< 256 byte text type.
@aref text1024 Text1024 @aref text1024 Text1024
*/ */
typedef char pwr_tText1024 [1024]; //!< 1024 byte text type. typedef char pwr_tText1024 [1024]; //!< 1024 byte text type.
/*_*
@aref text8192 Text8192
*/
typedef char pwr_tText8192 [8192]; //!< 8192 byte text type.
/*_* /*_*
@aref url URL @aref url URL
*/ */
......
...@@ -672,6 +672,7 @@ palette PlcEditorPalette ...@@ -672,6 +672,7 @@ palette PlcEditorPalette
class Curve class Curve
class DArithm class DArithm
class DataArithm class DataArithm
class DataArithmL
class Demux class Demux
class Div class Div
class Equal class Equal
......
...@@ -12466,11 +12466,21 @@ int gcg_comp_m42( gcg_ctx gcgctx, vldh_t_node node) ...@@ -12466,11 +12466,21 @@ int gcg_comp_m42( gcg_ctx gcgctx, vldh_t_node node)
int error_line_size = sizeof(error_line); int error_line_size = sizeof(error_line);
char pointer_name[80]; char pointer_name[80];
int codesize; int codesize;
int buff_size;
#define DATAA_BUFF_SIZE 16000 #define DATAA_BUFF_SIZE 16000
#define DATAA_BUFF_SIZEL 48000
ldhses = (node->hn.wind)->hw.ldhses; ldhses = (node->hn.wind)->hw.ldhses;
switch ( node->ln.cid) {
case pwr_cClass_dataarithml:
buff_size = DATAA_BUFF_SIZEL;
break;
default:
buff_size = DATAA_BUFF_SIZE;
}
/* Get c-expression stored in devbody */ /* Get c-expression stored in devbody */
sts = ldh_GetObjectPar( ldhses, sts = ldh_GetObjectPar( ldhses,
node->ln.oid, node->ln.oid,
...@@ -12486,12 +12496,12 @@ int gcg_comp_m42( gcg_ctx gcgctx, vldh_t_node node) ...@@ -12486,12 +12496,12 @@ int gcg_comp_m42( gcg_ctx gcgctx, vldh_t_node node)
sprintf( pointer_name, "%c%s", GCG_PREFIX_REF, sprintf( pointer_name, "%c%s", GCG_PREFIX_REF,
vldh_IdToStr(0, node->ln.oid)); vldh_IdToStr(0, node->ln.oid));
newstr = (char *)calloc( 1, DATAA_BUFF_SIZE); newstr = (char *)calloc( 1, buff_size);
if ( !newstr) if ( !newstr)
return FOE__NOMEMORY; return FOE__NOMEMORY;
sts = dataarithm_convert( expression, newstr, pointer_name, sts = dataarithm_convert( expression, newstr, pointer_name,
DATAA_BUFF_SIZE, error_line, &error_line_size, &error_num, buff_size, error_line, &error_line_size, &error_num,
&codesize); &codesize);
if (EVEN(sts)) if (EVEN(sts))
{ {
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
#include "wb_tra.h" #include "wb_tra.h"
#define ANNOT_LEN_MAX 1024 #define ANNOT_LEN_MAX 8192
#define ANNOT_NR_MAX 8 #define ANNOT_NR_MAX 8
......
...@@ -1074,7 +1074,7 @@ int WAttNav::set_attr_value( brow_tObject node, char *name, char *value_str) ...@@ -1074,7 +1074,7 @@ int WAttNav::set_attr_value( brow_tObject node, char *name, char *value_str)
{ {
WItem *base_item; WItem *base_item;
int sts; int sts;
char buff[1024]; char buff[8192];
int size; int size;
// Check that object still exist // Check that object still exist
......
...@@ -301,7 +301,7 @@ void wnav_attrvalue_to_string( ldh_tSesContext ldhses, int type_id, void *value ...@@ -301,7 +301,7 @@ void wnav_attrvalue_to_string( ldh_tSesContext ldhses, int type_id, void *value
pwr_tObjid objid; pwr_tObjid objid;
pwr_sAttrRef *attrref; pwr_sAttrRef *attrref;
int sts; int sts;
static char str[2048]; static char str[8192];
switch ( type_id ) { switch ( type_id ) {
case pwr_eType_Boolean: { case pwr_eType_Boolean: {
......
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