~ubuntu-branches/ubuntu/quantal/avra/quantal

« back to all changes in this revision

Viewing changes to expr.c

  • Committer: Bazaar Package Importer
  • Author(s): Tobias Klauser
  • Date: 2010-01-20 15:24:49 UTC
  • mfrom: (1.1.5 upstream) (4.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20100120152449-mpgx1ibvci0njzta
Tags: 1.2.3a-1
* New upstream release (closes: #507443).
  - Fixes address range error (closes: #527978).
* Install register and bit-name definitions from AVR000.zip.
* Update standards version to 3.8.3.
* Use new Homepage control field.
* Add Vcs-Git and Vcs-Browser control fields.
* Change maintainer's email address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
334
334
  end         = False;
335
335
  count       = 0;
336
336
  unary       = 0;
337
 
 
338
337
  /* the expression parser loop */
339
338
        for(i = 0; ; i++) {
340
339
          /* horizontal space is just skipped */
341
340
                if(IS_HOR_SPACE(data[i]));
342
341
                /* test for clean or premature end */
343
 
                else if(IS_END(data[i])) {
 
342
                else if(IS_END_OR_COMMENT(data[i])) {
344
343
                        if((count % 2) != 1)
345
344
                                print_msg(pi, MSGTYPE_ERROR, "Missing value in expression");
346
345
                        else
354
353
                else if((count % 2) == 1) {
355
354
                        if(!IS_OPERATOR(data[i])) {
356
355
                                print_msg(pi, MSGTYPE_ERROR, "Illegal operator '%c'", data[i]);
357
 
        break;
 
356
                                break;
358
357
                        }
359
358
                        element = malloc(sizeof(struct element));
360
359
                        if(!element) {
414
413
                        }
415
414
                        else if(data[i] == '\'') {
416
415
                                i++;
417
 
        if(data[i+1] != '\'') {
 
416
                                if(data[i+1] != '\'') {
418
417
                                        print_msg(pi, MSGTYPE_ERROR, "Not a correct character ! Use 'A' !");
419
418
                                        break;
420
 
        }
 
419
                                }
421
420
                                element->data = data[i];
422
421
                                length = 2;
423
422
                        }
436
435
                        /* test for internal function */
437
436
                        else if((function = get_function(&data[i])) != -1) {
438
437
                                while(data[i] != '(')
439
 
          i++;
 
438
                                        i++;
440
439
                                i++;
441
440
                                length = par_length(&data[i]);
442
441
                                if(length == -1) {