comparison main.c @ 156:1e8f4b05cb65

Remove trailing whitespace (thanks to Charlie Shepherd), and a couple comment tweaks.
author Rob Landley <rob@landley.net>
date Thu, 15 Nov 2007 18:30:30 -0600
parents 668d5abde8b0
children ed26d3529575
comparison
equal deleted inserted replaced
155:6c7836dbc16e 156:1e8f4b05cb65
38 // Binary search to find this applet. 38 // Binary search to find this applet.
39 39
40 top = TOY_LIST_LEN-1; 40 top = TOY_LIST_LEN-1;
41 for (;;) { 41 for (;;) {
42 int result; 42 int result;
43 43
44 middle = (top+bottom)/2; 44 middle = (top+bottom)/2;
45 if (middle<bottom || middle>top) return NULL; 45 if (middle<bottom || middle>top) return NULL;
46 result = strcmp(name,toy_list[middle].name); 46 result = strcmp(name,toy_list[middle].name);
47 if (!result) return toy_list+middle; 47 if (!result) return toy_list+middle;
48 if (result<0) top=--middle; 48 if (result<0) top=--middle;