This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for a42d024
[perl5.git] / NetWare / nwutil.h
CommitLineData
2986a63f
JH
1
2/*
3 * Copyright © 2001 Novell, Inc. All Rights Reserved.
4 *
5 * You may distribute under the terms of either the GNU General Public
6 * License or the Artistic License, as specified in the README file.
7 *
8 */
9
10/*
11 * FILENAME : NWUtil.h
12 * DESCRIPTION : Utility functions for NetWare implementation of Perl.
13 * Author : HYAK, SGP
14 * Date : January 2001.
15 *
16 */
17
18
19
20#ifndef __NWUtil_H__
21#define __NWUtil_H__
22
23
24#include "stdio.h"
25#include <stdlib.h>
26#include "win32ish.h" // For "BOOL", "TRUE" and "FALSE"
27
28
29#ifdef MPK_ON
30 #include <mpktypes.h>
31 #include <mpkapis.h>
32#else
33 #include <nwsemaph.h>
34#endif //MPK_ON
35
36
37// Name of console command to invoke perl
38#define PERL_COMMAND_NAME "perl"
39
40// Name of console command to load an NLM
41#define LOAD_COMMAND "load"
42
43
44typedef struct tagCommandLineParser
45{
46 BOOL m_noScreen;
47 BOOL m_AutoDestroy;
48 BOOL m_isValid;
49
50 int m_argc;
51 int m_argv_len;
52
53 #ifdef MPK_ON
54 SEMAPHORE m_qSemaphore;
55 #else
56 long m_qSemaphore;
57 #endif
58
59 char* m_redirInName;
60 char* m_redirOutName;
61 char* m_redirErrName;
62 char* m_redirBothName;
63 char* nextarg;
64 char* sSkippedToken;
65
66 char** m_argv;
67 char** new_argv;
68
69}COMMANDLINEPARSER, *PCOMMANDLINEPARSER;
70
71
72
73char* fnSkipWhite(char* cptr);
74char* fnNwGetEnvironmentStr(char *name, char *defaultvalue);
75char* fnSkipToken(char *s, char *r);
76char* fnScanToken(char* x, char *r);
77char* fnStashString(char *s, char *r, int length);
78void fnAppendArgument(PCOMMANDLINEPARSER pclp, char * new_arg);
79void fnDeleteArgument(PCOMMANDLINEPARSER pclp, int index);
80void fnCommandLineParser(PCOMMANDLINEPARSER pclp, char * commandLine, BOOL preserveQuotes);
81void fnSystemCommand (char** argv, int argc);
82void fnInternalPerlLaunchHandler(char* cmdLine);
83char* fnMy_MkTemp(char* templatestr);
84
85
1db1659f 86/* NWDEFPERLROOT:
2986a63f
JH
87 * This symbol contains the name of the starting default directory to search
88 * for scripts to run.
89 */
1db1659f 90#define NWDEFPERLROOT "sys:\\perl\\scripts"
2986a63f 91
1db1659f 92/* NWDEFPERLTEMP:
2986a63f
JH
93 * This symbol contains the name of the default temp files directory.
94 */
1db1659f 95#define NWDEFPERLTEMP "sys:\\perl\\temp"
2986a63f
JH
96
97
98#endif // __NWUtil_H__
99