Changeset 297 for trunk/src


Ignore:
Timestamp:
Jun 5, 2003, 5:01:10 AM (22 years ago)
Author:
bird
Message:

#456: Tried VAC linenumebers... didn't work, leave the traces so we don't do this twice.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/src/emxomf/emxomf.c

    • Property cvs2svn:cvs-rev changed from 1.10 to 1.11
    r296 r297  
    27582758    len += 1 + strlen (file_list[i]);
    27592759
    2760   /* Write the line number table. */
     2760/*
     2761 * This is the VAC way, but link386 doesn't like this.
     2762 * too bad :/
     2763 */
     2764#if 0
     2765
     2766  /* Filename table first  -  a first entry like visual age does it and does hints on */
    27612767
    27622768  init_rec (LINNUM|REC32);
    27632769  started = TRUE;
    27642770  put_idx (0);                  /* Base Group */
    2765   put_idx (text_index);         /* Base Segment */
     2771  put_idx (0);                  /* Base Segment */
    27662772
    27672773  put_16 (0);                   /* Line number = 0 (special entry) */
    2768   put_8 (0);                    /* Entry type: source and offset */
     2774  put_8 (3);                    /* Entry type: some visual age stuff I believe */
    27692775  put_8 (0);                    /* Reserved */
    2770   put_16 (valid_lines);         /* Count of line number entries */
     2776  put_16 (1);                   /* Count of line number entries */
    27712777  put_16 (0);                   /* Segment number */
    27722778  put_32 (len);                 /* Size of file names table */
    2773 
    2774   for (i = 0; i < line_grow.count; ++i)
    2775     if (line_list[i].line >= 0)
    2776       {
    2777         if (started && !fits (8))
    2778           {
    2779             write_rec ();
    2780             started = FALSE;
    2781           }
    2782         if (!started)
    2783           {
    2784             init_rec (LINNUM|REC32);
    2785             put_idx (0);          /* Base Group */
    2786             put_idx (text_index); /* Base Segment */
    2787             started = TRUE;
    2788           }
    2789         put_16 (line_list[i].line);
    2790         put_16(line_list[i].file_index + 1);
    2791         put_32 (line_list[i].addr);
    2792       }
    2793 
    2794   /* Now write the file names table. */
    2795 
    2796   if (started && !fits (12))
    2797     {
    2798       write_rec ();
    2799       started = FALSE;
    2800     }
    2801   if (!started)
    2802     {
    2803       init_rec (LINNUM|REC32);
    2804       put_idx (0);          /* Base Group */
    2805       put_idx (text_index); /* Base Segment */
    2806       started = TRUE;
    2807     }
     2779  /* no linenumber */
    28082780  put_32 (0);                   /* First column */
    28092781  put_32 (0);                   /* Number of columns */
     
    28362808  if (started)
    28372809    write_rec ();
     2810
     2811
     2812  /* Write the line number table. */
     2813
     2814  init_rec (LINNUM|REC32);
     2815  started = TRUE;
     2816  put_idx (0);                  /* Base Group */
     2817  put_idx (text_index);         /* Base Segment */
     2818
     2819  put_16 (0);                   /* Line number = 0 (special entry) */
     2820  put_8 (0);                    /* Entry type: source and offset */
     2821  put_8 (0);                    /* Reserved */
     2822  put_16 (valid_lines);         /* Count of line number entries */
     2823  put_16 (0);                   /* Segment number */
     2824  put_32 (0);                   /* Size of file names table */
     2825
     2826  for (i = 0; i < line_grow.count; ++i)
     2827    if (line_list[i].line >= 0)
     2828      {
     2829        if (started && !fits (8))
     2830          {
     2831            write_rec ();
     2832            started = FALSE;
     2833          }
     2834        if (!started)
     2835          {
     2836            init_rec (LINNUM|REC32);
     2837            put_idx (0);          /* Base Group */
     2838            put_idx (text_index); /* Base Segment */
     2839            started = TRUE;
     2840          }
     2841        put_16 (line_list[i].line);
     2842        put_16(line_list[i].file_index + 1);
     2843        put_32 (line_list[i].addr);
     2844      }
     2845
     2846  if (started)
     2847    write_rec ();
     2848
     2849
     2850#else
     2851  /* Write the line number table. */
     2852
     2853  init_rec (LINNUM|REC32);
     2854  started = TRUE;
     2855  put_idx (0);                  /* Base Group */
     2856  put_idx (text_index);         /* Base Segment */
     2857
     2858  put_16 (0);                   /* Line number = 0 (special entry) */
     2859  put_8 (0);                    /* Entry type: source and offset */
     2860  put_8 (0);                    /* Reserved */
     2861  put_16 (valid_lines);         /* Count of line number entries */
     2862  put_16 (0);                   /* Segment number */
     2863  put_32 (len);                 /* Size of file names table */
     2864
     2865  for (i = 0; i < line_grow.count; ++i)
     2866    if (line_list[i].line >= 0)
     2867      {
     2868        if (started && !fits (8))
     2869          {
     2870            write_rec ();
     2871            started = FALSE;
     2872          }
     2873        if (!started)
     2874          {
     2875            init_rec (LINNUM|REC32);
     2876            put_idx (0);          /* Base Group */
     2877            put_idx (text_index); /* Base Segment */
     2878            started = TRUE;
     2879          }
     2880        put_16 (line_list[i].line);
     2881        put_16(line_list[i].file_index + 1);
     2882        put_32 (line_list[i].addr);
     2883      }
     2884
     2885  /* Now write the file names table. */
     2886
     2887  if (started && !fits (12))
     2888    {
     2889      write_rec ();
     2890      started = FALSE;
     2891    }
     2892  if (!started)
     2893    {
     2894      init_rec (LINNUM|REC32);
     2895      put_idx (0);          /* Base Group */
     2896      put_idx (text_index); /* Base Segment */
     2897      started = TRUE;
     2898    }
     2899  put_32 (0);                   /* First column */
     2900  put_32 (0);                   /* Number of columns */
     2901  put_32 (file_grow.count);     /* Number of source and listing files */
     2902
     2903  for (i = 0; i < file_grow.count; ++i)
     2904    {
     2905      len = strlen (file_list[i]);
     2906      if (len > sizeof (buf) - 1)
     2907        len = sizeof (buf) - 1;
     2908      memcpy (buf, file_list[i], len);
     2909      buf[len] = 0;
     2910      convert_filename (buf);
     2911      if (started && !fits (1 + len))
     2912        {
     2913          write_rec ();
     2914          started = FALSE;
     2915        }
     2916      if (!started)
     2917        {
     2918          init_rec (LINNUM|REC32);
     2919          put_idx (0);          /* Base Group */
     2920          put_idx (text_index); /* Base Segment */
     2921          started = TRUE;
     2922        }
     2923      put_8 (len);
     2924      put_mem (buf, len);
     2925    }
     2926
     2927  if (started)
     2928    write_rec ();
     2929#endif
    28382930
    28392931  grow_free (&line_grow);
Note: See TracChangeset for help on using the changeset viewer.