@@ -192,30 +192,6 @@ void prefs_other(void)
192192 }
193193}
194194
195- /* /\** */
196- /* * prefs_fill() */
197- /* * Toggle fill on/off */
198- /* *\/ */
199- /* void prefs_fill(void) */
200- /* { */
201- /* prefs_clear(); */
202- /* prefs_display("FILL: Y)ES N)O: "); */
203- /* ch=prefs_get_key_matching("ynYN"); */
204- /* switch(ch) */
205- /* { */
206- /* case 'y': */
207- /* prefs_select(" YES"); */
208- /* config.fill=true; */
209- /* break; */
210- /* case 'n': */
211- /* prefs_select(" NO"); */
212- /* config.fill=false; */
213- /* break; */
214- /* } */
215- /* prefs_clear(); */
216- /* prefs_other(); */
217- /* } */
218-
219195/**
220196 * prefs_xonoff()
221197 * Set xon/off buffers
@@ -271,43 +247,36 @@ void prefs_baud(void)
271247 case '3' :
272248 prefs_select ("300" );
273249 config .baud = SER_BAUD_300 ;
274- io_prefs_updated = true;
275- prefs_need_updating = true;
276250 break ;
277251 case '1' :
278252 prefs_select ("1200" );
279253 config .baud = SER_BAUD_1200 ;
280- io_prefs_updated = true;
281- prefs_need_updating = true;
282254 break ;
283255 case '2' :
284256 prefs_select ("2400" );
285257 config .baud = SER_BAUD_2400 ;
286- io_prefs_updated = true;
287- prefs_need_updating = true;
288258 break ;
289259 case '9' :
290260 prefs_select ("9600" );
291261 config .baud = SER_BAUD_9600 ;
292- io_prefs_updated = true;
293- prefs_need_updating = true;
294262 break ;
295263 case 'q' :
296264 prefs_select ("19200" );
297265 config .baud = SER_BAUD_19200 ;
298- io_prefs_updated = true;
299- prefs_need_updating = true;
300266 break ;
301267 case 'w' :
302268 prefs_select ("38400" );
303269 config .baud = SER_BAUD_38400 ;
304- io_prefs_updated = true;
305- prefs_need_updating = true;
306270 break ;
307271 case 'b' :
308272 prefs_select ("back" );
309273 break ;
310274 }
275+ if (ch != 'b' )
276+ {
277+ io_prefs_updated = true;
278+ prefs_need_updating = true;
279+ }
311280}
312281
313282/**
@@ -328,173 +297,6 @@ void prefs_interface(void)
328297 }
329298}
330299
331- /* /\** */
332- /* * prefs_dhcp(void) */
333- /* * Preferences menu to enable/disable dhcp */
334- /* *\/ */
335- /* void prefs_dhcp(void) */
336- /* { */
337- /* prefs_display("dhcp - y)es n)o b)ack: "); */
338-
339- /* ch=prefs_get_key_matching("ynbYNB"); */
340-
341- /* switch(ch) */
342- /* { */
343- /* case 'y': */
344- /* prefs_select("yes"); */
345- /* config.use_dhcp=true; */
346- /* io_prefs_updated=true; */
347- /* prefs_need_updating=true; */
348- /* break; */
349- /* case 'n': */
350- /* prefs_select("no"); */
351- /* config.use_dhcp=false; */
352- /* io_prefs_updated=true; */
353- /* prefs_need_updating=true; */
354- /* break; */
355- /* case 'b': */
356- /* prefs_select("back"); */
357- /* break; */
358- /* } */
359- /* } */
360-
361- /* /\** */
362- /* * prefs_get_address() */
363- /* * get string with ip address numbers, terminated by return. */
364- /* *\/ */
365- /* void prefs_get_address(void) */
366- /* { */
367- /* unsigned char strp=0; */
368-
369- /* ch=0; */
370-
371- /* while (ch != 0x0d) */
372- /* { */
373- /* ch=prefs_get_key_matching1("0123456789."); */
374- /* if (ch==0x08) /\* was translated from 0x14 to 0x08 *\/ */
375- /* { */
376- /* if (strp>0) */
377- /* { */
378- /* --strp; */
379- /* temp_ip_address[strp]=0; */
380- /* ShowPLATO(&ch,1); */
381- /* } */
382- /* } */
383- /* else if (ch==0x0d) */
384- /* { */
385- /* // Don't append or show the CR */
386- /* } */
387- /* else */
388- /* { */
389- /* temp_ip_address[strp]=ch; */
390- /* ShowPLATO(&ch,1); */
391- /* ++strp; */
392- /* } */
393- /* } */
394- /* } */
395-
396- /* /\** */
397- /* * prefs_ip(void) */
398- /* * Preferences menu for IP address */
399- /* *\/ */
400- /* void prefs_ip(void) */
401- /* { */
402- /* prefs_display("ip address (x.x.x.x) or return for none: "); */
403- /* prefs_get_address(); */
404- /* config.ip_address = parse_dotted_quad(temp_ip_address); */
405- /* prefs_select(" ok"); */
406- /* io_prefs_updated=true; */
407- /* prefs_need_updating=true; */
408- /* } */
409-
410- /* /\** */
411- /* * prefs_dns(void) */
412- /* * Preferences menu for dns */
413- /* *\/ */
414- /* void prefs_dns(void) */
415- /* { */
416- /* prefs_display("dns (x.x.x.x) or return for none: "); */
417- /* prefs_get_address(); */
418- /* config.dns = parse_dotted_quad(temp_ip_address); */
419- /* prefs_select(" ok"); */
420- /* io_prefs_updated=true; */
421- /* prefs_need_updating=true; */
422- /* } */
423-
424- /* /\** */
425- /* * prefs_netmask(void) */
426- /* * Preferences menu for netmask */
427- /* *\/ */
428- /* void prefs_netmask(void) */
429- /* { */
430- /* prefs_display("netmask (x.x.x.x) or return for none: "); */
431- /* prefs_get_address(); */
432- /* config.netmask = parse_dotted_quad(temp_ip_address); */
433- /* prefs_select(" ok"); */
434- /* io_prefs_updated=true; */
435- /* prefs_need_updating=true; */
436- /* } */
437-
438- /* /\** */
439- /* * prefs_ip(void) */
440- /* * Preferences menu for IP address */
441- /* *\/ */
442- /* void prefs_gateway(void) */
443- /* { */
444- /* prefs_display("gateway (x.x.x.x) or return for none: "); */
445- /* prefs_get_address(); */
446- /* config.gateway = parse_dotted_quad(temp_ip_address); */
447- /* prefs_select(" ok"); */
448- /* io_prefs_updated=true; */
449- /* prefs_need_updating=true; */
450- /* } */
451-
452- /* /\** */
453- /* * prefs_ethernet(void) */
454- /* * Preferences menu to show for ethernet devices. */
455- /* *\/ */
456- /* void prefs_ethernet(void) */
457- /* { */
458- /* prefs_display("i)nterface d)hcp p)ip n)etmask g)ateway w)dns s)save e)xit: "); */
459-
460- /* ch=prefs_get_key_matching("idpngwseIDPNGWSE"); */
461-
462- /* switch(ch) */
463- /* { */
464- /* case 'i': */
465- /* prefs_select("interface"); */
466- /* prefs_interface(); */
467- /* break; */
468- /* case 'd': */
469- /* prefs_select("dhcp"); */
470- /* prefs_dhcp(); */
471- /* break; */
472- /* case 'p': */
473- /* prefs_select("ip"); */
474- /* prefs_ip(); */
475- /* break; */
476- /* case 'n': */
477- /* prefs_select("netmask"); */
478- /* prefs_netmask(); */
479- /* break; */
480- /* case 'g': */
481- /* prefs_select("gateway"); */
482- /* prefs_gateway(); */
483- /* break; */
484- /* case 'w': */
485- /* prefs_select("dns"); */
486- /* prefs_dns(); */
487- /* break; */
488- /* case 's': */
489- /* prefs_select("save"); */
490- /* prefs_save(); */
491- /* break; */
492- /* case 'e': */
493- /* prefs_running=false; */
494- /* break; */
495- /* } */
496- /* } */
497-
498300/**
499301 * prefs_display(text)
500302 * Display a line of the preferences menu
@@ -658,9 +460,9 @@ void prefs_update(void)
658460}
659461
660462/**
661- * prefs_check_for_change
463+ * prefs_check_for_touch_change
662464 */
663- void prefs_check_for_change (void )
465+ void prefs_check_for_touch_change (void )
664466{
665467 if (ch != 'b' )
666468 {
@@ -669,6 +471,18 @@ void prefs_check_for_change(void)
669471 }
670472}
671473
474+ /**
475+ * prefs_check_for_io_change
476+ */
477+ void prefs_check_for_io_change (void )
478+ {
479+ if (ch != 'b' )
480+ {
481+ io_prefs_updated = true;
482+ prefs_need_updating = true;
483+ }
484+ }
485+
672486/**
673487 * close prefs.
674488 */
0 commit comments