@@ -27,6 +27,7 @@ typedef void (*CALLUPDATE)(MMS* m);
2727 void lowerLimit (int m);
2828 void upperLimit (int m);
2929 MMS* move (int CW);
30+ void setChild (int m);
3031 void save ();
3132 void backup ();
3233 void restore ();
@@ -156,6 +157,23 @@ void MMS::set(char* t) {
156157 strcpy (this ->curr ->mText ,t);
157158 return ;
158159}
160+ void MMS::setChild (int m) {
161+ if (this ->curr ==NULL ) {
162+ return ;
163+ }
164+ MMS* p=this ->child ;
165+ (TRACE>=0x02 ? fprintf (stderr," %s::setChild() Pointing to value (%d)\n " ,PROGRAMID,m) : _NOP);
166+ while (p->next !=NULL ) {
167+ (TRACE>=0x02 ? fprintf (stderr," %s::setChild() current value(%d)\n " ,PROGRAMID,p->mVal ) : _NOP);
168+ if (p->mVal == m) {
169+ this ->curr =p;
170+ (TRACE>=0x02 ? fprintf (stderr," %s::setChild() pointer set(%d)\n " ,PROGRAMID,p->mVal ) : _NOP);
171+ return ;
172+ }
173+ p=p->next ;
174+ }
175+
176+ }
159177// *-------------------------------------------------------------------------------------------------
160178// * add a child beneath a parent, link both and place child at the end of the current list
161179// *-------------------------------------------------------------------------------------------------
@@ -175,7 +193,7 @@ void MMS::add(MMS* child) {
175193 child->prev =NULL ;
176194 child->last =NULL ;
177195 if (parent->procChange !=NULL ) {parent->procChange (child);}
178- (TRACE>=0x02 ? fprintf (stderr," %s::constructor () tracelevel(%d)\n " ,PROGRAMID,TRACE) : _NOP);
196+ (TRACE>=0x03 ? fprintf (stderr," %s::add () tracelevel(%d)\n " ,PROGRAMID,TRACE) : _NOP);
179197 return ;
180198 }
181199
0 commit comments