/** * @param ListNode l1 is the head of the linked list * @param ListNode l2 is the head of the linked list * @return: ListNode head of linked list */ ListNode *mergeTwoLists(ListNode *l1, ListNode *l2) { // Creates a dummy head. ListNode * dummy_head = new ListNode(INT_MIN); auto tail = dummy_head; while (l1 && l2) { AppendNode(l1->val < l2->val ? &l1 : &l2, &tail); } if (l1) { // Appends the remaining nodes of l1. AppendNode(&l1, &tail); } else if (l2) { // Appends the remaining nodes of l2. AppendNode(&l2, &tail); } return dummy_head->next; }
ListNode* mergeTwoLists(ListNode* l1, ListNode* l2) { ListNode* result = NULL; ListNode* pre = NULL; while (l1 != NULL && l2 != NULL) { if (l1->val < l2->val) { ListNode* first_node = ShiftNode(&l1); pre = AppendNode(pre, first_node); if (result == NULL) result = pre; } else if (l2->val < l1->val) { ListNode* first_node = ShiftNode(&l2); pre = AppendNode(pre, first_node); if (result == NULL) result = pre; } else { ListNode* first_node = ShiftNode(&l1); pre = AppendNode(pre, first_node); if (result == NULL) result = pre; first_node = ShiftNode(&l2); pre = AppendNode(pre, first_node); } } ListNode* remain_list = l1 != NULL ? l1 : l2; while (remain_list) { ListNode* first_node = ShiftNode(&remain_list); pre = AppendNode(pre, first_node); if (result == NULL) result = pre; } return result; }
TerminalNode* opNode::AppendTerminalNode(const opString& stringvalue, Token tokenid) { stacked<TerminalNode> terminal = NEWNODE(TerminalNode(stringvalue, tokenid, GetLine(), GetFile())); TerminalNode* newnode = *terminal; AppendNode(terminal); return newnode; }
/*----------------------------------------------------------------------------- * AddNode * Create a Node and add it to the end of the list *-----------------------------------------------------------------------------*/ void AddNode(TransformList *list, Transform *t) { TransformNode *node; /* Create the Node */ if((node = CreateNode(t)) == NULL) return; /* Add the Node to the list */ AppendNode(list, node); }
int qt_f_InputHandler(sXformsNode *head,xmlNode *node,struct sCbData **CallBackData,xmlDoc * modelDocPtr, CallBackInterfaceFunction func) { head->meta_info = (char *)"1"; char *name = sAppendString("Input_",itoa(inputctr)); xmlNode *lblitem = CreateItemNode(node,0,itoa(row),int2str[0]); Create1WidgetNodeWithStringProp(lblitem,sAppendString("Inputlbl_",itoa(inputctr)), "QLabel","text", head->name); xmlNode *inputitem = CreateItemNode(node,0,itoa(row),int2str[2]); xmlNode *InputWidget = Create1WidgetNode(inputitem,name,"QLineEdit",0,0,0,0); ActualName[lindex] = head->name; InputName[lindex] = name; lindex++; //AppendNode(&btn->nextref,"REFERENCE", "NULL","NULL",name,"QLineEdit"); sXformsNodeAttr *attr = getAttrFromList(head,"ref"); sXformsNodeAttr * attr_read_only = getAttrFromList(head,"readonly"); if(attr_read_only) { Create1PropertyNode(InputWidget,"readOnly","bool","true"); if(attr) { AppendNode(CallBackData,s_dupstr(attr->meta_info),"READONLY",(char *)0,s_dupstr(name),"Fl_Input",modelDocPtr,func); } else { AppendNode(CallBackData,int2str[0],"READONLY",int2str[0],s_dupstr(name),"Fl_Input",modelDocPtr,func); } } else { if(attr) { AppendNode(CallBackData,s_dupstr(attr->meta_info),s_dupstr(attr->private_data),(char *)0,s_dupstr(name),"Fl_Input",modelDocPtr,func); } else { AppendNode(CallBackData,int2str[0],int2str[0],int2str[0],s_dupstr(name),"Fl_Input",modelDocPtr,func); } } row++; inputctr++; }
/** * Adds a child node into a given node. * * @param Node node pointer which the child will be added, * if the node already has a child,<br> * it's appended to node's child level. * @param childNode pointer to the noded to be appended as a child */ void VDFTree::AppendChild(VDFNode *Node, VDFNode *childNode) { if(Node == NULL) return; childNode->parentNode = Node; if(Node->childNode) AppendNode(Node->childNode, childNode); else Node->childNode = childNode; }
int qt_f_RadioButtonList(sXformsNode *head,xmlNode *node,struct sCbData **CallBackData,xmlDoc * modelDocPtr, CallBackInterfaceFunction func) { static int radioctr = 0; head->meta_info = strdup("1"); xmlNode *lblitem = CreateItemNode(node,0,itoa(row),int2str[0]); Create1WidgetNodeWithStringProp(lblitem,sAppendString("DDlbl_",itoa(radioctr)), "QLabel","text", head->name); xmlNode *radioitem = CreateItemNode(node,0,itoa(row),int2str[2]); char *proptype[] = {"string","bool","bool"}; char *propname[] = {"title","checkable","checked"}; char *propval[] = {(char *)0,"false","false"}; xmlNode *QGroupBox = Create1WidgetNode(radioitem,sAppendString("QGroupBox_",itoa(radioctr)), "QGroupBox",propname,proptype,propval,3); sXformsNode *temp; sXformsNode *xfchoices = SearchSubTreeForNodes(head,(char *)"xf:choices",(sXformsNodeAttr *)0,0,0); if( xfchoices ){ xfchoices->meta_info = (char *)"1"; int ctr = 0; for( temp=xfchoices->child; temp != 0; ctr++, temp=temp->next){ char buffer[5]; sprintf(buffer,"%d",5 + 80*ctr); temp->meta_info = strdup(int2str[1]); char *radioname = sAppendString("radio_",itoa(ctr)); xmlNode *radio = Create1WidgetNode(QGroupBox,radioname,"QRadioButton",0,0,0,0); //AppendNode(CallBackData,"NULL-REFERENCE", "NULL-INITVAL","NULL-VAL",sAppendString("radio_",int2str[ctr]),"QRadioButton"); sXformsNodeAttr *attr = getAttrFromList(temp,"ref"); if(attr) { AppendNode(CallBackData,s_dupstr(attr->meta_info),s_dupstr(attr->private_data),(char *)0,radioname,"QRadioButton",modelDocPtr,func); } else { AppendNode(CallBackData,int2str[0],int2str[0],int2str[0],radioname,"QRadioButton",modelDocPtr,func); } Create1GeometryProp(radio,buffer,"0","108", "26"); CreateStringProperty(radio,"text",temp->name); } } radioctr++; row++; }
int main() { List list1, list2; list1 = CreateListPositive(); list2 = CreateListNegative(); printf("Now insert an node into list1\n"); List newNode1 = TryMalloc(); newNode1->Num = 0; newNode1->Next = NULL; InsertNode(list1, newNode1, 0); List newNode2 = TryMalloc(); newNode2->Num = 4; newNode2->Next = NULL; InsertNode(list1, newNode2, 4); PrintList(list1); printf("Append an element to the end of list2\n"); List appendNode = TryMalloc(); appendNode->Num = 88; appendNode->Next = NULL; AppendNode(list2, appendNode); PrintList(list2); printf("Now reverse list2...\n"); List reversedList = ReverseMyList(list2); PrintList(reversedList); printf("Now switchs 3 and 4 in list2...\n"); SwitchTwoNodes(reversedList, 3, 4); PrintList(reversedList); printf("Input \"y\" to destroy lists..."); char c = getchar(); getchar(); // Remove enter if(tolower(c) == 'y') { printf("Destrying the list...\n"); DestroyList(list1); DestroyList(list2); } }
static void GetNth()//START PROBLEM 2 { int boolean = 1; int content; struct node *head = NULL; while(boolean) { if(yesno("Would you like to enter a value (Y/N)?")) { read_int("Please enter your value: ", &content); AppendNode(&head, content); } else { boolean = 0; } } boolean = 1; //reset boolean to default to prepare for next while loop while(boolean) { short int boolean2; int value = 0; if(yesno("Do you want to search for the value of an element (Y/N)?")) { read_int("Please enter your value to search for: ", &content); boolean2 = GetValue(head, content, &value); if(boolean2 == 0) { printf("The list is either empty or the value you entered is out of range.\n"); } else { printf("The value of element %d is %d.\n", content, value); } } else { boolean = 0; } } freeElements(&head);//free up the allocated memory if(head == NULL) { printf("The head node was set to NULL.\n"); } }//END PROBLEM 2
int qt_f_RangeHandler(sXformsNode *head,xmlNode *node,struct sCbData **CallBackData,xmlDoc * modelDocPtr, CallBackInterfaceFunction func) { fprintf(stdout,"\n[%s][%d] HEAD = %s:%s \t\t NODE = %s",__func__,__LINE__,head->name, head->type,node->name); static int sliderctr = 0; xmlNode *lblitem = CreateItemNode(node,0,itoa(row++),int2str[0]); Create1WidgetNodeWithStringProp(lblitem,sAppendString("LabelSlider_",itoa(sliderctr++)), "QLabel","text", head->name); xmlNode *item = CreateItemNode(node,0,itoa(row++),int2str[0]); char *proptype[] = {"number","number","enum","enum","number"}; char *propval[] = {"100","50","Qt::Horizontal","QSlider::TicksBothSides","5"}; char *propname[] = {"maximum","value","orientation","tickPosition","tickInterval"}; Create1WidgetNode(item,sAppendString("Slider_",itoa(sliderctr)),"QSlider",propname,proptype,propval,5); //AppendNode(CallBackData,"REFERENCE", "NULL","NULL",sAppendString("Slider_",int2str[sliderctr]),"QSlider"); sXformsNodeAttr *attr = getAttrFromList(head,"ref"); if(attr) { AppendNode(CallBackData,s_dupstr(attr->meta_info),s_dupstr(attr->private_data),(char *)0,sAppendString("Slider_",itoa(sliderctr)),"QSlider",modelDocPtr,func); } else { AppendNode(CallBackData,int2str[0],int2str[0],int2str[0],sAppendString("Slider_",itoa(sliderctr)),"QSlider",modelDocPtr,func); } sliderctr++; row++; }
NS_IMETHODIMP inDOMView::SetRootNode(nsIDOMNode* aNode) { if (mTree) mTree->BeginUpdateBatch(); if (mRootDocument) { // remove previous document observer nsCOMPtr<nsINode> doc(do_QueryInterface(mRootDocument)); if (doc) doc->RemoveMutationObserver(this); } RemoveAllNodes(); mRootNode = aNode; if (aNode) { // If we are able to show element nodes, then start with the root node // as the first node in the buffer if (mWhatToShow & nsIDOMNodeFilter::SHOW_ELEMENT) { // allocate new node array AppendNode(CreateNode(aNode, nsnull)); } else { // place only the children of the root node in the buffer ExpandNode(-1); } // store an owning reference to document so that it isn't // destroyed before we are mRootDocument = do_QueryInterface(aNode); if (!mRootDocument) { aNode->GetOwnerDocument(getter_AddRefs(mRootDocument)); } // add document observer nsCOMPtr<nsINode> doc(do_QueryInterface(mRootDocument)); if (doc) doc->AddMutationObserver(this); } else { mRootDocument = nsnull; } if (mTree) mTree->EndUpdateBatch(); return NS_OK; }
/* Insert Nth Node to list */ void InsertNodeNth(Node **top, int n, int no, char *name) { // ここに解答を書き加える Node *ptr = *top; // n = 1では必ずInsertNode if (n == 1) { InsertNode(top, no, name); return; } int i; // ptr(カーソル)をnまで移動 for (i = 0; i < n - 1; i++) { ptr = ptr->next; // 3つしかないリストにn=8など無茶されたとき if (ptr == NULL) return; } // バックアップ的なもの Node backup = *ptr; // ここでn個目に追加する SetNode(ptr, no, name, ptr->next); // 残った要素を1つずつずらす // backupとリストの中の要素を交換するためのtemp Node temp; while (ptr->next != NULL) { ptr = ptr->next; //printf("address of ptr: %p\n", ptr); //printf("*ptr->no: %d\n", ptr->no); SetNode(&temp, ptr->no, ptr->name, NULL); SetNode(ptr, backup.no, backup.name, ptr->next); SetNode(&backup, temp.no, temp.name, NULL); } // 要素がひとつ増えるのでAppend AppendNode(top, backup.no, backup.name); }
/*--- メイン ---*/ int main(void) { Menu menu; Node *list; InitList(&list); do { Node x; int n; char name[NAMELEN]; switch (menu = SelectMenu()) { case Insert: x = Read("挿入"); InsertNode(&list, x.no, x.name); break; case InsertNth: x = Read("挿入"); printf("何番目? "); scanf("%d", &n); InsertNodeNth(&list, n, x.no, x.name); break; case Append: x = Read("挿入"); AppendNode(&list, x.no, x.name); break; case Delete: DeleteNode(&list); break; case DeleteNth: printf("何番目? "); scanf("%d", &n); DeleteNodeNth(&list, n); break; case Clear: ClearList(&list); break; case Print: PrintList(&list); break; } } while (menu != Term); TermList(&list); return (0); }
/*----------------------------------------------------------------------------- * CopyList * Take a list, copy it, but exclude the actual Transform data *-----------------------------------------------------------------------------*/ void CopyList(TransformList *from, TransformList *to) { TransformNode* node = from->root; /* Verify the list */ if(from->root == NULL) return; /* Copy the list */ node = from->root; while(node != NULL) { TransformNode* newNode; Transform* t; /* Create a new node */ if((newNode = (TransformNode*)malloc(sizeof(TransformNode))) == NULL) { perror("2D"); exit(EXIT_FAILURE); } if((t = (Transform*)malloc(sizeof(Transform))) == NULL) { perror("2D"); exit(EXIT_FAILURE); } t->type = node->data->type; t->axis = node->data->axis; t->value = 0; newNode->data = t; /* Copy the node */ AppendNode(to, newNode); /* Goto next node */ node = node->next; } }
bool SlowControlDB::Load(TFile* f,unsigned int minT,unsigned int maxT,int idebug){ int n_add=0; if(!f){ std::cerr<<"file not found"<<std::endl; return false; } TTree* _tree=(TTree*)f->Get("SlowControlDB"); if(!_tree){ std::cerr<<"SlowControlDB tree not found"<<std::endl; return false; } if(_tree->GetEntries()<1){ std::cerr<<"tree entries: "<<_tree->GetEntries()<<std::endl; return false; } else{ if(idebug)std::cout<<" slowcontroldir entries "<<_tree->GetEntries()<<std::endl; } unsigned int tree_begin=0; unsigned tree_end=0; //_tree->SetBranchStatus("*",0); _tree->SetBranchAddress("begin",&tree_begin); _tree->SetBranchAddress("end",&tree_end); _tree->SetBranchAddress("uncompleted",&uncompleted); TObjArray *branchlist=_tree->GetListOfBranches(); Node* nodearr[branchlist->GetEntries()]; for(int i=0;i<(int)branchlist->GetEntries();i++){ nodearr[i]=0; TObject* obj=(TObject*)branchlist->At(i); if((strcmp(obj->ClassName(),"TBranchElement")==0)) _tree->SetBranchAddress(branchlist->At(i)->GetName(),&nodearr[i]); if(idebug)std::cout << "name: "<< branchlist->At(i)->GetName() << " "<<obj->ClassName()<<std::endl; // if(!(strcmp(obj->ClassName(),"TBranchElement")==0)){ // _tree->SetBranchStatus(branchlist->At(i)->GetName(),0); // if(idebug)std::cout << "namezero: "<< branchlist->At(i)->GetName() << std::endl; // } } _tree->SetBranchStatus("begin",1); _tree->SetBranchStatus("end",1); _tree->SetBranchStatus("uncompleted",1); for(int i=0;i<(int)_tree->GetEntries();i++){ int nb=_tree->GetEntry(i); if(idebug)std::cout<<"entry "<<i<<" begin "<<tree_begin<<" end "<<tree_end <<" - add? "<<(tree_begin<maxT&&tree_end>minT)<<" nb "<<nb<<std::endl; //if(tree_begin>maxT||tree_end<minT)continue; n_add++; if(tree_end>end)end=tree_end; if(begin==0||tree_begin<begin)begin=tree_begin; for(int j=0;j<(int)branchlist->GetEntries();j++){ TObject* obj=(TObject*)branchlist->At(j); if(strcmp(obj->ClassName(),"TBranchElement")==0){ nodearr[j]->SetName(obj->GetName()); AppendNode((Node*)nodearr[j],minT,maxT); } delete nodearr[j]; nodearr[j]=0; } } if(_tree)delete _tree; if(f)f->Close("R"); if(f) delete f; if(idebug)std::cout<<"files merged to SlowControlDB "<<n_add<<std::endl; return n_add; }
//read the mobility file and generates a hashtable of linked list with key pointing to vehicle id hash_table_t* read_mobility_file(char mobility_file[]){ FILE *fp; char str[128]; hash_table_t *table = hash_table_new(MODE_ALLREF); if((fp=fopen(mobility_file, "r"))==NULL) { printf("Cannot open file. %s\n",mobility_file); exit(1); } Exnode* headRef; node_info* Node_info=NULL; head_node_info=Node_info; int *keyholder[10]; int i=0; while(!feof(fp)) { if(fgets(str, 126, fp)) { // happy go for small mobility file :-) char * pch; int fmt=0; pch = strtok (str," "); // the separator between the items in the list is a space Exnode* node = malloc(sizeof(Exnode)); while (pch != NULL) { node->visit=0; switch(fmt){ case 0: node->time=atof(pch); break; case 1: node->vid =atoi(pch); break; case 2: node->x=atof(pch); break; case 3: node->y=atof(pch); break; case 4: node->speed=atof(pch); break; default: //need a log statement here break; } fmt +=1; pch = strtok (NULL, " "); } node->next=NULL; //check in the hash table if the key exist node->vid if exist ? initialize headRef int *value = NULL; value = (int *)HT_LOOKUP(table, &node->vid); if (value==NULL){ if (Node_info==NULL){ Node_info=build_node_info(Node_info,node->vid,&(node->vid)); head_node_info=Node_info; } else{ build_node_info(Node_info,node->vid,&(node->vid)); } keyholder[i]=&node->vid;i++; //printf("Before to hash %p %d %lf\n",node,(node->vid),(node->time)); hash_table_add(table, &(node->vid), sizeof(node->vid), node, sizeof(&node)); //puts("NO node doesnt exist"); headRef=gen_list(); } else{ //puts("Yes node exist"); headRef = (Exnode *)value; //printf("After from hash %p %d\n",headRef, headRef->vid ); } if (headRef!=NULL){ AppendNode(headRef, node); } } } fclose(fp); return table; }
/*----------------------------------------------------------------------------- * Mouse * Handles Mouse Movement and Selection *-----------------------------------------------------------------------------*/ void Mouse(int button, int state, int x, int y) { GLuint nameBuffer[BUF_SIZ]; GLint hits; GLint viewport[4]; if(levelComplete == TRUE) return; if((button == GLUT_LEFT_BUTTON) && (state == GLUT_DOWN)) { /* Get the Viewport and set to Projection */ glGetIntegerv( GL_VIEWPORT, viewport ); glMatrixMode( GL_PROJECTION ); /* Save the Projection matrix */ glPushMatrix( ); glLoadIdentity( ); gluPickMatrix( (GLdouble)x, (GLdouble)(viewport[3] - y), N, N, viewport ); gluOrtho2D( xmin, xmax, ymin, ymax ); /* Set the Render Mode to the Selection mode */ glMatrixMode( GL_MODELVIEW ); glSelectBuffer(BUF_SIZ, nameBuffer); glRenderMode( GL_SELECT ); /* Initialize the Object Naming */ glInitNames( ); glPushName( 0 ); /* Draw the Shapes with Select enabled */ Draw( ); /* Reset the Projection Matrix */ glMatrixMode( GL_PROJECTION ); glPopMatrix( ); /* Return drawing to MODELVIEW */ glMatrixMode( GL_MODELVIEW ); /* Get the number of hits */ hits = glRenderMode( GL_RENDER ); ProcessHits( hits, nameBuffer ); /* Call a movement */ MouseMove( x, y ); /* Draw the display */ glutPostRedisplay( ); } else if((button == GLUT_LEFT_BUTTON) && (state == GLUT_UP)) { if(selectedNode != NULL) { TransformList* from = NULL; TransformList* to = NULL; /* Check if its in the dimension */ if(((selectedIndex / SELECTED) == 1) && (lastX > 100.0) && (lastY > -100)) { from = &tlSelectedTransforms; to = &tlAvailableTransforms; selectedList = &tlAvailableTransforms; } else if(((selectedIndex / AVAILABLE) == 1) && (lastY < -100) && (lastX < 100.0)) { from = &tlAvailableTransforms; to = &tlSelectedTransforms; selectedList = &tlSelectedTransforms; } if((from != NULL) && (to != NULL)) { /* Swap the nodes */ RemoveNode(from, selectedNode); AppendNode(to, selectedNode); } /* Reset the mouse display */ selectedIndex = 0; /* Set the new position */ glutPostRedisplay( ); } } }
struct qt_cb_data * MakeDummy() { struct qt_cb_data *head = (struct qt_cb_data *)0; struct qt_cb_data *btn = AppendNode(&head,"btn_personal_info", "NULL","NULL","BtnDone_Main","QPushButton"); struct qt_cb_data *btn1 = AppendNode(&head,"btn_personal_info", "NULL","NULL","BtnPersonalInfoDone","QPushButton"); struct qt_cb_data *btn2 = AppendNode(&head,"btn_personal_info", "NULL","NULL","BtnLoginInfoDone","QPushButton"); struct qt_cb_data *btn3 = AppendNode(&head,"btn_personal_info", "NULL","NULL","BtnProjectInsertDone","QPushButton");// struct qt_cb_data *btn4 = AppendNode(&head,"btn_personal_info", "NULL","NULL","BtnSliderValueDone","QPushButton"); struct qt_cb_data *dd1 = AppendNode(&head,"btn_personal_info", "NULL","NULL","PersonalInfo_NamePrefix","QComboBox"); struct qt_cb_data *radio_button1 = AppendNode(&head,"btn_personal_info", "NULL","NULL","radioButton_male","QRadioButton"); struct qt_cb_data *radio_button2 = AppendNode(&head,"btn_personal_info", "NULL","NULL","radioButton_female","QRadioButton"); struct qt_cb_data *radio_button3 = AppendNode(&head,"btn_personal_info", "NULL","NULL","radioButton_none","QRadioButton"); struct qt_cb_data *check_button1 = AppendNode(&head,"btn_personal_info", "NULL","NULL","checkBox_newspaper1","QCheckBox"); struct qt_cb_data *check_button2 = AppendNode(&head,"btn_personal_info", "NULL","NULL","checkBox_newspaper2","QCheckBox"); struct qt_cb_data *check_button3 = AppendNode(&head,"btn_personal_info", "NULL","NULL","checkBox_newspaper3","QCheckBox"); struct qt_cb_data *check_button4 = AppendNode(&head,"btn_personal_info", "NULL","NULL","checkBox_newspaper4","QCheckBox"); struct qt_cb_data *check_button5 = AppendNode(&head,"btn_personal_info", "NULL","NULL","checkBox_newspaper5","QCheckBox"); struct qt_cb_data *slider = AppendNode(&head,"btn_personal_info", "NULL","NULL","SliderDemo","QSlider"); //struct qt_cb_data *CheckBtn1 = AppendNode(&head,"btn_personal_info", "NULL","NULL","checkbutton_newpaper1","GtkCheckButton"); //struct qt_cb_data *CheckBtn2 = AppendNode(&head,"btn_personal_info", "NULL","NULL","checkbutton_newpaper3","GtkCheckButton"); //struct qt_cb_data *CheckBtn3 = AppendNode(&head,"btn_personal_info", "NULL","NULL","checkbutton_newpaper5","GtkCheckButton"); //struct qt_cb_data *btn1 = AppendNode(&btn->nextref,"ref2", "init_val","value","combobox_prefix","GtkComboBox"); //struct qt_cb_data *btn2 = AppendNode(&btn->nextref,"ref2", "init_val","value","entry_FirstName","GtkEntry"); //struct qt_cb_data *btn3 = AppendNode(&btn->nextref,"ref2", "init_val","value","entry_MiddleName","GtkEntry"); //struct qt_cb_data *btn31 = AppendNode(&btn->nextref,"ref2", "init_val","value","entry_LastName","GtkEntry"); //struct qt_cb_data *btn32 = AppendNode(&btn->nextref,"ref2", "init_val","value","entry_dob","GtkEntry");//entry_dob //struct qt_cb_data *btn33 = AppendNode(&btn->nextref,"ref2", "init_val","value","radiobutton_nothing","GtkRadioButton"); //struct qt_cb_data *btn4 = AppendNode(&head,"combobox_prefix", "init_val","value","combobox_prefix","GtkComboBox"); return head; }