Changeset 116 for trunk/src/emx
- Timestamp:
- May 10, 2003, 4:38:40 AM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/src/emxomf/emxomfld.c
-
Property cvs2svn:cvs-rev
changed from
1.3
to1.4
r115 r116 137 137 static void add_name_list (name_list ***add, const char *src); 138 138 static void conv_path (char *name); 139 static void put_arg (const char *src, int path );139 static void put_arg (const char *src, int path, int quotable); 140 140 static void put_args (const name_list *list, int paths); 141 141 static void make_env (void); … … 169 169 { 170 170 void *p; 171 171 172 172 p = malloc (n); 173 173 if (p == NULL) … … 187 187 { 188 188 char *p; 189 189 190 190 p = xmalloc (strlen (s) + 1); 191 191 strcpy (p, s); … … 226 226 If PATH is non-zero, SRC is a path name and slashes are to be 227 227 replaced by backslashes. If the command line gets too long, a 228 response file is created. */ 229 230 static void put_arg (const char *src, int path) 228 response file is created. 229 If quotable is non-zero SRC will be quoted. This is required for 230 supporting files names which includes '+' and spaces. */ 231 232 static void put_arg (const char *src, int path, int quotable) 231 233 { 232 234 int len, max_len; … … 251 253 252 254 len = strlen (src); 253 tmp = alloca (len + 1); 254 strcpy (tmp, src); 255 tmp = alloca (len + (quotable ? 3 : 1)); 255 256 if (path) 256 conv_path (tmp); 257 { 258 /* needs quoting? */ 259 if (quotable) 260 { 261 *tmp = '"'; 262 strcpy (tmp+1, src); 263 tmp[++len] = '"'; 264 tmp[++len] = '\0'; 265 } 266 else 267 strcpy (tmp, src); 268 conv_path (tmp); 269 } 270 else 271 strcpy (tmp, src); 272 257 273 258 274 /* Check if we've reached the maximum line length. If the … … 362 378 while (list != NULL) 363 379 { 364 put_arg (list->name, paths );380 put_arg (list->name, paths, paths); 365 381 list = list->next; 366 382 } … … 695 711 */ 696 712 697 put_arg (linker_name, TRUE );713 put_arg (linker_name, TRUE, FALSE); 698 714 699 715 /* If the linker is ILINK, don't use the /BAT{CH} option */ 700 716 t = _getname (linker_name); 701 717 if (strnicmp (t, "ILINK", 5)) 702 put_arg ("/bat", FALSE);718 put_arg ("/bat", FALSE, FALSE); 703 719 else 704 put_arg ("/nofree", FALSE );705 put_arg ("/nol", FALSE );706 put_arg ("/noe", FALSE );707 put_arg ("/noi", FALSE );708 put_arg ("/packc", FALSE );720 put_arg ("/nofree", FALSE, FALSE); 721 put_arg ("/nol", FALSE, FALSE); 722 put_arg ("/noe", FALSE, FALSE); 723 put_arg ("/noi", FALSE, FALSE); 724 put_arg ("/packc", FALSE, FALSE); 709 725 710 726 /* Add the /INFORMATION option if the -i option was given. This is … … 712 728 713 729 if (opt_i) 714 put_arg ("/i", FALSE );730 put_arg ("/i", FALSE, FALSE); 715 731 716 732 /* Add the /DEBUG option if the -s option was not given. Without … … 718 734 719 735 if (!strip_symbols) 720 put_arg ("/de", FALSE );736 put_arg ("/de", FALSE, FALSE); 721 737 722 738 /* Add the /BASE:n option to set the base address. This specifies … … 747 763 { 748 764 sprintf (tmp, "/bas:%s", base); 749 put_arg (tmp, FALSE );765 put_arg (tmp, FALSE, FALSE); 750 766 } 751 767 … … 755 771 { 756 772 sprintf (tmp, "/st:0x%lx", stack_size * 1024); 757 put_arg (tmp, FALSE );773 put_arg (tmp, FALSE, FALSE); 758 774 } 759 775 … … 765 781 766 782 put_args (obj_fnames, TRUE); 767 put_arg (",", FALSE );783 put_arg (",", FALSE, FALSE); 768 784 769 785 /* Put the output file name onto the command line. */ 770 786 771 put_arg (output_fname, TRUE );772 put_arg (",", FALSE );787 put_arg (output_fname, TRUE, TRUE); 788 put_arg (",", FALSE, FALSE); 773 789 774 790 /* Put the map file name onto the command line. */ 775 791 776 put_arg (map_fname, TRUE );777 put_arg (",", FALSE );792 put_arg (map_fname, TRUE, TRUE); 793 put_arg (",", FALSE, FALSE); 778 794 779 795 /* Put the library file names onto the command line. */ 780 796 781 797 put_args (lib_fnames, TRUE); 782 put_arg (",", FALSE );798 put_arg (",", FALSE, FALSE); 783 799 784 800 /* Put the name of the module definition file onto the command line. */ 785 801 786 put_arg (def_fname, TRUE );787 put_arg (";", FALSE );802 put_arg (def_fname, TRUE, TRUE); 803 put_arg (";", FALSE, FALSE); 788 804 arg_end (); 789 805 … … 811 827 { 812 828 arg_init (TRUE); 813 put_arg ("rc -n", TRUE); 814 put_arg (res_fname, TRUE); 815 put_arg (output_fname, TRUE); 829 put_arg ("rc", TRUE, FALSE); 830 put_arg ("-n", FALSE, FALSE); 831 put_arg (res_fname, TRUE, TRUE); 832 put_arg (output_fname, TRUE, TRUE); 816 833 arg_end (); 817 834 rc = system (command_line); -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.