layout.c
changeset 891 b940ac76c22f
parent 889 00f4180df72b
child 892 42bf8e618d52
equal deleted inserted replaced
890:3ece6b5b9647 891:b940ac76c22f
   196 void
   196 void
   197 setlayout(const char *arg) {
   197 setlayout(const char *arg) {
   198 	int i;
   198 	int i;
   199 
   199 
   200 	if(!arg) {
   200 	if(!arg) {
   201 		for(i = 0; i < nlayouts && lt != &layout[i]; i++);
   201 		lt++;
   202 		if(i == nlayouts - 1)
   202 		if(lt == layout + nlayouts)
   203 			lt = &layout[0];
   203 			lt = layout;
   204 		else
       
   205 			lt = &layout[++i];
       
   206 	}
   204 	}
   207 	else {
   205 	else {
   208 		i = atoi(arg);
   206 		i = atoi(arg);
   209 		if(i < 0 || i >= nlayouts)
   207 		if(i < 0 || i >= nlayouts)
   210 			return;
   208 			return;