X-Git-Url: https://www.hackdaworld.org/gitweb/?a=blobdiff_plain;f=nlsop_gui.c;fp=nlsop_gui.c;h=7949c55558c5a56cfe1d1f6e32ba34fb04b2e1ab;hb=b49c96b3def8a0907e366eac36be249f08e49799;hp=0000000000000000000000000000000000000000;hpb=5fab9a61a42474f7a0a2e54c5f2163e8fc241ca7;p=physik%2Fnlsop.git diff --git a/nlsop_gui.c b/nlsop_gui.c new file mode 100644 index 0000000..7949c55 --- /dev/null +++ b/nlsop_gui.c @@ -0,0 +1,216 @@ +/* + * nlsop gui code + * + * author: frank zirkelbach (frank.zirkelbach@physik.uni-augsburg.de) + * + * this program tries helping to understand the amorphous depuration + * and recrystallization of SiCx while ion implantation at temperatures + * below 400 degree celsius. + * hopefully the program will simulate the stabilization of the + * selforganizing lamella structure in the observed behaviour. + * + * refs: + * - J. K. N. Lindner. Habil.Schrift, Universitaet Augsburg. + * - Maik Haeberlen. Diplomarbeit, Universitaet Augsburg. + * + * Copyright (C) 2004 Frank Zirkelbach + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#define _GNU_SOURCE +#include +#include +#include +#include +#include +#include +#include + +#include "nlsop.h" +#include "dfbapi.h" +#include "random.h" + +#include "network.h" +#include "event.h" +#include "display.h" + +#include "nlsop_general.h" + +#define LOGFILE "~/.nlsop_logfile" + +int usage(char *prog) +{ + puts("usage:"); + printf("%s -i -p -l \n",prog); + return 1; +} + +/* + * gui internal functions + */ + +int display_new_line(t_display *display,char *text) { + + return 1; +} + +int send_and_wait_for_answer(t_net *net,t_display *display) { + + return 1; +} + +int send_job(t_net *net,t_input *input,t_display *display) { + + return 1; +} + +int get_command(t_event *event,void *allineed) { + + t_net *net; + t_display *display; + t_input *input; + + unsigned char data[64]; + + net=(t_net *)allineed; + display=(t_display *)(allineed+sizeof(t_net)); + input=(t_input *)(allineed+sizeof(t_net)+sizeof(t_display)); + + switch(input->content[0]) { + case GUI_INFO: + send_and_wait_for_answer(net,display); + break; + case GUI_ADDJOB: + send_job(net,input,display) + break; + case GUI_QUIT: + /* stop everything */ + event_math(0,event,READ,REMOVE); + network_shutdown(net); + display_shutdown(display); + input_shutdown(input); + event_shutdown(event); + return 2; + default: + display_new_line(display,"unknown gui command"); + break; + } + + return 1; +} + +/* + * main program + */ + +int main(int argc,char **argv) +{ + + char server_ip[16]; + char logfile[64]; + int port; + + t_net net; + t_event event; + t_display display; + t_input input; + + unsigned char data; + int i; + + int fd; + + void *allyouneed; + + /* default values */ + strcpy(logfile,LOGFILE); + strcpy(server_ip,""); + port=1025; + + /* parse/check argv */ + for(i=1;i