Commit 7a35af90 authored by claes's avatar claes

StoNumSp and CStoNumSp added

parent 5bf1f5f1
...@@ -8063,7 +8063,9 @@ vldh_t_node node; ...@@ -8063,7 +8063,9 @@ vldh_t_node node;
break; break;
case pwr_eType_String : case pwr_eType_String :
if ( !( node->ln.classid == pwr_cClass_stosp || if ( !( node->ln.classid == pwr_cClass_stosp ||
node->ln.classid == pwr_cClass_cstosp )) node->ln.classid == pwr_cClass_cstosp ||
node->ln.classid == pwr_cClass_stonumsp ||
node->ln.classid == pwr_cClass_cstonumsp ))
{ {
gcg_error_msg( gcgctx, GSX__REFPARTYPE, node); gcg_error_msg( gcgctx, GSX__REFPARTYPE, node);
free((char *) parameter); free((char *) parameter);
...@@ -8113,7 +8115,9 @@ vldh_t_node node; ...@@ -8113,7 +8115,9 @@ vldh_t_node node;
nocontype[0] = GCG_INT32; nocontype[0] = GCG_INT32;
} }
else if ( node->ln.classid == pwr_cClass_stosp || else if ( node->ln.classid == pwr_cClass_stosp ||
node->ln.classid == pwr_cClass_cstosp) node->ln.classid == pwr_cClass_cstosp ||
node->ln.classid == pwr_cClass_stonumsp ||
node->ln.classid == pwr_cClass_cstonumsp)
{ {
strcpy( nocondef[0].str, (char *) nocondef_ptr); strcpy( nocondef[0].str, (char *) nocondef_ptr);
nocontype[0] = GCG_STRING; nocontype[0] = GCG_STRING;
...@@ -8150,6 +8154,19 @@ vldh_t_node node; ...@@ -8150,6 +8154,19 @@ vldh_t_node node;
IF_PR fprintf( gcgctx->files[GCGM1_CODE_FILE], IF_PR fprintf( gcgctx->files[GCGM1_CODE_FILE],
",%ld", info_size); ",%ld", info_size);
} }
else if ( node->ln.classid == pwr_cClass_stonumsp ||
node->ln.classid == pwr_cClass_cstonumsp ) {
// Add size of connected attribute and number of characters
pwr_tInt32 *numberofchar_ptr;
sts = ldh_GetObjectPar( ldhses, node->ln.object_did, "DevBody",
"NumberOfChar", (char **)&numberofchar_ptr, &size);
if ( EVEN(sts)) return sts;
IF_PR fprintf( gcgctx->files[GCGM1_CODE_FILE],
",%ld,%d", info_size, *numberofchar_ptr);
free( (char *)numberofchar_ptr);
}
IF_PR fprintf( gcgctx->files[GCGM1_CODE_FILE], IF_PR fprintf( gcgctx->files[GCGM1_CODE_FILE],
");\n"); ");\n");
...@@ -14185,15 +14202,29 @@ vldh_t_node node; ...@@ -14185,15 +14202,29 @@ vldh_t_node node;
vldh_IdToStr(1, output_objdid), vldh_IdToStr(1, output_objdid),
output_par); output_par);
IF_PR fprintf( gcgctx->files[GCGM1_CODE_FILE], switch ( bodydef[i].Par->Param.Info.Type) {
"%c%s->%s = *%c%s->%sP;\n", case pwr_eType_String:
GCG_PREFIX_REF, IF_PR fprintf( gcgctx->files[GCGM1_CODE_FILE],
vldh_IdToStr(0, node->ln.object_did), "strncpy( %c%s->%s, %c%s->%sP, %d);\n",
bodydef[i].Par->Param.Info.PgmName, GCG_PREFIX_REF,
GCG_PREFIX_REF, vldh_IdToStr(0, node->ln.object_did),
vldh_IdToStr(0, node->ln.object_did), bodydef[i].Par->Param.Info.PgmName,
bodydef[i].Par->Param.Info.PgmName); GCG_PREFIX_REF,
} vldh_IdToStr(0, node->ln.object_did),
bodydef[i].Par->Param.Info.PgmName,
bodydef[i].Par->Param.Info.Size);
break;
default:
IF_PR fprintf( gcgctx->files[GCGM1_CODE_FILE],
"%c%s->%s = *%c%s->%sP;\n",
GCG_PREFIX_REF,
vldh_IdToStr(0, node->ln.object_did),
bodydef[i].Par->Param.Info.PgmName,
GCG_PREFIX_REF,
vldh_IdToStr(0, node->ln.object_did),
bodydef[i].Par->Param.Info.PgmName);
}
}
else else
{ {
/* Point visible but not connected, errormessage */ /* Point visible but not connected, errormessage */
......
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