2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
6 #include "datatypes_intern.h"
7 #include <datatypes/datatypesclass.h>
8 #include <utility/tagitem.h>
9 #include <dos/dostags.h>
10 #include <proto/alib.h>
11 #include <proto/dos.h>
12 #include <proto/exec.h>
13 #include <proto/utility.h>
14 #include <proto/workbench.h>
16 /* Putchar procedure needed by RawDoFmt() */
18 AROS_UFH2(void, dt_putchr
,
19 AROS_UFHA(UBYTE
, chr
, D0
),
20 AROS_UFHA(STRPTR
*, p
, A3
))
27 void dt__sprintf(struct Library
*DataTypesBase
, UBYTE
*buffer
,
30 AROS_SLOWSTACKFORMAT_PRE(format
);
31 RawDoFmt(format
, AROS_SLOWSTACKFORMAT_ARG(format
), (VOID_FUNC
)dt_putchr
, &buffer
);
32 AROS_SLOWSTACKFORMAT_POST(format
);
36 /*****************************************************************************
39 #include <proto/datatypes.h>
41 AROS_LH3(ULONG
, LaunchToolA
,
44 AROS_LHA(struct Tool
* , tool
, A0
),
45 AROS_LHA(STRPTR
, project
, A1
),
46 AROS_LHA(struct TagItem
*, attrs
, A2
),
49 struct Library
*, DataTypesBase
, 42, DataTypes
)
53 Launch an application with a particular project.
57 tool -- tool to use (may be NULL in which case this function
59 project -- name of the project to execute or NULL
60 attrs -- additional attributes
64 NP_Priority (BYTE) -- priority of the launched tool (default is the
65 priority of the currect process except for
66 Workbench applications where the default priority
67 is 0 if not overridden by the TOOLPRI tooltype).
69 NP_Synchronous (BOOL) -- don't return until lauched application process
70 finishes (defaults to FALSE).
74 Zero for failure, non-zero otherwise.
88 *****************************************************************************/
97 SetIoErr(ERROR_REQUIRED_ARG_MISSING
);
102 isSynchronous
= (BOOL
)GetTagData(NP_Synchronous
, (IPTR
)FALSE
, attrs
);
104 switch (tool
->tn_Flags
& TF_LAUNCH_MASK
)
113 DataTypesBase
, tBuffer
,
114 "\"%s\" \"%s\"", tool
->tn_Program
, project
117 output
= Open("CON:////Output window/AUTO/WAIT/CLOSE/INACTIVE",
122 struct TagItem tags
[] = { { SYS_Asynch
, !isSynchronous
},
123 { SYS_Input
, (IPTR
)NULL
},
124 { SYS_Output
, (IPTR
)output
},
128 ret
= SystemTagList(tBuffer
, tags
);
148 BOOL success
= FALSE
;
149 struct Library
*WorkbenchBase
= OpenLibrary("workbench.library", 39L);
151 if (WorkbenchBase
!= NULL
)
153 BPTR lock
= Lock(project
, ACCESS_READ
);
157 BPTR parent
= ParentDir(lock
);
159 success
= OpenWorkbenchObject
162 WBOPENA_ArgLock
, (IPTR
) parent
,
163 WBOPENA_ArgName
, (IPTR
) FilePart(project
),
170 CloseLibrary(WorkbenchBase
);
173 if (!success
) return 0;
178 /* Sorry, no Arexx in AROS yet. */
179 /* FIXME: No Arexx compatibility yet */
181 /* Do some "RX command" here */