nw="$nw -Wcast-align"
fi
+ # This causes too much noise in the MinGW build
+ if test $opsys = mingw32; then
+ nw="$nw -Wpointer-sign"
+ fi
+
gl_MANYWARN_ALL_GCC([ws])
gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw])
for w in $ws; do
gl_WARN_ADD([-Wno-unused-value])
fi
+ # This causes too much noise in the MinGW build
+ if test $opsys = mingw32; then
+ gl_WARN_ADD([-Wno-pointer-sign])
+ fi
+
AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.])
AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks])
AH_VERBATIM([GNULIB_PORTCHECK_FORTIFY_SOURCE],
# define CLOSE_SOCKET closesocket
# define INITIALIZE() (initialize_sockets ())
-char *w32_getenv (char *);
+char *w32_getenv (const char *);
#define egetenv(VAR) w32_getenv(VAR)
#else /* !WINDOWSNT */
#ifdef WINDOWSNT
/* Like strdup but get a fatal error if memory is exhausted. */
+char *xstrdup (const char *);
char *
xstrdup (const char *s)
#define REG_ROOT "SOFTWARE\\GNU\\Emacs"
+char *w32_get_resource (HKEY, const char *, LPDWORD);
+
/* Retrieve an environment variable from the Emacs subkeys of the registry.
Return NULL if the variable was not found, or it was empty.
This code is based on w32_get_resource (w32.c). */
char *
-w32_get_resource (HKEY predefined, char *key, LPDWORD type)
+w32_get_resource (HKEY predefined, const char *key, LPDWORD type)
{
HKEY hrootkey = NULL;
char *result = NULL;
{
result = (char *) xmalloc (cbData);
- if ((RegQueryValueEx (hrootkey, key, NULL, type, result, &cbData) != ERROR_SUCCESS)
+ if ((RegQueryValueEx (hrootkey, key, NULL, type, (LPBYTE)result, &cbData) != ERROR_SUCCESS)
|| (*result == 0))
{
free (result);
environment variables in the registry if they don't appear in the
environment. */
char *
-w32_getenv (char *envvar)
+w32_getenv (const char *envvar)
{
char *value;
DWORD dwType;
return NULL;
}
+int w32_window_app (void);
int
w32_window_app (void)
predictably bad results. By contrast, POSIX execvp passes the arguments
directly into the argv array of the child process. */
+int w32_execvp (const char *, char **);
+extern int execvp (const char*, char **);
+
int
w32_execvp (const char *path, char **argv)
{
int i;
- extern int execvp (const char*, char **);
/* Required to allow a .BAT script as alternate editor. */
argv[0] = (char *) alternate_editor;
#define execvp w32_execvp
/* Emulation of ttyname for Windows. */
-char *
+const char *ttyname (int);
+const char *
ttyname (int fd)
{
return "CONOUT$";
#ifdef WINDOWSNT
/* Wrapper to make WSACleanup a cdecl, as required by atexit. */
+void __cdecl close_winsock (void);
void __cdecl
close_winsock (void)
{
}
/* Initialize the WinSock2 library. */
+void initialize_sockets (void);
void
initialize_sockets (void)
{
FARPROC set_fg; /* Pointer to AllowSetForegroundWindow. */
FARPROC get_wc; /* Pointer to RealGetWindowClassA. */
+void w32_set_user_model_id (void);
+
void
w32_set_user_model_id (void)
{
HMODULE shell;
- HRESULT (WINAPI * set_user_model) (wchar_t * id);
+ HRESULT (WINAPI * set_user_model) (const wchar_t * id);
/* On Windows 7 and later, we need to set the user model ID
to associate emacsclient launched files with Emacs frames
}
}
+BOOL CALLBACK w32_find_emacs_process (HWND, LPARAM);
+
BOOL CALLBACK
w32_find_emacs_process (HWND hWnd, LPARAM lParam)
{
/* Search for a window of class "Emacs" and owned by a process with
process id = emacs_pid. If found, allow it to grab the focus. */
+void w32_give_focus (void);
void
w32_give_focus (void)
it is ready to accept client connections, by asserting an event
whose name is known to the daemon (defined by nt/inc/ms-w32.h). */
- if (!CreateProcess (NULL, "emacs --daemon", NULL, NULL, FALSE,
+ if (!CreateProcess (NULL, (LPSTR)"emacs --daemon", NULL, NULL, FALSE,
CREATE_NO_WINDOW, NULL, NULL, &si, &pi))
{
char* msg = NULL;
if ((wait_result = WaitForSingleObject (w32_daemon_event, INFINITE))
!= WAIT_OBJECT_0)
{
- char *msg = NULL;
+ const char *msg = NULL;
switch (wait_result)
{
#ifdef WINDOWSNT
# include <direct.h>
-# define MAXPATHLEN _MAX_PATH
# undef HAVE_NTGUI
# undef DOS_NT
# define DOS_NT
#include "ntlib.h"
+char *sys_ctime (const time_t *);
+FILE *sys_fopen (const char *, const char *);
+int sys_chdir (const char *);
+int mkostemp (char *, int);
+int sys_rename (const char *, const char *);
+
/* MinGW64 defines _TIMEZONE_DEFINED and defines 'struct timespec' in
its system headers. */
#ifndef _TIMEZONE_DEFINED
};
#endif
+void gettimeofday (struct timeval *, struct timezone *);
+
#define MAXPATHLEN _MAX_PATH
/* Emulate sleep...we could have done this with a define, but that
int getppid (void);
char * getlogin (void);
char * cuserid (char * s);
-unsigned getuid (void);
-unsigned geteuid (void);
unsigned getegid (void);
unsigned getgid (void);
int setuid (unsigned uid);
int setregid (unsigned rgid, unsigned gid);
char * getpass (const char * prompt);
int fchown (int fd, unsigned uid, unsigned gid);
-int mkostemp (char * template, int flags);
/* redirect or undo interceptions created by config.h */
#undef access
ac_cv_func_random=yes
# Implemented in w32.c as sys_putenv
gl_cv_func_svid_putenv=yes
+# GCC warnings that produce too much noise
+gl_cv_warn_c__Wredundant_decls=no
set_user_model_id (void)
{
HMODULE shell;
- HRESULT (WINAPI * set_user_model) (wchar_t * id);
+ HRESULT (WINAPI * set_user_model) (const wchar_t * id);
/* On Windows 7 and later, we need to set the user model ID
to associate emacsclient launched files with Emacs frames
#ifdef WINDOWSNT
prepare_standard_handles (in, out, err, handles);
- set_process_dir (SDATA (current_dir));
+ set_process_dir (SSDATA (current_dir));
/* Spawn the child. (See w32proc.c:sys_spawnve). */
cpid = spawnve (_P_NOWAIT, new_argv[0], new_argv, env);
reset_standard_handles (in, out, err, handles);
&& SBYTES (entry) >= varlen
#ifdef WINDOWSNT
/* NT environment variables are case insensitive. */
- && ! strnicmp (SDATA (entry), var, varlen)
+ && ! strnicmp (SSDATA (entry), var, varlen)
#else /* not WINDOWSNT */
&& ! memcmp (SDATA (entry), var, varlen)
#endif /* not WINDOWSNT */
#include "msdos.h" /* for fstatat */
#endif
+#ifdef WINDOWSNT
+extern int is_slow_fs (const char *);
+#endif
+
static ptrdiff_t scmp (const char *, const char *, ptrdiff_t);
static Lisp_Object file_attributes (int, char const *, Lisp_Object);
\f
}
#ifdef WINDOWSNT
-void
+static void
directory_files_internal_w32_unwind (Lisp_Object arg)
{
Vw32_get_true_file_attributes = arg;
#ifdef WINDOWSNT
if (attrs)
{
- extern int is_slow_fs (const char *);
-
/* Do this only once to avoid doing it (in w32.c:stat) for each
file in the directory, when we call Ffile_attributes below. */
record_unwind_protect (directory_files_internal_w32_unwind,
{
/* w32.c:stat will notice these bindings and avoid calling
GetDriveType for each file. */
- if (is_slow_fs (SDATA (dirfilename)))
+ if (is_slow_fs (SSDATA (dirfilename)))
Vw32_get_true_file_attributes = Qnil;
else
Vw32_get_true_file_attributes = Qt;
fatal ("standard input is not a tty");
#ifdef WINDOWSNT
- terminal_type = "w32console";
+ terminal_type = (char *)"w32console";
#else
terminal_type = getenv ("TERM");
#endif
/* This needs to be called at startup to countermand any non-zero
values recorded by temacs. */
+void dynlib_reset_last_error (void);
void
dynlib_reset_last_error (void)
{
/* The read-only attribute of the parent directory doesn't affect
whether a file or directory can be created within it. Some day we
should check ACLs though, which do affect this. */
- return file_directory_p (SDATA (dir)) ? Qt : Qnil;
+ return file_directory_p (SSDATA (dir)) ? Qt : Qnil;
#else
return check_writable (SSDATA (dir), W_OK | X_OK) ? Qt : Qnil;
#endif
/* Tell stat to use expensive method to get accurate info. */
Vw32_get_true_file_attributes = Qt;
- result = stat (SDATA (absname), &st);
+ result = stat (SSDATA (absname), &st);
Vw32_get_true_file_attributes = tem;
if (result < 0)
#define BOOT_TIME_FILE "/var/run/random-seed"
#endif
-#ifndef WTMP_FILE
+#if !defined WTMP_FILE && !defined WINDOWSNT
#define WTMP_FILE "/var/log/wtmp"
#endif
(gnutls_session_t));
DEF_DLL_FN (const char *, gnutls_alert_get_name,
(gnutls_alert_description_t));
-DEF_DLL_FN (int, gnutls_alert_send_appropriate, (gnutls_session_t, int));
DEF_DLL_FN (int, gnutls_anon_allocate_client_credentials,
(gnutls_anon_client_credentials_t *));
DEF_DLL_FN (void, gnutls_anon_free_client_credentials,
(gnutls_x509_crt_t, char *, size_t *));
DEF_DLL_FN (int, gnutls_x509_crt_get_signature_algorithm,
(gnutls_x509_crt_t));
-DEF_DLL_FN (int, gnutls_x509_crt_get_signature,
- (gnutls_x509_crt_t, char *, size_t *));
DEF_DLL_FN (int, gnutls_x509_crt_get_key_id,
(gnutls_x509_crt_t, unsigned int, unsigned char *, size_t *_size));
DEF_DLL_FN (const char*, gnutls_sec_param_get_name, (gnutls_sec_param_t));
LOAD_DLL_FN (library, gnutls_alert_get);
LOAD_DLL_FN (library, gnutls_alert_get_name);
- LOAD_DLL_FN (library, gnutls_alert_send_appropriate);
LOAD_DLL_FN (library, gnutls_anon_allocate_client_credentials);
LOAD_DLL_FN (library, gnutls_anon_free_client_credentials);
LOAD_DLL_FN (library, gnutls_bye);
LOAD_DLL_FN (library, gnutls_x509_crt_get_issuer_unique_id);
LOAD_DLL_FN (library, gnutls_x509_crt_get_subject_unique_id);
LOAD_DLL_FN (library, gnutls_x509_crt_get_signature_algorithm);
- LOAD_DLL_FN (library, gnutls_x509_crt_get_signature);
LOAD_DLL_FN (library, gnutls_x509_crt_get_key_id);
LOAD_DLL_FN (library, gnutls_sec_param_get_name);
LOAD_DLL_FN (library, gnutls_sign_get_name);
# define gnutls_alert_get fn_gnutls_alert_get
# define gnutls_alert_get_name fn_gnutls_alert_get_name
-# define gnutls_alert_send_appropriate fn_gnutls_alert_send_appropriate
# define gnutls_anon_allocate_client_credentials fn_gnutls_anon_allocate_client_credentials
# define gnutls_anon_free_client_credentials fn_gnutls_anon_free_client_credentials
# define gnutls_bye fn_gnutls_bye
# define gnutls_x509_crt_get_key_id fn_gnutls_x509_crt_get_key_id
# define gnutls_x509_crt_get_pk_algorithm fn_gnutls_x509_crt_get_pk_algorithm
# define gnutls_x509_crt_get_serial fn_gnutls_x509_crt_get_serial
-# define gnutls_x509_crt_get_signature fn_gnutls_x509_crt_get_signature
# define gnutls_x509_crt_get_signature_algorithm fn_gnutls_x509_crt_get_signature_algorithm
# define gnutls_x509_crt_get_subject_unique_id fn_gnutls_x509_crt_get_subject_unique_id
# define gnutls_x509_crt_get_version fn_gnutls_x509_crt_get_version
ptrdiff_t
x_create_bitmap_from_file (struct frame *f, Lisp_Object file)
{
- Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
-
#ifdef HAVE_NTGUI
return -1; /* W32_TODO : bitmap support */
#endif /* HAVE_NTGUI */
+ Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
+
#ifdef HAVE_NS
ptrdiff_t id;
void *bitmap = ns_image_from_file (file);
#endif
/* XpmReadFileToPixmap is not available in the Windows port of
libxpm. But XpmReadFileToImage almost does what we want. */
- rc = XpmReadFileToImage (&hdc, SDATA (file),
+ rc = XpmReadFileToImage (&hdc, SSDATA (file),
&xpm_image, &xpm_mask,
&attrs);
#else
#ifdef HAVE_NTGUI
/* XpmCreatePixmapFromBuffer is not available in the Windows port
of libxpm. But XpmCreateImageFromBuffer almost does what we want. */
- rc = XpmCreateImageFromBuffer (&hdc, SDATA (buffer),
+ rc = XpmCreateImageFromBuffer (&hdc, SSDATA (buffer),
&xpm_image, &xpm_mask,
&attrs);
#else
Lisp_Object prev_event,
bool *used_mouse_menu)
{
-#define MAX_ENCODED_BYTES 16
#ifndef WINDOWSNT
+#define MAX_ENCODED_BYTES 16
Lisp_Object events[MAX_ENCODED_BYTES];
int n = 0;
#endif
the kbd_buffer can really hold. That may prevent loss
of characters on some systems when input is stuffed at us. */
unsigned char cbuf[KBD_BUFFER_SIZE - 1];
- int n_to_read, i;
+#ifndef WINDOWSNT
+ int n_to_read;
+#endif
+ int i;
struct tty_display_info *tty = terminal->display_info.tty;
int nread = 0;
#ifdef subprocesses
# else /* !NTGUI_UNICODE */
extern AppendMenuW_Proc unicode_append_menu;
# endif /* NTGUI_UNICODE */
-extern HMENU current_popup_menu;
#endif /* HAVE_NTGUI */
#include "menu.h"
XPROCESS (proc)->infd >= 0 && \
datagram_address[XPROCESS (proc)->infd].sa != 0)
#else
-#define DATAGRAM_CHAN_P(chan) (0)
#define DATAGRAM_CONN_P(proc) (0)
#endif
/* Status of sampling profiler. */
static enum profiler_cpu_running
- { NOT_RUNNING, TIMER_SETTIME_RUNNING, SETITIMER_RUNNING }
+ { NOT_RUNNING,
+#ifdef HAVE_ITIMERSPEC
+ TIMER_SETTIME_RUNNING,
+#endif
+ SETITIMER_RUNNING
+ }
profiler_cpu_running;
/* Hash-table log of CPU profiler. */
}
+#ifndef WINDOWSNT
/* Display a warning message. */
static void
{
message1 (msg);
}
+#endif /* !WINDOWSNT */
/* Parse sound specification SOUND, and fill ATTRS with what is
/* In process.h which conflicts with the local copy. */
#define _P_WAIT 0
int _cdecl _spawnlp (int, const char *, const char *, ...);
-int _cdecl _getpid (void);
/* The following is needed for O_CLOEXEC, F_SETFD, FD_CLOEXEC, and
several prototypes of functions called below. */
#include <sys/socket.h>
sys_subshell (void)
{
#ifdef DOS_NT /* Demacs 1.1.2 91/10/20 Manabu Higashida */
- int st;
#ifdef MSDOS
+ int st;
char oldwd[MAXPATHLEN+1]; /* Fixed length is safe on MSDOS. */
#else
char oldwd[MAX_UTF8_PATH];
-#endif
+#endif /* MSDOS */
+#else /* !DOS_NT */
+ int status;
#endif
pid_t pid;
- int status;
struct save_signal saved_handlers[5];
char *str = SSDATA (encode_current_directory ());
init_sys_modes (struct tty_display_info *tty_out)
{
struct emacs_tty tty;
+#ifndef DOS_NT
Lisp_Object terminal;
+#endif
Vtty_erase_char = Qnil;
int res, err = errno;
errno = 0;
- res = w32_compare_strings (SDATA (s1), SDATA (s2), loc, !NILP (ignore_case));
+ res = w32_compare_strings (SSDATA (s1), SSDATA (s2), loc, !NILP (ignore_case));
if (errno)
error ("Invalid string for collation: %s", strerror (errno));
struct terminal *
init_tty (const char *name, const char *terminal_type, bool must_succeed)
{
+ struct tty_display_info *tty = NULL;
+ struct terminal *terminal = NULL;
+#ifndef DOS_NT
char *area;
char **address = &area;
int status;
- struct tty_display_info *tty = NULL;
- struct terminal *terminal = NULL;
sigset_t oldset;
bool ctty = false; /* True if asked to open controlling tty. */
+#endif
if (!terminal_type)
maybe_fatal (must_succeed, 0,
if (name == NULL)
name = DEV_TTY;
+#ifndef DOS_NT
if (!strcmp (name, DEV_TTY))
ctty = 1;
+#endif
/* If we already have a terminal on the given device, use that. If
all such terminals are suspended, create a new one instead. */
/* Basically, our "initialized" flag. */
BOOL using_dynamic_heap = FALSE;
-int open_input_file (file_data *p_file, char *name);
-int open_output_file (file_data *p_file, char *name, unsigned long size);
-void close_file_data (file_data *p_file);
-
void get_section_info (file_data *p_file);
void copy_executable_and_dump_data (file_data *, file_data *);
void dump_bss_and_heap (file_data *p_infile, file_data *p_outfile);
#define _start __start
#endif
+extern void mainCRTStartup (void);
+
/* Startup code for running on NT. When we are running as the dumped
version, we need to bootstrap our heap and .bss section into our
address space before we can actually hand off control to the startup
code supplied by NT (primarily because that code relies upon malloc ()). */
+void _start (void);
+
void
_start (void)
{
- extern void mainCRTStartup (void);
#if 1
/* Give us a way to debug problems with crashes on startup when
/* Return pointer to section header for named section. */
IMAGE_SECTION_HEADER *
-find_section (char * name, IMAGE_NT_HEADERS * nt_header)
+find_section (const char * name, IMAGE_NT_HEADERS * nt_header)
{
PIMAGE_SECTION_HEADER section;
int i;
for (i = 0; i < nt_header->FileHeader.NumberOfSections; i++)
{
- if (strcmp (section->Name, name) == 0)
+ if (strcmp ((char *)section->Name, name) == 0)
return section;
section++;
}
return NULL;
}
+#if 0 /* unused */
/* Return pointer to section header for section containing the given
offset in its raw data area. */
-IMAGE_SECTION_HEADER *
+static IMAGE_SECTION_HEADER *
offset_to_section (DWORD_PTR offset, IMAGE_NT_HEADERS * nt_header)
{
PIMAGE_SECTION_HEADER section;
}
return NULL;
}
+#endif
/* Return offset to an object in dst, given offset in src. We assume
there is at least one section in both src and dst images, and that
the some sections may have been added to dst (after sections in src). */
-DWORD_PTR
+static DWORD_PTR
relocate_offset (DWORD_PTR offset,
IMAGE_NT_HEADERS * src_nt_header,
IMAGE_NT_HEADERS * dst_nt_header)
(dst_section->PointerToRawData - src_section->PointerToRawData);
}
-#define OFFSET_TO_RVA(offset, section) \
- ((section)->VirtualAddress + ((DWORD_PTR)(offset) - (section)->PointerToRawData))
-
#define RVA_TO_OFFSET(rva, section) \
((section)->PointerToRawData + ((DWORD_PTR)(rva) - (section)->VirtualAddress))
/* Convert address in executing image to RVA. */
#define PTR_TO_RVA(ptr) ((DWORD_PTR)(ptr) - (DWORD_PTR) GetModuleHandle (NULL))
-#define RVA_TO_PTR(var,section,filedata) \
- ((unsigned char *)(RVA_TO_OFFSET (var,section) + (filedata).file_base))
-
#define PTR_TO_OFFSET(ptr, pfile_data) \
((unsigned char *)(ptr) - (pfile_data)->file_base)
#define OFFSET_TO_PTR(offset, pfile_data) \
((pfile_data)->file_base + (DWORD_PTR)(offset))
+#if 0 /* unused */
+#define OFFSET_TO_RVA(offset, section) \
+ ((section)->VirtualAddress + ((DWORD_PTR)(offset) - (section)->PointerToRawData))
+
+#define RVA_TO_PTR(var,section,filedata) \
+ ((unsigned char *)(RVA_TO_OFFSET (var,section) + (filedata).file_base))
+#endif
+
/* Flip through the executable and cache the info necessary for dumping. */
void
#undef localtime
+char *sys_ctime (const time_t *);
+int sys_chdir (const char *);
+int sys_creat (const char *, int);
+FILE *sys_fopen (const char *, const char *);
+int sys_mkdir (const char *);
+int sys_open (const char *, int, int);
+int sys_rename (char const *, char const *);
+int sys_rmdir (const char *);
+int sys_close (int);
+int sys_dup2 (int, int);
+int sys_read (int, char *, unsigned int);
+int sys_write (int, const void *, unsigned int);
+struct tm *sys_localtime (const time_t *);
+
+#ifdef HAVE_MODULES
+extern void dynlib_reset_last_error (void);
+#endif
+
#include "lisp.h"
#include "epaths.h" /* for PATH_EXEC */
#include <wincrypt.h>
#include <c-strcase.h>
+#include <utimens.h> /* for fdutimens */
#include "w32.h"
#include <dirent.h>
typedef HRESULT (WINAPI * ShGetFolderPath_fn)
(IN HWND, IN int, IN HANDLE, IN DWORD, OUT char *);
-void globals_of_w32 (void);
static DWORD get_rid (PSID);
static int is_symlink (const char *);
static char * chase_symlinks (const char *);
/* Get total user and system times for get-internal-run-time.
Returns a list of integers if the times are provided by the OS
(NT derivatives), otherwise it returns the result of current-time. */
+Lisp_Object w32_get_internal_run_time (void);
+
Lisp_Object
w32_get_internal_run_time (void)
{
#define REG_ROOT "SOFTWARE\\GNU\\Emacs"
LPBYTE
-w32_get_resource (char *key, LPDWORD lpdwtype)
+w32_get_resource (const char *key, LPDWORD lpdwtype)
{
LPBYTE lpvalue;
HKEY hrootkey = NULL;
static const struct env_entry
{
- char * name;
- char * def_value;
+ const char * name;
+ const char * def_value;
} dflt_envvars[] =
{
/* If the default value is NULL, we will use the value from the
{
/* If not found in any directory, use the
default as the last resort. */
- lpval = env_vars[i].def_value;
+ lpval = (char *)env_vars[i].def_value;
dwType = REG_EXPAND_SZ;
}
} while (*pstart);
}
else
{
- lpval = env_vars[i].def_value;
+ lpval = (char *)env_vars[i].def_value;
dwType = REG_EXPAND_SZ;
}
if (strcmp (env_vars[i].name, "HOME") == 0 && !appdata)
if (dwType == REG_EXPAND_SZ)
ExpandEnvironmentStrings ((LPSTR) lpval, buf1, sizeof (buf1));
else if (dwType == REG_SZ)
- strcpy (buf1, lpval);
+ strcpy (buf1, (char *)lpval);
if (dwType == REG_EXPAND_SZ || dwType == REG_SZ)
{
_snprintf (buf2, sizeof (buf2)-1, "%s=%s", env_vars[i].name,
sys_ctime (const time_t *t)
{
char *str = (char *) ctime (t);
- return (str ? str : "Sun Jan 01 00:00:00 1970");
+ return (str ? str : (char *)"Sun Jan 01 00:00:00 1970");
}
/* Emulate sleep...we could have done this with a define, but that
/* Convert all slashes in a filename to backslashes, and map filename
to a valid 8.3 name if necessary. The result is a pointer to a
static buffer, so CAVEAT EMPTOR! */
+const char *map_w32_filename (const char *, const char **);
+
const char *
map_w32_filename (const char * name, const char ** pPath)
{
{
/* Force temp name to require a manufactured 8.3 alias - this
seems to make the second rename work properly. */
- sprintf (p, "_.%s.%u", o, i);
+ sprintf (p, "_.%s.%d", o, i);
i++;
result = rename (oldname_a, temp_a);
}
}
/* Return non-zero if NAME is a potentially slow filesystem. */
+int is_slow_fs (const char *);
+
int
is_slow_fs (const char *name)
{
HANDLE winsock_lib;
static int winsock_inuse;
+BOOL term_winsock (void);
+
BOOL
term_winsock (void)
{
/* Extend strerror to handle the winsock-specific error codes. */
struct {
int errnum;
- char * msg;
+ const char * msg;
} _wsa_errlist[] = {
{WSAEINTR , "Interrupted function call"},
{WSAEBADF , "Bad file descriptor"},
for (i = 0; _wsa_errlist[i].errnum >= 0; i++)
if (_wsa_errlist[i].errnum == error_no)
- return _wsa_errlist[i].msg;
+ return (char *)_wsa_errlist[i].msg;
sprintf (unknown_msg, "Unidentified error: %d", error_no);
return unknown_msg;
\f
/* Emulation of SIOCGIFCONF and getifaddrs, see process.c. */
-extern Lisp_Object conv_sockaddr_to_lisp (struct sockaddr *, ptrdiff_t);
-
/* Return information about network interface IFNAME, or about all
interfaces (if IFNAME is nil). */
static Lisp_Object
w32_unicode_filenames = 1;
#ifdef HAVE_MODULES
- extern void dynlib_reset_last_error (void);
dynlib_reset_last_error ();
#endif
int err, HANDLE handles[4]);
/* Return the string resource associated with KEY of type TYPE. */
-extern LPBYTE w32_get_resource (char * key, LPDWORD type);
+extern LPBYTE w32_get_resource (const char * key, LPDWORD type);
extern void release_listen_threads (void);
extern void init_ntproc (int);
#include "w32common.h" /* for os_subtype */
#include "w32inevt.h"
+#ifdef WINDOWSNT
+#include "w32.h" /* for syms_of_ntterm */
+#endif
+
static void w32con_move_cursor (struct frame *f, int row, int col);
static void w32con_clear_to_end (struct frame *f);
static void w32con_clear_frame (struct frame *f);
someone hits ^C in a 'suspended' session (child shell).
Also ignore Ctrl-Break signals. */
+BOOL ctrl_c_handler (unsigned long);
+
BOOL
ctrl_c_handler (unsigned long type)
{
stubs from termcap.c
***********************************************************************/
+void sys_tputs (char *, int, int (*) (int));
+
void
sys_tputs (char *str, int nlines, int (*outfun) (int))
{
}
+char *sys_tgetstr (char *, char **);
+
char *
sys_tgetstr (char *cap, char **area)
{
struct tty_display_info *current_tty = NULL;
int cost = 0;
+int evalcost (int);
+
int
evalcost (int c)
{
return c;
}
+int cmputc (int);
+
int
cmputc (int c)
{
return c;
}
+void cmcheckmagic (struct tty_display_info *);
+
void
cmcheckmagic (struct tty_display_info *tty)
{
}
+void cmcostinit (struct tty_display_info *);
+
void
cmcostinit (struct tty_display_info *tty)
{
}
+void cmgoto (struct tty_display_info *, int, int);
+
void
cmgoto (struct tty_display_info *tty, int row, int col)
{
}
+void Wcm_clear (struct tty_display_info *);
+
void
Wcm_clear (struct tty_display_info *tty)
{
#define FOF_NO_CONNECTED_ELEMENTS 0x2000
#endif
-void syms_of_w32fns (void);
-void globals_of_w32fns (void);
-
-extern void free_frame_menubar (struct frame *);
extern int w32_console_toggle_lock_key (int, Lisp_Object);
extern void w32_menu_display_help (HWND, HMENU, UINT, UINT);
extern void w32_free_menu_strings (HWND);
extern const char *map_w32_filename (const char *, const char **);
-extern char * w32_strerror (int error_no);
#ifndef IDC_HAND
#define IDC_HAND MAKEINTRESOURCE(32649)
static int w32_unicode_gui;
/* From w32menu.c */
-extern HMENU current_popup_menu;
int menubar_in_use = 0;
/* From w32uniscribe.c */
void x_set_icon_type (struct frame *, Lisp_Object, Lisp_Object);
void x_set_icon_name (struct frame *, Lisp_Object, Lisp_Object);
void x_explicitly_set_name (struct frame *, Lisp_Object, Lisp_Object);
-void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
void x_set_title (struct frame *, Lisp_Object, Lisp_Object);
-void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
-void x_set_internal_border_width (struct frame *f, Lisp_Object, Lisp_Object);
\f
/* Store the screen positions of frame F into XPTR and YPTR.
/* The default colors for the w32 color map */
typedef struct colormap_t
{
- char *name;
+ const char *name;
COLORREF colorref;
} colormap_t;
NULL, NULL, (LPBYTE)color_buffer, &color_size)
== ERROR_SUCCESS)
{
- int r, g, b;
+ unsigned r, g, b;
if (sscanf (color_buffer, " %u %u %u", &r, &g, &b) == 3)
*system_colors = Fcons (Fcons (build_string (full_name_buffer),
make_number (RGB (r, g, b))),
If F is not a color screen, return DEF (default) regardless of what
ARG says. */
-int
+static int
x_decode_color (struct frame *f, Lisp_Object arg, int def)
{
XColor cdef;
Note that this does not fully take effect if done before
F has a window. */
-void
+static void
x_set_border_pixel (struct frame *f, int pix)
{
#endif
}
\f
-void
+static void
x_clear_under_internal_border (struct frame *f)
{
int border = FRAME_INTERNAL_BORDER_WIDTH (f);
suggesting a new name, which lisp code should override; if
F->explicit_name is set, ignore the new name; otherwise, set it. */
-void
+static void
x_set_name (struct frame *f, Lisp_Object name, bool explicit)
{
/* Make sure that requests from lisp code override requests from
\f
/* Subroutines for creating a frame. */
+Cursor w32_load_cursor (LPCTSTR);
+
Cursor
w32_load_cursor (LPCTSTR name)
{
can prevent this by setting the
w32-pass-[lr]window-to-system variable to
NIL. */
- if (hs->vkCode == VK_LWIN && !NILP (Vw32_pass_lwindow_to_system) ||
- hs->vkCode == VK_RWIN && !NILP (Vw32_pass_rwindow_to_system))
+ if (hs->vkCode == (VK_LWIN && !NILP (Vw32_pass_lwindow_to_system)) ||
+ (hs->vkCode == VK_RWIN && !NILP (Vw32_pass_rwindow_to_system)))
{
/* Not prevented - Simulate the keypress to the system. */
memset (inputs, 0, sizeof (inputs));
/* Some other key was pressed while a captured Win key is down.
This is either an Emacs registered hotkey combination, or a
system hotkey. */
- if (kbdhook.lwindown && kbdhook.lwin_hooked[hs->vkCode] ||
- kbdhook.rwindown && kbdhook.rwin_hooked[hs->vkCode])
+ if ((kbdhook.lwindown && kbdhook.lwin_hooked[hs->vkCode]) ||
+ (kbdhook.rwindown && kbdhook.rwin_hooked[hs->vkCode]))
{
/* Hooked Win-x combination, do not pass the keypress to Windows. */
kbdhook.suppress_lone = 1;
/* Mark a specific key combination as hooked, preventing it to be
handled by the system. */
-void
+static void
hook_w32_key (int hook, int modifier, int vkey)
{
char *tbl = NULL;
leaves the Win key(s) "down" from the hook's point of view - the
keyup event is never seen. Thus, this function must be called when
the system is locked. */
-void
+static void
reset_w32_kbdhook_state (void)
{
kbdhook.lwindown = 0;
/* Convert between the modifier bits W32 uses and the modifier bits
Emacs uses. */
+unsigned int w32_key_to_modifier (int);
unsigned int
w32_key_to_modifier (int key)
return mods;
}
+unsigned int map_keypad_keys (unsigned int, unsigned int);
+
unsigned int
map_keypad_keys (unsigned int virt_key, unsigned int extended)
{
PostThreadMessage (dwWindowsThreadId, WM_NULL, 0, 0);
}
+DWORD WINAPI w32_msg_worker (void *);
+
DWORD WINAPI
w32_msg_worker (void *arg)
{
Be ready to treat the case when this delivers WM_(SYS)DEADCHAR. */
static int after_deadkey = -1;
-int
+static int
deliver_wm_chars (int do_translate, HWND hwnd, UINT msg, UINT wParam,
UINT lParam, int legacy_alt_meta)
{
if (!STRINGP (font))
{
int i;
- static char *names[]
+ static const char *names[]
= { "Courier New-10",
"-*-Courier-normal-r-*-*-13-*-*-*-c-*-iso8859-1",
"-*-Fixedsys-normal-r-*-*-12-*-*-*-c-*-iso8859-1",
else if (! NILP (visibility))
x_make_frame_visible (f);
else
- /* Must have been Qnil. */
- ;
+ {
+ /* Must have been Qnil. */
+ ;
+ }
}
/* Initialize `default-minibuffer-frame' in case this is the first
return sound;
}
+#if 0 /* unused */
int
x_screen_planes (register struct frame *f)
{
return FRAME_DISPLAY_INFO (f)->n_planes;
}
+#endif
\f
/* Return the display structure for the display named NAME.
Open a new connection if necessary. */
Text larger than the specified size is clipped. */)
(Lisp_Object string, Lisp_Object frame, Lisp_Object parms, Lisp_Object timeout, Lisp_Object dx, Lisp_Object dy)
{
- struct frame *f, *tip_f;
+ struct frame *tip_f;
struct window *w;
int root_x, root_y;
struct buffer *old_buffer;
struct text_pos pos;
- int i, width, height;
+ int width, height;
int old_windows_or_buffers_changed = windows_or_buffers_changed;
ptrdiff_t count = SPECPDL_INDEX ();
ptrdiff_t count_1;
specbind (Qinhibit_redisplay, Qt);
CHECK_STRING (string);
- f = decode_window_system_frame (frame);
+ decode_window_system_frame (frame);
if (NILP (timeout))
timeout = make_number (5);
else
/* Alphanumerics map to themselves. */
if (key[1] == 0)
{
- if (key[0] >= 'A' && key[0] <= 'Z' ||
- key[0] >= '0' && key[0] <= '9')
+ if ((key[0] >= 'A' && key[0] <= 'Z')
+ || (key[0] >= '0' && key[0] <= '9'))
return key[0];
if (key[0] >= 'a' && key[0] <= 'z')
return toupper(key[0]);
else
{
long m;
- float h;
+ double h;
char buffer[16];
snprintf (buffer, 16, "%ld", seconds_left);
seconds = build_string (buffer);
/* For convenience when debugging. (You cannot call GetLastError
directly from GDB: it will crash, because it uses the __stdcall
calling convention, not the _cdecl convention assumed by GDB.) */
+DWORD w32_last_error (void);
+
DWORD
w32_last_error (void)
{
EMACS_INT retval;
char *icon, *tip, *title, *msg;
enum NI_Severity severity;
- unsigned timeout;
+ unsigned timeout = 0;
if (nargs == 0)
return Qnil;
if (STRINGP (lres))
icon = SSDATA (ENCODE_FILE (Fexpand_file_name (lres, Qnil)));
else
- icon = "";
+ icon = (char *)"";
/* Tip. */
lres = Fplist_get (arg_plist, QCtip);
if (STRINGP (lres))
tip = SSDATA (code_convert_string_norecord (lres, Qutf_8, 1));
else
- tip = "Emacs notification";
+ tip = (char *)"Emacs notification";
/* Severity. */
lres = Fplist_get (arg_plist, QClevel);
if (STRINGP (lres))
title = SSDATA (code_convert_string_norecord (lres, Qutf_8, 1));
else
- title = "";
+ title = (char *)"";
/* Notification body text. */
lres = Fplist_get (arg_plist, QCbody);
if (STRINGP (lres))
msg = SSDATA (code_convert_string_norecord (lres, Qutf_8, 1));
else
- msg = "";
+ msg = (char *)"";
/* Do it! */
retval = add_tray_notification (f, icon, tip, severity, timeout, title, msg);
#define BACKTRACE_LIMIT_MAX 62
-int
+static int
w32_backtrace (void **buffer, int limit)
{
static CaptureStackBackTrace_proc s_pfn_CaptureStackBackTrace = NULL;
static BOOL g_b_init_get_outline_metrics_w;
static BOOL g_b_init_get_text_metrics_w;
static BOOL g_b_init_get_glyph_outline_w;
-static BOOL g_b_init_get_glyph_outline_w;
static BOOL g_b_init_get_char_width_32_w;
typedef UINT (WINAPI * GetOutlineTextMetricsW_Proc) (
/* Handle startup case of w32-charset-info-alist not
being set up yet. */
if (NILP (Vw32_charset_info_alist))
- return "iso8859-1";
+ return (char *)"iso8859-1";
charset_type = Qw32_charset_ansi;
break;
case DEFAULT_CHARSET:
{
if (outline)
{
- float pointsize = height * 72.0 / one_w32_display_info.resy;
+ double pointsize = height * 72.0 / one_w32_display_info.resy;
/* Round to nearest half point. floor is used, since round is not
supported in MS library. */
pointsize = floor (pointsize * 2 + 0.5) / 2;
Lisp_Object intern_font_name (char *);
-extern void syms_of_w32font (void);
extern void globals_of_w32font (void);
#endif
claims for new memory. Before dumping, we allocate space
from the fixed size dumped_data[] array.
*/
-NTSTATUS NTAPI
+static NTSTATUS NTAPI
dumped_data_commit (PVOID Base, PVOID *CommitAddress, PSIZE_T CommitSize)
{
/* This is used before dumping.
/* FREEABLE_P checks if the block can be safely freed. */
#define FREEABLE_P(addr) \
- ((unsigned char *)(addr) > 0 \
- && ((unsigned char *)(addr) < dumped_data \
- || (unsigned char *)(addr) >= dumped_data + DUMPED_HEAP_SIZE))
+ ((DWORD_PTR)(unsigned char *)(addr) > 0 \
+ && ((unsigned char *)(addr) < dumped_data \
+ || (unsigned char *)(addr) >= dumped_data + DUMPED_HEAP_SIZE))
void *
malloc_after_dump (size_t size)
if (memInfo.RegionSize < nbytes)
{
memset (&m2, 0, sizeof (m2));
- if (VirtualQuery (*var + memInfo.RegionSize, &m2, sizeof(m2)) == 0)
+ if (VirtualQuery ((char *)*var + memInfo.RegionSize, &m2, sizeof(m2)) == 0)
DebPrint (("mmap_realloc: VirtualQuery error = %ld\n",
GetLastError ()));
/* If there is enough room in the current reserved area, then
}
/* We still can decommit pages. */
- if (VirtualFree (*var + nbytes + get_page_size(),
+ if (VirtualFree ((char *)*var + nbytes + get_page_size(),
memInfo.RegionSize - nbytes - get_page_size(),
MEM_DECOMMIT) == 0)
DebPrint (("mmap_realloc: VirtualFree error %ld\n", GetLastError ()));
void close_file_data (file_data *p_file);
/* Return pointer to section header for named section. */
-IMAGE_SECTION_HEADER * find_section (char * name, IMAGE_NT_HEADERS * nt_header);
+IMAGE_SECTION_HEADER * find_section (const char *, IMAGE_NT_HEADERS *);
/* Return pointer to section header for section containing the given
relative virtual address. */
-IMAGE_SECTION_HEADER * rva_to_section (DWORD_PTR rva, IMAGE_NT_HEADERS * nt_header);
+IMAGE_SECTION_HEADER * rva_to_section (DWORD_PTR, IMAGE_NT_HEADERS *);
#endif /* NTHEAP_H_ */
HMENU current_popup_menu;
-void syms_of_w32menu (void);
-void globals_of_w32menu (void);
-
typedef BOOL (WINAPI * GetMenuItemInfoA_Proc) (
IN HMENU,
IN UINT,
MessageBoxW_Proc unicode_message_box = NULL;
#endif /* NTGUI_UNICODE */
-void set_frame_menubar (struct frame *, bool, bool);
-
#ifdef HAVE_DIALOGS
static Lisp_Object w32_dialog_show (struct frame *, Lisp_Object, Lisp_Object, char **);
#else
when the user makes a selection.
Figure out what the user chose
and put the appropriate events into the keyboard buffer. */
+void menubar_selection_callback (struct frame *, void *);
void
menubar_selection_callback (struct frame *f, void * client_data)
}
else
{
- text = L"";
+ text = (WCHAR *)L"";
}
if (NILP (header))
/* Display help string for currently pointed to menu item. Not
supported on NT 3.51 and earlier, as GetMenuItemInfo is not
available. */
+void w32_menu_display_help (HWND, HMENU, UINT, UINT);
+
void
w32_menu_display_help (HWND owner, HMENU menu, UINT item, UINT flags)
{
static void
send_notifications (struct notifications_set *ns)
{
- int done = 0;
struct frame *f = SELECTED_FRAME ();
/* We add the current notification set to the linked list. Use the
/* When we are running in batch mode, there's no one to send a
message, so we just signal the data is available and hope
sys_select will be called soon and will read the data. */
+#if 0
else if (FRAME_INITIAL_P (f) && noninteractive)
;
+#endif
}
/* An APC routine to cancel outstanding directory watch. Invoked by
thread that issued the ReadDirectoryChangesW call can call CancelIo
to cancel that. (CancelIoEx is only available since Vista, so we
cannot use it on XP.) */
+VOID CALLBACK watch_end (ULONG_PTR);
+
VOID CALLBACK
watch_end (ULONG_PTR arg)
{
read by ReadDirectoryChangesW. Called by the OS when the thread
which issued the asynchronous ReadDirectoryChangesW call is in the
"alertable state", i.e. waiting inside SleepEx call. */
+VOID CALLBACK watch_completion (DWORD, DWORD, OVERLAPPED *);
+
VOID CALLBACK
watch_completion (DWORD status, DWORD bytes_ret, OVERLAPPED *io_info)
{
#undef kill
#include <windows.h>
-#if defined(__GNUC__) && !defined(__MINGW64__)
-/* This definition is missing from mingw.org headers, but not MinGW64
- headers. */
-extern BOOL WINAPI IsValidLocale (LCID, DWORD);
-#endif
#ifdef HAVE_LANGINFO_CODESET
#include <nl_types.h>
+ ((DWORD_PTR)(var) - (section)->VirtualAddress) \
+ (filedata).file_base))
+extern BOOL g_b_init_compare_string_w;
+int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *,
+ struct timespec *, void *);
+
/* Signal handlers...SIG_DFL == 0 so this is initialized correctly. */
static signal_handler sig_handlers[NSIG];
are not expanded if we run the program directly without a shell.
Some extra whitespace characters need quoting in Cygwin/MSYS programs,
so this list is conditionally modified below. */
- char *sepchars = " \t*?";
+ const char *sepchars = " \t*?";
/* This is for native w32 apps; modified below for Cygwin/MSUS apps. */
char escape_char = '\\';
char cmdname_a[MAX_PATH];
/* From w32.c */
extern HANDLE winsock_lib;
extern BOOL term_winsock (void);
-extern BOOL init_winsock (int load_now);
DEFUN ("w32-has-winsock", Fw32_has_winsock, Sw32_has_winsock, 0, 1, 0,
doc: /* Test for presence of the Windows socket library `winsock'.
LCID lcid = GetThreadLocale ();
wchar_t *string1_w, *string2_w;
int val, needed;
- extern BOOL g_b_init_compare_string_w;
static CompareStringW_Proc pCompareStringW;
DWORD flags = 0;
*/
static char *
-w32_get_rdb_resource (char *rdb, const char *resource)
+w32_get_rdb_resource (const char *rdb, const char *resource)
{
- char *value = rdb;
+ char *value = (char *)rdb;
int len = strlen (resource);
while (*value)
#include "lisp.h"
#include "w32common.h" /* os_subtype */
#include "w32term.h" /* for all of the w32 includes */
+#include "w32select.h"
#include "keyboard.h" /* for waiting_for_input */
#include "blockinput.h"
#include "coding.h"
extern unsigned int msh_mousewheel;
-extern void free_frame_menubar (struct frame *);
-
extern int w32_codepage_for_font (char *fontname);
extern Cursor w32_load_cursor (LPCTSTR name);
void x_lower_frame (struct frame *);
void x_scroll_bar_clear (struct frame *);
-void x_wm_set_size_hint (struct frame *, long, bool);
void x_raise_frame (struct frame *);
-void x_set_window_size (struct frame *, bool, int, int, bool);
void x_wm_set_window_state (struct frame *, int);
void x_wm_set_icon_pixmap (struct frame *, int);
static void w32_initialize (void);
#endif /* 0 */
\f
-void
+static void
XChangeGC (void *ignore, XGCValues *gc, unsigned long mask,
XGCValues *xgcv)
{
return gc;
}
-void
+#if 0 /* unused for now, see x_draw_image_glyph_string below */
+static void
XGetGCValues (void *ignore, XGCValues *gc,
unsigned long mask, XGCValues *xgcv)
{
XChangeGC (ignore, xgcv, mask, gc);
}
+#endif
static void
w32_set_clip_rectangle (HDC hdc, RECT *rect)
*/
-void
+static void
w32_draw_underwave (struct glyph_string *s, COLORREF color)
{
int wave_height = 3, wave_length = 2;
}
/* Draw a hollow rectangle at the specified position. */
-void
+static void
w32_draw_rectangle (HDC hdc, XGCValues *gc, int x, int y,
int width, int height)
{
/* Shift display to make room for inserted glyphs. */
-void
+static void
w32_shift_glyphs_for_insert (struct frame *f, int x, int y,
int width, int height, int shift_by)
{
}
+#if 0 /* unused */
/* Handle an event saying the mouse has moved out of an Emacs frame. */
-void
+static void
x_mouse_leave (struct w32_display_info *dpyinfo)
{
x_new_focus_frame (dpyinfo, dpyinfo->w32_focus_event_frame);
}
+#endif
/* The focus has changed, or we have redirected a frame's focus to
another frame (this happens when a frame uses a surrogate
recursively with different messages by the system.
*/
+extern void menubar_selection_callback (struct frame *, void *);
+
static int
w32_read_socket (struct terminal *terminal,
struct input_event *hold_quit)
if (f)
{
- extern void menubar_selection_callback
- (struct frame *f, void * client_data);
menubar_selection_callback (f, (void *)msg.msg.wParam);
}
/* Calculate the absolute position in frame F
from its current recorded position values and gravity. */
-void
+static void
x_calc_absolute_position (struct frame *f)
{
int flags = f->size_hint_flags;
/* Destroy the window of frame F. */
-void
+static void
x_destroy_window (struct frame *f)
{
struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
struct w32_display_info *x_display_info_for_name (Lisp_Object);
-Lisp_Object display_x_get_resource (struct w32_display_info *,
- Lisp_Object, Lisp_Object,
- Lisp_Object, Lisp_Object);
-
/* also defined in xterm.h XXX: factor out to common header */
extern struct w32_display_info *w32_term_init (Lisp_Object,
char *, char *);
extern int w32_defined_color (struct frame *f, const char *color,
XColor *color_def, bool alloc_p);
-extern void x_set_window_size (struct frame *f, bool change_gravity,
- int width, int height, bool pixelwise);
extern int x_display_pixel_height (struct w32_display_info *);
extern int x_display_pixel_width (struct w32_display_info *);
-extern Lisp_Object x_get_focus_frame (struct frame *);
-extern void x_make_frame_visible (struct frame *f);
-extern void x_make_frame_invisible (struct frame *f);
-extern void x_iconify_frame (struct frame *f);
-extern void x_set_frame_alpha (struct frame *f);
extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
extern void x_set_tool_bar_lines (struct frame *f,
Lisp_Object value,
extern void x_set_internal_border_width (struct frame *f,
Lisp_Object value,
Lisp_Object oldval);
-extern void x_activate_menubar (struct frame *);
-extern bool x_bitmap_icon (struct frame *, Lisp_Object);
extern void initialize_frame_menubar (struct frame *);
-extern void x_free_frame_resources (struct frame *);
-extern void x_real_positions (struct frame *, int *, int *);
/* w32inevt.c */
extern int w32_kbd_patch_key (KEY_EVENT_RECORD *event, int cpId);
extern int w32_kbd_mods_to_emacs (DWORD mods, WORD key);
-
-extern Lisp_Object x_get_focus_frame (struct frame *);
-
/* w32console.c */
extern void w32con_hide_cursor (void);
extern void w32con_show_cursor (void);
NEWTEXTMETRICEX *,
DWORD, LPARAM);
/* Used by uniscribe_otf_capability. */
-static Lisp_Object otf_features (HDC context, char *table);
+static Lisp_Object otf_features (HDC context, const char *table);
static int
memq_no_quit (Lisp_Object elt, Lisp_Object list)
}
static Lisp_Object
-otf_features (HDC context, char *table)
+otf_features (HDC context, const char *table)
{
Lisp_Object script_list = Qnil;
unsigned short scriptlist_table, n_scripts, feature_table;
/* Note that this should be called at every startup, not just when dumping,
as it needs to test for the existence of the Uniscribe library. */
+void syms_of_w32uniscribe (void);
+
void
syms_of_w32uniscribe (void)
{
#include TERM_HEADER
#include "fontset.h"
#ifdef HAVE_NTGUI
-#define x_display_info w32_display_info
#define GCGraphicsExposures 0
#endif /* HAVE_NTGUI */