#include "../src/epaths.h"
#endif
+HDDEDATA CALLBACK DdeCallback (UINT, UINT, HCONV, HSZ, HSZ, HDDEDATA, DWORD,
+ DWORD);
+
HDDEDATA CALLBACK
DdeCallback (UINT uType, UINT uFmt, HCONV hconv,
HSZ hsz1, HSZ hsz2, HDDEDATA hdata,
#endif
};
-void
+static void
add_registry (const char *path)
{
HKEY hrootkey = NULL;
#define stdout GetStdHandle (STD_OUTPUT_HANDLE)
#define stderr GetStdHandle (STD_ERROR_HANDLE)
+#if __GNUC__ + (__GNUC_MINOR__ >= 4) >= 5
+void fail (const char *, ...) __attribute__((noreturn));
+#else
+void fail (const char *, ...);
+#endif
+int vfprintf (HANDLE, const char *, va_list);
+int fprintf (HANDLE, const char *, ...);
+int printf (const char *, ...);
+void warn (const char *, ...);
+
int
vfprintf (HANDLE hnd, const char * msg, va_list args)
{
/******************************************************************/
-char *
+static char *
canon_filename (char *fname)
{
char *p = fname;
return fname;
}
-const char *
+static const char *
skip_space (const char *str)
{
while (isspace (*str)) str++;
return str;
}
-const char *
+static const char *
skip_nonspace (const char *str)
{
while (*str && !isspace (*str)) str++;
const int escape_char = '\\';
/* Get next token from input, advancing pointer. */
-int
+static int
get_next_token (char * buf, const char ** pSrc)
{
const char * p = *pSrc;
}
/* Return TRUE if PROGNAME is a batch file. */
-BOOL
+static BOOL
batch_file_p (const char *progname)
{
const char *exts[] = {".bat", ".cmd"};
/* Search for EXEC file in DIR. If EXEC does not have an extension,
DIR is searched for EXEC with the standard extensions appended. */
-int
+static int
search_dir (const char *dir, const char *exec, int bufsize, char *buffer)
{
const char *exts[] = {".bat", ".cmd", ".exe", ".com"};
/* Return the absolute name of executable file PROG, including
any file extensions. If an absolute name for PROG cannot be found,
return NULL. */
-char *
+static char *
make_absolute (const char *prog)
{
char absname[MAX_PATH];
success, return 1 with cmdline dequoted. Otherwise, when we've
found constructs only cmd can properly interpret, return 0 and
leave cmdline unchanged. */
-int
+static int
try_dequote_cmdline (char* cmdline)
{
/* Dequoting can only subtract characters, so the length of the
PROCESS_INFORMATION child;
int interactive = TRUE;
+BOOL console_event_handler (DWORD);
+
BOOL
console_event_handler (DWORD event)
{
/* Change from normal usage; return value indicates whether spawn
succeeded or failed - program return code is returned separately. */
-int
+static int
spawn (const char *progname, char *cmdline, const char *dir, int *retcode)
{
BOOL success = FALSE;
}
/* Return size of current environment block. */
-int
+static int
get_env_size (void)
{
char * start = GetEnvironmentStrings ();