rem: case "getdomain":	getdomain(courbe); break; case "getrange":	getrange(courbe); break; case "getfix":		getfix(courbe); break; case "getsustain":	getsustain(courbe); break; case "getgridstep":	getgridstep(courbe); break; case "getbrgb":		GetColor(courbe, "brgb"); break; case "getfrgb":		GetColor(courbe, "frgb"); break; case "getrgb2":		GetColor(courbe, "rgb2"); break; case "getrgb3":		GetColor(courbe, "rgb3"); break; case "getrgb4":		GetColor(courbe, "rgb4"); break; case "getrgb5":		GetColor(courbe, "rgb5"); break; case "getnbpoints":	getnbpoints(courbe); break; case "getzoom_x":	getzoom_x(courbe); break; case "getzoom_y":	getzoom_y(courbe); break; 
add: case "getdomain":	getdomain(courbe); tmpReturn++; break; case "getrange":	getrange(courbe); tmpReturn++; break; case "getfix":		getfix(courbe); tmpReturn++; break; case "getsustain":	getsustain(courbe); tmpReturn++; break; case "getgridstep":	getgridstep(courbe); tmpReturn++; break; case "getbrgb":		GetColor(courbe, "brgb"); tmpReturn++; break; case "getfrgb":		GetColor(courbe, "frgb"); tmpReturn++; break; case "getrgb2":		GetColor(courbe, "rgb2"); tmpReturn++; break; case "getrgb3":		GetColor(courbe, "rgb3"); tmpReturn++; break; case "getrgb4":		GetColor(courbe, "rgb4"); tmpReturn++; break; case "getrgb5":		GetColor(courbe, "rgb5"); tmpReturn++; break; case "getnbpoints":	getnbpoints(courbe); tmpReturn++; break; case "getzoom_x":	getzoom_x(courbe); tmpReturn++; break; case "getzoom_y":	getzoom_y(courbe); tmpReturn++; break; 
context: function ArgsParser(courbe, msg, a) {	// en fonction du nombre d'arguments 1 (interpolationX-Y) 2 (AddPoint) 3 (MovePoint)	var tmpReturn = -1;	var NeedDraw = 0;	// pour savoir si on doit	var NeedNotify = 0;	if ( typeof(a[0]) == "number") {		switch (a.length) {			case 1: Interpolation(courbe, a[0]); break;			case 2: AddPoint(courbe, val2x(courbe, a[0]), val2y(courbe, a[1])); NeedDraw++; NeedNotify++; break;			case 3: MovePoint(courbe, a[0], a[1], a[2]); NeedDraw++; NeedNotify++; break;			default: perror("too many arguments for message", msg); break;		}		return ( (NeedNotify > 0 ? 2 : 0) + (NeedDraw > 0 ? 1 : 0) );	// sort de la fonction	}	switch (a[0]) {		case "bang":		line(courbe); tmpReturn++; break;		case "clear":		redrawoff(); a.length == 1 ? MyClear(courbe) : MyClear(courbe, a); NeedDraw++; NeedNotify++; tmpReturn++; break;		case "clearsustain":	redrawoff(); MyClearSustain(courbe); NeedDraw++; NeedNotify++; tmpReturn++; break;		case "dump":		a.length == 2 ? MyDump(courbe, a[1]) : MyDump(courbe); tmpReturn++; break;		case "listdump":	a.length == 2 ? MyListDump(courbe, a[1]) : MyListDump(courbe); tmpReturn++; break;		case "addpoints":	MyAddPoints(courbe, a); NeedDraw++; NeedNotify++; tmpReturn++; break;		case "fix":			if (a.length == 3) { FixPoint(courbe, a[1], a[2]); } ; NeedNotify++; tmpReturn++; break;		case "unfix":		MyUnfix(courbe); NeedNotify++; tmpReturn++; break;		case "name":		redrawoff(); if (a.length == 2) { MyName(courbe, a[1]);} ; getname(); NeedDraw++; NeedNotify++; tmpReturn++; break;		case "next":		MyNext(courbe); tmpReturn++; break;		case "nth":			if (a.length == 2) { MyNth(a[1], courbe); } ; tmpReturn++; break;		case "sustain":		redrawoff(); if (a.length == 3) { MySustain(a[1], a[2], courbe); } ; NeedDraw++; NeedNotify++; tmpReturn++; break;		case "domain":							redrawoff(); 							if (a.length == 2)								MyDomain(0, a[1], courbe);							else if (a.length == 3)								MyDomain(a[1], a[2], courbe);							else								perror("bad argument(s) for message domain"); 							NeedDraw++; NeedNotify++; tmpReturn++; break;		case "setdomain":								redrawoff(); 							if (a.length == 2)								MySetDomain(0, a[1], courbe);							else if (a.length == 3)								MySetDomain(a[1], a[2], courbe);							else								perror("bad argument(s) for message setdomain"); 							NeedDraw++; NeedNotify++; tmpReturn++; break;		case "range":		redrawoff(); if (a.length == 3) { range(a[1], a[2], courbe);};  NeedDraw++; NeedNotify++; tmpReturn++; break;		case "setrange":	redrawoff(); if (a.length == 3) { setrange(a[1], a[2], courbe);} ; NeedDraw++; NeedNotify++; tmpReturn++; break;		case "zoom_x":		redrawoff(); zoom_x(a[1], a[2], courbe); NeedDraw++; tmpReturn++; break;		case "zoom_y":		redrawoff(); zoom_y(a[1], a[2], courbe); NeedDraw++; tmpReturn++; break;		case "zoomout":		redrawoff(); MyZoomOut(courbe); NeedDraw++; tmpReturn++; break;		case "autodomain":	redrawoff(); MyAutoDomain(courbe); NeedDraw++; NeedNotify++; tmpReturn++; break;		case "autorange":	redrawoff(); MyAutoRange(courbe); NeedDraw++; NeedNotify++; tmpReturn++; break;		case "removeduplicate": 	redrawoff(); MyRemoveDuplicate(courbe); NeedDraw++; NeedNotify++; tmpReturn++; break;		case "smooth":		redrawoff(); MySmooth(courbe); NeedDraw++; NeedNotify++; tmpReturn++; break;		case "gridstep":	redrawoff(); if (a.length == 2) { MyGridStep(courbe, a[1]); }; NeedDraw++; NeedNotify++; tmpReturn++; break;		case "brgb":		redrawoff(); SetColor(courbe, "brgb", a[1], a[2], a[3]); NeedDraw++; tmpReturn++; break;		case "frgb":		redrawoff(); SetColor(courbe, "frgb", a[1], a[2], a[3]); NeedDraw++; tmpReturn++; break;		case "rgb2":		redrawoff(); SetColor(courbe, "rgb2", a[1], a[2], a[3]); NeedDraw++; tmpReturn++; break;		case "rgb3":		redrawoff(); SetColor(courbe, "rgb3", a[1], a[2], a[3]); NeedDraw++; tmpReturn++; break;		case "rgb4":		redrawoff(); SetColor(courbe, "rgb4", a[1], a[2], a[3]); NeedDraw++; tmpReturn++; break;		case "rgb5":		redrawoff(); SetColor(courbe, "rgb5", a[1], a[2], a[3]); NeedDraw++; tmpReturn++; break;		case "pastefunction":	redrawoff(); MyPasteFunction(courbe); NeedDraw++; NeedNotify++; tmpReturn++; break;		case "pastecolors":	redrawoff(); MyPasteColors(courbe); NeedDraw++; tmpReturn++; break;		// get things		case "getdomain":	getdomain(courbe); break;		case "getrange":	getrange(courbe); break;		case "getfix":		getfix(courbe); break;		case "getsustain":	getsustain(courbe); break;		case "getgridstep":	getgridstep(courbe); break;		case "getbrgb":		GetColor(courbe, "brgb"); break;		case "getfrgb":		GetColor(courbe, "frgb"); break;		case "getrgb2":		GetColor(courbe, "rgb2"); break;		case "getrgb3":		GetColor(courbe, "rgb3"); break;		case "getrgb4":		GetColor(courbe, "rgb4"); break;		case "getrgb5":		GetColor(courbe, "rgb5"); break;		case "getnbpoints":	getnbpoints(courbe); break;		case "getzoom_x":	getzoom_x(courbe); break;		case "getzoom_y":	getzoom_y(courbe); break;		default: 			// message d'erreurs en fonction du type de message all ou pas							if (msg == "all") {								if (DisplayOneTime == 1) {									perror("bad arguments for message all");									DisplayOneTime = 0;								}							} else								perror("doesn't understand", msg);							tmpReturn++;							break;	}		if (tmpReturn == -1)		return -1;	else		return ( (NeedNotify > 0 ? 2 : 0) + (NeedDraw > 0 ? 1 : 0) );}
meta: 6421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6421/88df6a0b8b4a2372a89baf38cb59b5676710537b/ej.function.js/buggy/ejies-jsui/ej.function.js