Merge branch 'master' into cmd-casl
authorj8takagi <j8takagi@nifty.com>
Sat, 13 Feb 2010 03:32:21 +0000 (12:32 +0900)
committerj8takagi <j8takagi@nifty.com>
Sat, 13 Feb 2010 03:32:21 +0000 (12:32 +0900)
1  2 
src/assemble.c

diff --combined src/assemble.c
@@@ -143,7 -143,7 +143,7 @@@ bool assemblecmd(const CMDLINE *cmdl, P
      CMDARRAY ascmd[] = {
          { START, 0, 1, "START" },
          { END, 0, 0, "END" },
-         { DC, 0, OPDSIZE, "DC" },
+         { DC, 1, OPDSIZE, "DC" },
          { DS, 1, 1, "DS" },
          { 0, 0, 0, NULL }
      };
@@@ -395,6 -395,10 +395,6 @@@ bool assembleline(const CMDLINE *cmdl, 
      return status;
  }
  
 -void printline(FILE *stream, const char *filename, int lineno, char *line) {
 -    fprintf(stream, "%s:%5d:%s", filename, lineno, line);
 -}
 -
  /* 指定された名前のファイルをアセンブル */
  /* 2回実行される */
  bool assemble(const char *file, PASS pass)
          if((pass == FIRST && (&asmode)->src == true) ||
             (pass == SECOND && (&asmode)->asdetail == true))
          {
 -            printline(stdout, file, lineno, line);
 +            fprintf(stdout, "%s:%5d:%s", file, lineno, line);
          }
          if((cmdl = linetok(line)) != NULL) {
              if(pass == FIRST && cmdl->label != NULL) {
          }
      }
      if(cerrno > 0) {
 -        fprintf(stderr, "Assemble error - %d: %s\n", cerrno, cerrmsg);
 -        printline(stderr, file, lineno, line);
 +        fprintf(stderr, "Assemble error - %d: %s\n %s:%d: %s\n", cerrno, cerrmsg, file, lineno, line);
          status = false;
      }
      fclose(fp);