Changeset 3140 for trunk/src/kmk/amiga.c
- Timestamp:
- Mar 14, 2018, 10:28:10 PM (7 years ago)
- Location:
- trunk/src/kmk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk
-
Property svn:mergeinfo
set to
/vendor/gnumake/current merged eligible
-
Property svn:mergeinfo
set to
-
trunk/src/kmk/amiga.c
r2591 r3140 1 1 /* Running commands on Amiga 2 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 3 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. 2 Copyright (C) 1995-2016 Free Software Foundation, Inc. 4 3 This file is part of GNU Make. 5 4 … … 16 15 this program. If not, see <http://www.gnu.org/licenses/>. */ 17 16 18 #include "make .h"17 #include "makeint.h" 19 18 #include "variable.h" 20 19 #include "amiga.h" … … 26 25 27 26 static const char Amiga_version[] = "$VER: Make 3.74.3 (12.05.96) \n" 28 27 "Amiga Port by A. Digulla (digulla@home.lake.de)"; 29 28 30 29 int … … 38 37 for (aptr=argv; *aptr; aptr++) 39 38 { 40 39 len += strlen (*aptr) + 4; 41 40 } 42 41 … … 44 43 45 44 if (!buffer) 46 fatal (NILF, "MyExecute: Cannot allocate space for calling a command");45 O (fatal, NILF, "MyExecute: Cannot allocate space for calling a command\n"); 47 46 48 47 ptr = buffer; … … 50 49 for (aptr=argv; *aptr; aptr++) 51 50 { 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 51 if (((*aptr)[0] == ';' && !(*aptr)[1])) 52 { 53 *ptr ++ = '"'; 54 strcpy (ptr, *aptr); 55 ptr += strlen (ptr); 56 *ptr ++ = '"'; 57 } 58 else if ((*aptr)[0] == '@' && (*aptr)[1] == '@' && !(*aptr)[2]) 59 { 60 *ptr ++ = '\n'; 61 continue; 62 } 63 else 64 { 65 strcpy (ptr, *aptr); 66 ptr += strlen (ptr); 67 } 68 *ptr ++ = ' '; 69 *ptr = 0; 71 70 } 72 71 … … 74 73 75 74 status = SystemTags (buffer, 76 77 75 SYS_UserShell, TRUE, 76 TAG_END); 78 77 79 78 FreeMem (buffer, len); 80 79 81 if (SetSignal (0L,0L) & SIGBREAKF_CTRL_C)82 80 if (SetSignal (0L,0L) & SIGBREAKF_CTRL_C) 81 status = 20; 83 82 84 83 /* Warnings don't count */ 85 84 if (status == 5) 86 85 status = 0; 87 86 88 87 return status; … … 92 91 wildcard_expansion (char *wc, char *o) 93 92 { 94 # define PATH_SIZE 93 # define PATH_SIZE 1024 95 94 struct AnchorPath * apath; 96 95 97 96 if ( (apath = AllocMem (sizeof (struct AnchorPath) + PATH_SIZE, 98 99 97 MEMF_CLEAR)) 98 ) 100 99 { 101 100 apath->ap_Strlen = PATH_SIZE; 102 101 103 104 105 106 107 108 109 110 111 102 if (MatchFirst (wc, apath) == 0) 103 { 104 do 105 { 106 o = variable_buffer_output (o, apath->ap_Buf, 107 strlen (apath->ap_Buf)); 108 o = variable_buffer_output (o, " ",1); 109 } while (MatchNext (apath) == 0); 110 } 112 111 113 114 112 MatchEnd (apath); 113 FreeMem (apath, sizeof (struct AnchorPath) + PATH_SIZE); 115 114 } 116 115
Note:
See TracChangeset
for help on using the changeset viewer.