Changeset 681
- Timestamp:
- Sep 10, 2003, 4:39:08 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/src/emxomf/emxomf.c
-
Property cvs2svn:cvs-rev
changed from
1.23
to1.24
r680 r681 2725 2725 } 2726 2726 2727 /* Converts dashed filenames to somewhat absolute ones assuming that 2728 the current directory is what they're relative to. */ 2729 2730 static int abspath_filename(char *dst, const char *src, int size) 2731 { 2732 int rc = -1; 2733 char *psz; 2734 2735 if (src[1] != ':' && src[0] != '\\' && src[0] != '/') 2736 rc = _abspath(dst, src, size); 2737 if (rc) 2738 { 2739 *dst = '\0'; 2740 strncat(dst, src, size); 2741 } 2742 2743 for (psz = dst; *psz; psz++) 2744 if (*psz == '/') 2745 *psz = '\\'; 2746 return psz - dst; 2747 } 2727 2748 2728 2749 /* Derive the module name and store it to the mod_name variable. … … 2821 2842 if (strcmp (file_list[i], name) == 0) 2822 2843 return i; 2823 if ( file_grow.count >= 255)2844 if (hll_version <= 3 && file_grow.count >= 255) 2824 2845 { 2825 2846 warning ("Too many source files, cannot convert line number info"); … … 2959 2980 return; 2960 2981 2961 2982 /* Make the paths absolute - TODO: this might be done by GCC as well.. */ 2983 2984 for (i = 0; i < file_grow.count; ++i) 2985 { 2986 char buf[260]; 2987 len = abspath_filename (buf, file_list[i], 255); 2988 file_list[i] = xrealloc(file_list[i], len + 1); 2989 memcpy(file_list[i], buf, len + 1); 2990 } 2991 2962 2992 /* Compute the size of the file names table. */ 2963 2993 … … 2982 3012 put_8 (3); /* Entry type: some visual age stuff I believe */ 2983 3013 put_8 (0); /* Reserved */ 2984 put_16 ( 1);/* Count of line number entries */3014 put_16 (file_grow.count); /* Count of line number entries */ 2985 3015 put_16 (0); /* Segment number */ 2986 3016 put_32 (len); /* Size of file names table */ … … 2992 3022 for (i = 0; i < file_grow.count; ++i) 2993 3023 { 2994 len = strlen (file_list[i]); 2995 if (len > sizeof (buf) - 1) 2996 len = sizeof (buf) - 1; 2997 memcpy (buf, file_list[i], len); 2998 buf[len] = 0; 2999 convert_filename (buf); 3024 len = strlen(file_list[i]); 3000 3025 if (started && !fits (1 + len)) 3001 3026 { … … 3011 3036 } 3012 3037 put_8 (len); 3013 put_mem ( buf, len);3038 put_mem (file_list[i], len); 3014 3039 } 3015 3040 … … 3053 3078 } 3054 3079 put_16 (line_list[i].line); 3055 put_16 (line_list[i].file_index + 1);3080 put_16 (line_list[i].file_index + 1); 3056 3081 put_32 (line_list[i].addr); 3057 3082 } -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.