Mercurial > octave
comparison src/variables.cc @ 984:6aeb8fdc27d4
[project @ 1994-12-14 17:51:23 by jwe]
author | jwe |
---|---|
date | Wed, 14 Dec 1994 17:52:04 +0000 |
parents | 58f0c171bbbd |
children | 18be848f10a9 |
comparison
equal
deleted
inserted
replaced
983:3611f5b12826 | 984:6aeb8fdc27d4 |
---|---|
503 { | 503 { |
504 int in_comment = 0; | 504 int in_comment = 0; |
505 int c; | 505 int c; |
506 while ((c = getc (ffile)) != EOF) | 506 while ((c = getc (ffile)) != EOF) |
507 { | 507 { |
508 current_input_column++; | |
508 if (in_comment) | 509 if (in_comment) |
509 { | 510 { |
510 if (c == '\n') | 511 if (c == '\n') |
511 in_comment = 0; | 512 { |
513 input_line_number++; | |
514 current_input_column = 0; | |
515 in_comment = 0; | |
516 } | |
512 } | 517 } |
513 else | 518 else |
514 { | 519 { |
515 if (c == ' ' || c == '\t' || c == '\n') | 520 switch (c) |
516 continue; | |
517 else if (c == '%' || c == '#') | |
518 in_comment = 1; | |
519 else | |
520 { | 521 { |
522 case ' ': | |
523 case '\t': | |
524 break; | |
525 | |
526 case '\n': | |
527 input_line_number++; | |
528 current_input_column = 0; | |
529 continue; | |
530 | |
531 case '%': | |
532 case '#': | |
533 in_comment = 1; | |
534 break; | |
535 | |
536 default: | |
537 current_input_column--; | |
521 ungetc (c, ffile); | 538 ungetc (c, ffile); |
522 break; | 539 return; |
523 } | 540 } |
524 } | 541 } |
525 } | 542 } |
526 } | 543 } |
527 | 544 |
1395 | 1412 |
1396 DEFVAR ("automatic_replot", SBV_automatic_replot, "false", | 1413 DEFVAR ("automatic_replot", SBV_automatic_replot, "false", |
1397 0, 0, 1, automatic_replot, | 1414 0, 0, 1, automatic_replot, |
1398 "if true, auto-insert a replot command when a plot changes"); | 1415 "if true, auto-insert a replot command when a plot changes"); |
1399 | 1416 |
1400 DEFVAR ("commas_in_literal_matrix", SBV_commas_in_literal_matrix, "", | 1417 DEFVAR ("whitespace_in_literal_matrix", SBV_whitespace_in_literal_matrix, "", |
1401 0, 0, 1, commas_in_literal_matrix, | 1418 0, 0, 1, whitespace_in_literal_matrix, |
1402 "control auto-insertion of commas in literal matrices"); | 1419 "control auto-insertion of commas and semicolons in literal matrices"); |
1403 | 1420 |
1404 DEFVAR ("default_save_format", SBV_default_save_format, "ascii", | 1421 DEFVAR ("default_save_format", SBV_default_save_format, "ascii", |
1405 0, 0, 1, sv_default_save_format, | 1422 0, 0, 1, sv_default_save_format, |
1406 "default format for files created with save, may be either\n\ | 1423 "default format for files created with save, may be either\n\ |
1407 \"binary\" or \"text\""); | 1424 \"binary\" or \"text\""); |