cvsuser     03/10/12 03:53:33

  Modified:    languages/imcc main.c
  Log:
  cleanup info messages
  
  Revision  Changes    Path
  1.53      +9 -8      parrot/languages/imcc/main.c
  
  Index: main.c
  ===================================================================
  RCS file: /cvs/public/parrot/languages/imcc/main.c,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -w -r1.52 -r1.53
  --- main.c    12 Oct 2003 09:27:35 -0000      1.52
  +++ main.c    12 Oct 2003 10:53:32 -0000      1.53
  @@ -375,6 +375,7 @@
   int main(int argc, char * argv[])
   {
       struct PackFile *pf;
  +    int obj_file;
   
       struct Parrot_Interp *interpreter = Parrot_new();
   
  @@ -420,6 +421,7 @@
           Parrot_exit(0);
       }
   
  +    obj_file = 0;
       if (output) {
           char *ext;
           ext = strrchr(output, '.');
  @@ -431,6 +433,7 @@
               load_pbc = 1;
               write_pbc = 0;
               run_pbc = 1;
  +            obj_file = 1;
               Parrot_setup_opt(interpreter, 0, output);
               Parrot_setflag(interpreter, PARROT_EXEC_FLAG, ext);
           }
  @@ -441,13 +444,7 @@
   
       if (IMCC_INFO(interpreter)->verbose) {
           info(interpreter, 1,"debug = 0x%x\n", IMCC_INFO(interpreter)->debug);
  -        info(interpreter, 1,"Reading %s", yyin == stdin ? "stdin":sourcefile);
  -        if (run_pbc)
  -            info(interpreter, 1, ", executing");
  -        if (write_pbc)
  -            info(interpreter, 1, " and writing %s\n", output);
  -        else
  -            info(interpreter, 1,"\n");
  +        info(interpreter, 1,"Reading %s\n", yyin == stdin ? "stdin":sourcefile);
       }
       if (load_pbc) {
           fclose(yyin);
  @@ -478,6 +475,7 @@
           size_t size;
           opcode_t *packed;
           FILE *fp;
  +        info(interpreter, 1, "Writing %s\n", output);
   
           size = PackFile_pack_size(interpreter->code) * sizeof(opcode_t);
           info(interpreter, 1, "packed code %d bytes\n", size);
  @@ -512,6 +510,9 @@
               PARROT_WARNINGS_off(interpreter, PARROT_WARNINGS_ALL_FLAG);
           if (!gc_off)
               interpreter->DOD_block_level--;
  +        if (obj_file)
  +            info(interpreter, 1, "Writing %s\n", output);
  +        else
           info(interpreter, 1, "Running...\n");
           if (!load_pbc)
               PackFile_fixup_subs(interpreter);
  
  
  

Reply via email to