ApplicationSpecific Textfunctions im Memory. StandardFunctions in Memory: UTF_.. in ../ut/ut_txfil.c ===================================================== Liste_Funktionen_Beginn: APED_ck_defLn check if Line cBuf is a Definitionline APED_dec_defLn check if Line cBuf is a Definitionline; decode .. APED_dec_txt decode textLine, add all objs to group (oTab) APED_decAdd decode textLine, add all objs to group (oTab) APED_undo undo/redo (Delete/remove) line APED_search_name search objName between ps and pe APED_cut_name cut/copy objName APED_nxt_def_typ Search next DefinitionLine of objectTyp APED_search_depLn Search last depending Line APED_search_defLn Search last DefinitionLine APED_search_dbLimits search highest indices APED_VcTra_reset delete Vec's&Tra's after progLine x in DB Liste_Funktionen_Ende: ===================================================== see also: // AP_search_obj / UTF_GetLinNr // AP_obj_delCk1 UTF_GetLinNr APT_decode_objTx IE_decode_Ln AP_search_obj UTF_GetLinNr AP_SMD_prv UTF_ APT_decode_obj APT_decode_ausdr APT_decode_inp
#include "MS_Def0.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "../ut/ut_geo.h"
#include "../ut/ut_txt.h"
#include "../ut/ut_txfil.h"
#include "../ci/NC_apt.h"
#include "../xa/xa_mem.h"
Functions | |
char * | APED_search_name (char *ps, char *pe) |
int | APED_cut_name (char *cbuf) |
int | APED_undo (int lNr, char *lPos, int mode) |
int | APED_VcTra_reset (int lNr) |
int | APED_dec_defLn (char **p2, int *typ, long *ind, char *p1) |
int | APED_ck_defLn (char *p1) |
int | APED_dec_txt (char *txLn) |
int | APED_decAdd (char *cPos) |
int | APED_search_dbLimits (long *lTab) |
int | APED_nxt_def_typ (char **lSta, int *lNr, int *lLen, int typ) |
int | APED_search_defLn (char **lSta, int *lNr, int *lLen, char *otx, int lNEnd, int src) |
int | APED_search_depLn (char **lSta, int *lNr, int *lLen, char *otx) |
Variables | |
char | AP_ED_oNam [64] |
objectName of active Line | |
char * | UTF_FilBuf0 |
long | UTF_FilBuf0Len |
char * | UTF_FilBuf1 |
long | UTF_FilBuf1Len |
char * | Cmd1Tab [] |
char* APED_search_name | ( | char * | ps, | |
char * | pe | |||
) |
int APED_cut_name | ( | char * | cbuf | ) |
APED_cut_name cut/copy objName cut cbuf at " #" and copy the following text -> AP_ED_oNam MODIFIES cbuf !
int APED_undo | ( | int | lNr, | |
char * | lPos, | |||
int | mode | |||
) |
APED_undo undo/redo (Delete/remove) line lPos: startposition of a APT-line in memory. mode: 0=Restore; 1=Delete see also AP_obj_del2
int APED_VcTra_reset | ( | int | lNr | ) |
APED_VcTra_reset delete Vec's&Tra's after progLine x in DB
int APED_dec_defLn | ( | char ** | p2, | |
int * | typ, | |||
long * | ind, | |||
char * | p1 | |||
) |
APED_dec_defLn check if Line p1 is a Definitionline; if yes: decode its objName, return positon of objCode lines "V=NEW()" sofort auswerten, nicht via WC_Work__; Output: RetCod = 0: yes, p1 is a Definitionline. -1: No. p2 position of 1 char after '=' typ, ind typ and DB-index of outputvar.
int APED_ck_defLn | ( | char * | p1 | ) |
check if Line cBuf is a Definitionline; find 1. delimiter; it must be '='. RetCod = 0: yes, p1 is a Definitionline. -1: No. see also APED_search_defLn PRG_ck_defLn APED_dec_defLn
int APED_dec_txt | ( | char * | txLn | ) |
int APED_decAdd | ( | char * | cPos | ) |
decode textLine, add all objs to group (oTab)
Line is \n terminated !
int APED_search_dbLimits | ( | long * | lTab | ) |
APED_search_dbLimits search highest indices
int APED_nxt_def_typ | ( | char ** | lSta, | |
int * | lNr, | |||
int * | lLen, | |||
int | typ | |||
) |
Search next DefinitionLine of objectTyp In: lSta NULL=start search from beginning of model (first call). DO NOT MODIFY lSta,lNr,lLen for incremental search ! typ typ of obj to find; eg Typ_PT Out: lSta startpos of line found lNr nr of line found lLen length of line incl \n (MS-Win incl \r) RetCodes: >=0 OK; DB-Index of obj; lSta, lNr, lLen set. -1 no (more) line found see also: AP_search_def AP_search_obj / UTF_GetLinNr AP_obj_delCk1 UTF_GetLinNr UTF_del_rest UTF_find_tx1
int APED_search_defLn | ( | char ** | lSta, | |
int * | lNr, | |||
int * | lLen, | |||
char * | otx, | |||
int | lNEnd, | |||
int | src | |||
) |
Search last DefinitionLine Out: lSta Posi, wo spaeter weitergesucht wird .. ist Pointer auf den beginn der gefundenen Zeile .. lNr gefundene zeilenNummer; erste Zeile == 1. lLen Laenge der Zeile incl \n (und bei MS-Win \r) In: lNEnd ab (incl) dieser Zeile nicht mehr suchen. -1: bis zum Ende. otx zu suchendes Obj; zB "L20" src 0=UTF_FilBuf0; 1=UTF_FilBuf1 RetCod: 0 OK, def.line found -1 Error, def.line does not exist. see also: AP_search_def AP_search_obj / UTF_GetLinNr APED_nxt_def_typ AP_obj_delCk1 UTF_GetLinNr UTF_del_rest UTF_find_tx1
int APED_search_depLn | ( | char ** | lSta, | |
int * | lNr, | |||
int * | lLen, | |||
char * | otx | |||
) |
Search last dependant Line;
lNr mit Startpos *lSta ist eine Definitionline (z.B. "L22=...")
search begins in next Line !
Input:
lNr LineNr of Definitionline
lSta Startposition of lNr; NULL == not known.
otx what to search
Output:
lNr LineNr of found depLn
lSta Startposition of found depLn
lLen length of found depLn
RetCod: 0 Ok, found ..
-1 es existiert keine depending line zu obj otx
char AP_ED_oNam[64] |
objectName of active Line
char* UTF_FilBuf0 |
long UTF_FilBuf0Len |
char* UTF_FilBuf1 |
long UTF_FilBuf1Len |
char* Cmd1Tab[] |