Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
fbd6baed
Commit
fbd6baed
authored
Nov 19, 1996
by
Geoff Voelker
Browse files
Change identifiers of the form win32* to w32*.
parent
0f7d64d2
Changes
24
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
574 additions
and
574 deletions
+574
-574
lisp/term/w32-win.el
lisp/term/w32-win.el
+11
-11
src/emacs.c
src/emacs.c
+5
-5
src/frame.c
src/frame.c
+5
-5
src/frame.h
src/frame.h
+5
-5
src/keyboard.c
src/keyboard.c
+2
-2
src/s/ms-w32.h
src/s/ms-w32.h
+1
-1
src/termhooks.h
src/termhooks.h
+1
-1
src/unexw32.c
src/unexw32.c
+1
-1
src/w32.c
src/w32.c
+28
-28
src/w32.h
src/w32.h
+1
-1
src/w32console.c
src/w32console.c
+6
-6
src/w32faces.c
src/w32faces.c
+16
-16
src/w32fns.c
src/w32fns.c
+419
-419
src/w32heap.c
src/w32heap.c
+4
-4
src/w32heap.h
src/w32heap.h
+4
-4
src/w32inevt.c
src/w32inevt.c
+11
-11
src/w32inevt.h
src/w32inevt.h
+4
-4
src/w32menu.c
src/w32menu.c
+22
-22
src/w32proc.c
src/w32proc.c
+26
-26
src/w32reg.c
src/w32reg.c
+2
-2
No files found.
lisp/term/w32-win.el
View file @
fbd6baed
...
@@ -81,7 +81,7 @@
...
@@ -81,7 +81,7 @@
;; with the standard X scroll-bars, we don't try to use the normal
;; with the standard X scroll-bars, we don't try to use the normal
;; scroll bar routines.
;; scroll bar routines.
(
defun
w
in
32-handle-scroll-bar-event
(
event
)
(
defun
w32-handle-scroll-bar-event
(
event
)
"Handle Win32 scroll bar events to do normal Window style scrolling."
"Handle Win32 scroll bar events to do normal Window style scrolling."
(
interactive
"e"
)
(
interactive
"e"
)
(
let
((
old-window
(
selected-window
)))
(
let
((
old-window
(
selected-window
)))
...
@@ -107,9 +107,9 @@
...
@@ -107,9 +107,9 @@
(
select-window
old-window
))))
(
select-window
old-window
))))
;; The following definition is used for debugging.
;; The following definition is used for debugging.
;(defun w
in
32-handle-scroll-bar-event (event) (interactive "e") (princ event))
;(defun w32-handle-scroll-bar-event (event) (interactive "e") (princ event))
(
global-set-key
[vertical-scroll-bar
mouse-1]
'w
in
32-handle-scroll-bar-event
)
(
global-set-key
[vertical-scroll-bar
mouse-1]
'w32-handle-scroll-bar-event
)
;; (scroll-bar-mode nil)
;; (scroll-bar-mode nil)
...
@@ -521,7 +521,7 @@ This is in addition to the primary selection.")
...
@@ -521,7 +521,7 @@ This is in addition to the primary selection.")
(
defun
x-select-text
(
text
&optional
push
)
(
defun
x-select-text
(
text
&optional
push
)
(
if
x-select-enable-clipboard
(
if
x-select-enable-clipboard
(
w
in
32-set-clipboard-data
text
))
(
w32-set-clipboard-data
text
))
(
setq
x-last-selected-text
text
))
(
setq
x-last-selected-text
text
))
;;; Return the value of the current selection.
;;; Return the value of the current selection.
...
@@ -532,8 +532,8 @@ This is in addition to the primary selection.")
...
@@ -532,8 +532,8 @@ This is in addition to the primary selection.")
(
let
(
text
)
(
let
(
text
)
;; Don't die if x-get-selection signals an error.
;; Don't die if x-get-selection signals an error.
(
condition-case
c
(
condition-case
c
(
setq
text
(
w
in
32-get-clipboard-data
))
(
setq
text
(
w32-get-clipboard-data
))
(
error
(
message
"w
in
32-get-clipboard-data:%s"
c
)))
(
error
(
message
"w32-get-clipboard-data:%s"
c
)))
(
if
(
string=
text
""
)
(
setq
text
nil
))
(
if
(
string=
text
""
)
(
setq
text
nil
))
(
cond
(
cond
((
not
text
)
nil
)
((
not
text
)
nil
)
...
@@ -576,7 +576,7 @@ This is in addition to the primary selection.")
...
@@ -576,7 +576,7 @@ This is in addition to the primary selection.")
(
setq
x-cut-buffer-max
(
min
(
-
(
/
(
x-server-max-request-size
)
2
)
100
)
(
setq
x-cut-buffer-max
(
min
(
-
(
/
(
x-server-max-request-size
)
2
)
100
)
x-cut-buffer-max
))
x-cut-buffer-max
))
;; W
in
32 expects the menu bar cut and paste commands to use the clipboard.
;; W32 expects the menu bar cut and paste commands to use the clipboard.
;; This has ,? to match both on Sunos and on Solaris.
;; This has ,? to match both on Sunos and on Solaris.
(
menu-bar-enable-clipboard
)
(
menu-bar-enable-clipboard
)
...
@@ -628,7 +628,7 @@ This is in addition to the primary selection.")
...
@@ -628,7 +628,7 @@ This is in addition to the primary selection.")
(
setq
interprogram-cut-function
'x-select-text
)
(
setq
interprogram-cut-function
'x-select-text
)
(
setq
interprogram-paste-function
'x-get-selection-value
)
(
setq
interprogram-paste-function
'x-get-selection-value
)
;;; Turn off window-splitting optimization; w
in
32 is usually fast enough
;;; Turn off window-splitting optimization; w32 is usually fast enough
;;; that this is only annoying.
;;; that this is only annoying.
(
setq
split-window-keep-point
t
)
(
setq
split-window-keep-point
t
)
...
@@ -638,7 +638,7 @@ This is in addition to the primary selection.")
...
@@ -638,7 +638,7 @@ This is in addition to the primary selection.")
;;; Set to a system sound if you want a fancy bell.
;;; Set to a system sound if you want a fancy bell.
(
set-message-beep
'ok
)
(
set-message-beep
'ok
)
;; Remap some functions to call w
in
32 common dialogs
;; Remap some functions to call w32 common dialogs
(
defun
internal-face-interactive
(
what
&optional
bool
)
(
defun
internal-face-interactive
(
what
&optional
bool
)
(
let*
((
fn
(
intern
(
concat
"face-"
what
)))
(
let*
((
fn
(
intern
(
concat
"face-"
what
)))
...
@@ -658,10 +658,10 @@ This is in addition to the primary selection.")
...
@@ -658,10 +658,10 @@ This is in addition to the primary selection.")
default
)))))
default
)))))
(
list
face
(
if
(
equal
value
""
)
nil
value
))))
(
list
face
(
if
(
equal
value
""
)
nil
value
))))
;; Redefine the font selection to use the Win32 dialog
;; Redefine the font selection to use the
standard
Win32 dialog
(
defun
mouse-set-font
(
&rest
fonts
)
(
defun
mouse-set-font
(
&rest
fonts
)
(
interactive
)
(
interactive
)
(
set-default-font
(
w
in
32-select-font
)))
(
set-default-font
(
w32-select-font
)))
;;; win32-win.el ends here
;;; win32-win.el ends here
src/emacs.c
View file @
fbd6baed
...
@@ -979,11 +979,11 @@ the Bugs section of the Emacs manual or the file BUGS.", argv[0]);
...
@@ -979,11 +979,11 @@ the Bugs section of the Emacs manual or the file BUGS.", argv[0]);
#endif
#endif
#ifdef HAVE_NTGUI
#ifdef HAVE_NTGUI
syms_of_w
in
32term
();
syms_of_w32term
();
syms_of_w
in
32fns
();
syms_of_w32fns
();
syms_of_w
in
32faces
();
syms_of_w32faces
();
syms_of_w
in
32select
();
syms_of_w32select
();
syms_of_w
in
32menu
();
syms_of_w32menu
();
#endif
/* HAVE_NTGUI */
#endif
/* HAVE_NTGUI */
#ifdef SYMS_SYSTEM
#ifdef SYMS_SYSTEM
...
...
src/frame.c
View file @
fbd6baed
...
@@ -75,7 +75,7 @@ Lisp_Object Qunsplittable;
...
@@ -75,7 +75,7 @@ Lisp_Object Qunsplittable;
Lisp_Object
Qmenu_bar_lines
;
Lisp_Object
Qmenu_bar_lines
;
Lisp_Object
Qwidth
;
Lisp_Object
Qwidth
;
Lisp_Object
Qx
;
Lisp_Object
Qx
;
Lisp_Object
Qw
in
32
;
Lisp_Object
Qw32
;
Lisp_Object
Qpc
;
Lisp_Object
Qpc
;
Lisp_Object
Qvisible
;
Lisp_Object
Qvisible
;
Lisp_Object
Qbuffer_predicate
;
Lisp_Object
Qbuffer_predicate
;
...
@@ -112,8 +112,8 @@ syms_of_frame_1 ()
...
@@ -112,8 +112,8 @@ syms_of_frame_1 ()
staticpro
(
&
Qwidth
);
staticpro
(
&
Qwidth
);
Qx
=
intern
(
"x"
);
Qx
=
intern
(
"x"
);
staticpro
(
&
Qx
);
staticpro
(
&
Qx
);
Qw
in
32
=
intern
(
"w
in
32"
);
Qw32
=
intern
(
"w32"
);
staticpro
(
&
Qw
in
32
);
staticpro
(
&
Qw32
);
Qpc
=
intern
(
"pc"
);
Qpc
=
intern
(
"pc"
);
staticpro
(
&
Qpc
);
staticpro
(
&
Qpc
);
Qvisible
=
intern
(
"visible"
);
Qvisible
=
intern
(
"visible"
);
...
@@ -221,8 +221,8 @@ See also `frame-live-p'.")
...
@@ -221,8 +221,8 @@ See also `frame-live-p'.")
return
Qt
;
return
Qt
;
case
output_x_window
:
case
output_x_window
:
return
Qx
;
return
Qx
;
case
output_w
in
32
:
case
output_w32
:
return
Qw
in
32
;
return
Qw32
;
case
output_msdos_raw
:
case
output_msdos_raw
:
return
Qpc
;
return
Qpc
;
default:
default:
...
...
src/frame.h
View file @
fbd6baed
...
@@ -33,7 +33,7 @@ extern int message_buf_print;
...
@@ -33,7 +33,7 @@ extern int message_buf_print;
/* The structure representing a frame. */
/* The structure representing a frame. */
enum
output_method
enum
output_method
{
output_termcap
,
output_x_window
,
output_msdos_raw
,
output_w
in
32
};
{
output_termcap
,
output_x_window
,
output_msdos_raw
,
output_w32
};
enum
vertical_scroll_bar_type
enum
vertical_scroll_bar_type
{
vertical_scroll_bar_none
,
vertical_scroll_bar_left
,
vertical_scroll_bar_right
};
{
vertical_scroll_bar_none
,
vertical_scroll_bar_left
,
vertical_scroll_bar_right
};
...
@@ -181,9 +181,9 @@ struct frame
...
@@ -181,9 +181,9 @@ struct frame
/* A structure of auxiliary data used for displaying the contents.
/* A structure of auxiliary data used for displaying the contents.
struct x_output is used for X window frames;
struct x_output is used for X window frames;
it is defined in xterm.h.
it is defined in xterm.h.
struct w
in
32_output is used for W
in
32 window frames;
struct w32_output is used for W32 window frames;
it is defined in w32term.h. */
it is defined in w32term.h. */
union
output_data
{
struct
x_output
*
x
;
struct
w
in
32_output
*
w
in
32
;
int
nothing
;
}
output_data
;
union
output_data
{
struct
x_output
*
x
;
struct
w32_output
*
w32
;
int
nothing
;
}
output_data
;
#ifdef MULTI_KBOARD
#ifdef MULTI_KBOARD
/* A pointer to the kboard structure associated with this frame.
/* A pointer to the kboard structure associated with this frame.
...
@@ -309,7 +309,7 @@ typedef struct frame *FRAME_PTR;
...
@@ -309,7 +309,7 @@ typedef struct frame *FRAME_PTR;
#define WINDOW_FRAME(w) (w)->frame
#define WINDOW_FRAME(w) (w)->frame
#define FRAME_X_P(f) ((f)->output_method == output_x_window)
#define FRAME_X_P(f) ((f)->output_method == output_x_window)
#define FRAME_W
IN
32_P(f) ((f)->output_method == output_w
in
32)
#define FRAME_W32_P(f) ((f)->output_method == output_w32)
#define FRAME_MSDOS_P(f) ((f)->output_method == output_msdos_raw)
#define FRAME_MSDOS_P(f) ((f)->output_method == output_msdos_raw)
/* FRAME_WINDOW_P tests whether the frame is a window, and is
/* FRAME_WINDOW_P tests whether the frame is a window, and is
...
@@ -318,7 +318,7 @@ typedef struct frame *FRAME_PTR;
...
@@ -318,7 +318,7 @@ typedef struct frame *FRAME_PTR;
#define FRAME_WINDOW_P(f) FRAME_X_P (f)
#define FRAME_WINDOW_P(f) FRAME_X_P (f)
#endif
#endif
#ifdef HAVE_NTGUI
#ifdef HAVE_NTGUI
#define FRAME_WINDOW_P(f) FRAME_W
IN
32_P (f)
#define FRAME_WINDOW_P(f) FRAME_W32_P (f)
#endif
#endif
#ifndef FRAME_WINDOW_P
#ifndef FRAME_WINDOW_P
#define FRAME_WINDOW_P(f) (0)
#define FRAME_WINDOW_P(f) (0)
...
...
src/keyboard.c
View file @
fbd6baed
...
@@ -3920,7 +3920,7 @@ make_lispy_event (event)
...
@@ -3920,7 +3920,7 @@ make_lispy_event (event)
}
}
#ifdef WINDOWSNT
#ifdef WINDOWSNT
case
w
in
32_scroll_bar_click
:
case w32_scroll_bar_click:
{
{
int button = event->code;
int button = event->code;
int is_double;
int is_double;
...
@@ -3948,7 +3948,7 @@ make_lispy_event (event)
...
@@ -3948,7 +3948,7 @@ make_lispy_event (event)
Fcons (part, Qnil)))));
Fcons (part, Qnil)))));
}
}
/* Always treat W
in
32 scroll bar events as clicks. */
/* Always treat W32 scroll bar events as clicks. */
event->modifiers |= click_modifier;
event->modifiers |= click_modifier;
{
{
...
...
src/s/ms-w32.h
View file @
fbd6baed
...
@@ -319,7 +319,7 @@ Boston, MA 02111-1307, USA. */
...
@@ -319,7 +319,7 @@ Boston, MA 02111-1307, USA. */
#define rindex strrchr
#define rindex strrchr
#ifdef HAVE_NTGUI
#ifdef HAVE_NTGUI
#define abort w
in
32_abort
#define abort w32_abort
#endif
#endif
/* Defines that we need that aren't in the standard signal.h */
/* Defines that we need that aren't in the standard signal.h */
...
...
src/termhooks.h
View file @
fbd6baed
...
@@ -248,7 +248,7 @@ enum event_kind
...
@@ -248,7 +248,7 @@ enum event_kind
.timestamp gives a timestamp (in
.timestamp gives a timestamp (in
milliseconds) for the click. */
milliseconds) for the click. */
#ifdef WINDOWSNT
#ifdef WINDOWSNT
w
in
32_scroll_bar_click
,
/* as for scroll_bar_click, but only generated
w32_scroll_bar_click
,
/* as for scroll_bar_click, but only generated
by MS-Windows scroll bar controls. */
by MS-Windows scroll bar controls. */
#endif
#endif
selection_request_event
,
/* Another X client wants a selection from us.
selection_request_event
,
/* Another X client wants a selection from us.
...
...
src/unexw32.c
View file @
fbd6baed
...
@@ -314,7 +314,7 @@ static unsigned long
...
@@ -314,7 +314,7 @@ static unsigned long
get_section_size
(
PIMAGE_SECTION_HEADER
p_section
)
get_section_size
(
PIMAGE_SECTION_HEADER
p_section
)
{
{
/* The section size is in different locations in the different versions. */
/* The section size is in different locations in the different versions. */
switch
(
get_
nt
_minor_version
())
switch
(
get_
w32
_minor_version
())
{
{
case
10
:
case
10
:
return
p_section
->
SizeOfRawData
;
return
p_section
->
SizeOfRawData
;
...
...
src/w32.c
View file @
fbd6baed
...
@@ -122,7 +122,7 @@ static HANDLE dir_find_handle = INVALID_HANDLE_VALUE;
...
@@ -122,7 +122,7 @@ static HANDLE dir_find_handle = INVALID_HANDLE_VALUE;
static
int
dir_is_fat
;
static
int
dir_is_fat
;
static
char
dir_pathname
[
MAXPATHLEN
+
1
];
static
char
dir_pathname
[
MAXPATHLEN
+
1
];
extern
Lisp_Object
Vw
in
32_downcase_file_names
;
extern
Lisp_Object
Vw32_downcase_file_names
;
DIR
*
DIR
*
opendir
(
char
*
filename
)
opendir
(
char
*
filename
)
...
@@ -199,7 +199,7 @@ readdir (DIR *dirp)
...
@@ -199,7 +199,7 @@ readdir (DIR *dirp)
strcpy
(
dir_static
.
d_name
,
find_data
.
cFileName
);
strcpy
(
dir_static
.
d_name
,
find_data
.
cFileName
);
if
(
dir_is_fat
)
if
(
dir_is_fat
)
_strlwr
(
dir_static
.
d_name
);
_strlwr
(
dir_static
.
d_name
);
else
if
(
!
NILP
(
Vw
in
32_downcase_file_names
))
else
if
(
!
NILP
(
Vw32_downcase_file_names
))
{
{
register
char
*
p
;
register
char
*
p
;
for
(
p
=
dir_static
.
d_name
;
*
p
;
p
++
)
for
(
p
=
dir_static
.
d_name
;
*
p
;
p
++
)
...
@@ -412,7 +412,7 @@ normalize_filename (fp, path_sep)
...
@@ -412,7 +412,7 @@ normalize_filename (fp, path_sep)
fp
+=
2
;
fp
+=
2
;
}
}
if
(
NILP
(
Vw
in
32_downcase_file_names
))
if
(
NILP
(
Vw32_downcase_file_names
))
{
{
while
(
*
fp
)
while
(
*
fp
)
{
{
...
@@ -536,7 +536,7 @@ request_sigio (void)
...
@@ -536,7 +536,7 @@ request_sigio (void)
#define REG_ROOT "SOFTWARE\\GNU\\Emacs"
#define REG_ROOT "SOFTWARE\\GNU\\Emacs"
LPBYTE
LPBYTE
nt
_get_resource
(
key
,
lpdwtype
)
w32
_get_resource
(
key
,
lpdwtype
)
char
*
key
;
char
*
key
;
LPDWORD
lpdwtype
;
LPDWORD
lpdwtype
;
{
{
...
@@ -610,7 +610,7 @@ init_environment ()
...
@@ -610,7 +610,7 @@ init_environment ()
for
(
i
=
0
;
i
<
(
sizeof
(
env_vars
)
/
sizeof
(
env_vars
[
0
]));
i
++
)
for
(
i
=
0
;
i
<
(
sizeof
(
env_vars
)
/
sizeof
(
env_vars
[
0
]));
i
++
)
{
{
if
(
!
getenv
(
env_vars
[
i
])
&&
if
(
!
getenv
(
env_vars
[
i
])
&&
(
lpval
=
nt
_get_resource
(
env_vars
[
i
],
&
dwType
))
!=
NULL
)
(
lpval
=
w32
_get_resource
(
env_vars
[
i
],
&
dwType
))
!=
NULL
)
{
{
if
(
dwType
==
REG_EXPAND_SZ
)
if
(
dwType
==
REG_EXPAND_SZ
)
{
{
...
@@ -691,7 +691,7 @@ get_emacs_configuration (void)
...
@@ -691,7 +691,7 @@ get_emacs_configuration (void)
os
=
(
GetVersion
()
&
0x80000000
)
?
"win95"
:
"nt"
;
os
=
(
GetVersion
()
&
0x80000000
)
?
"win95"
:
"nt"
;
sprintf
(
configuration_buffer
,
"%s-%s-%s%d.%d"
,
arch
,
oem
,
os
,
sprintf
(
configuration_buffer
,
"%s-%s-%s%d.%d"
,
arch
,
oem
,
os
,
get_
nt
_major_version
(),
get_
nt
_minor_version
());
get_
w32
_major_version
(),
get_
w32
_minor_version
());
return
configuration_buffer
;
return
configuration_buffer
;
}
}
...
@@ -714,7 +714,7 @@ gettimeofday (struct timeval *tv, struct timezone *tz)
...
@@ -714,7 +714,7 @@ gettimeofday (struct timeval *tv, struct timezone *tz)
}
}
/* ------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------- */
/* IO support and wrapper functions for W
in
32 API. */
/* IO support and wrapper functions for W32 API. */
/* ------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------- */
/* Place a wrapper around the MSVC version of ctime. It returns NULL
/* Place a wrapper around the MSVC version of ctime. It returns NULL
...
@@ -818,7 +818,7 @@ is_fat_volume (const char * name, const char ** pPath)
...
@@ -818,7 +818,7 @@ is_fat_volume (const char * name, const char ** pPath)
/* Map filename to a legal 8.3 name if necessary. */
/* Map filename to a legal 8.3 name if necessary. */
const
char
*
const
char
*
map_w
in
32_filename
(
const
char
*
name
,
const
char
**
pPath
)
map_w32_filename
(
const
char
*
name
,
const
char
**
pPath
)
{
{
static
char
shortname
[
MAX_PATH
];
static
char
shortname
[
MAX_PATH
];
char
*
str
=
shortname
;
char
*
str
=
shortname
;
...
@@ -922,25 +922,25 @@ map_win32_filename (const char * name, const char ** pPath)
...
@@ -922,25 +922,25 @@ map_win32_filename (const char * name, const char ** pPath)
int
int
sys_access
(
const
char
*
path
,
int
mode
)
sys_access
(
const
char
*
path
,
int
mode
)
{
{
return
_access
(
map_w
in
32_filename
(
path
,
NULL
),
mode
);
return
_access
(
map_w32_filename
(
path
,
NULL
),
mode
);
}
}
int
int
sys_chdir
(
const
char
*
path
)
sys_chdir
(
const
char
*
path
)
{
{
return
_chdir
(
map_w
in
32_filename
(
path
,
NULL
));
return
_chdir
(
map_w32_filename
(
path
,
NULL
));
}
}
int
int
sys_chmod
(
const
char
*
path
,
int
mode
)
sys_chmod
(
const
char
*
path
,
int
mode
)
{
{
return
_chmod
(
map_w
in
32_filename
(
path
,
NULL
),
mode
);
return
_chmod
(
map_w32_filename
(
path
,
NULL
),
mode
);
}
}
int
int
sys_creat
(
const
char
*
path
,
int
mode
)
sys_creat
(
const
char
*
path
,
int
mode
)
{
{
return
_creat
(
map_w
in
32_filename
(
path
,
NULL
),
mode
);
return
_creat
(
map_w32_filename
(
path
,
NULL
),
mode
);
}
}
FILE
*
FILE
*
...
@@ -980,7 +980,7 @@ sys_fopen(const char * path, const char * mode)
...
@@ -980,7 +980,7 @@ sys_fopen(const char * path, const char * mode)
}
}
else
break
;
else
break
;
fd
=
_open
(
map_w
in
32_filename
(
path
,
NULL
),
oflag
|
_O_NOINHERIT
,
0644
);
fd
=
_open
(
map_w32_filename
(
path
,
NULL
),
oflag
|
_O_NOINHERIT
,
0644
);
if
(
fd
<
0
)
if
(
fd
<
0
)
return
NULL
;
return
NULL
;
...
@@ -997,7 +997,7 @@ sys_link (const char * path1, const char * path2)
...
@@ -997,7 +997,7 @@ sys_link (const char * path1, const char * path2)
int
int
sys_mkdir
(
const
char
*
path
)
sys_mkdir
(
const
char
*
path
)
{
{
return
_mkdir
(
map_w
in
32_filename
(
path
,
NULL
));
return
_mkdir
(
map_w32_filename
(
path
,
NULL
));
}
}
/* Because of long name mapping issues, we need to implement this
/* Because of long name mapping issues, we need to implement this
...
@@ -1054,7 +1054,7 @@ int
...
@@ -1054,7 +1054,7 @@ int
sys_open
(
const
char
*
path
,
int
oflag
,
int
mode
)
sys_open
(
const
char
*
path
,
int
oflag
,
int
mode
)
{
{
/* Force all file handles to be non-inheritable. */
/* Force all file handles to be non-inheritable. */
return
_open
(
map_w
in
32_filename
(
path
,
NULL
),
oflag
|
_O_NOINHERIT
,
mode
);
return
_open
(
map_w32_filename
(
path
,
NULL
),
oflag
|
_O_NOINHERIT
,
mode
);
}
}
int
int
...
@@ -1076,7 +1076,7 @@ sys_rename (const char * oldname, const char * newname)
...
@@ -1076,7 +1076,7 @@ sys_rename (const char * oldname, const char * newname)
So, on Win95 we always rename through a temp name, and we make sure
So, on Win95 we always rename through a temp name, and we make sure
the temp name has a long extension to ensure correct renaming. */
the temp name has a long extension to ensure correct renaming. */
strcpy
(
temp
,
map_w
in
32_filename
(
oldname
,
NULL
));
strcpy
(
temp
,
map_w32_filename
(
oldname
,
NULL
));
if
(
GetVersion
()
&
0x80000000
)
if
(
GetVersion
()
&
0x80000000
)
{
{
...
@@ -1091,7 +1091,7 @@ sys_rename (const char * oldname, const char * newname)
...
@@ -1091,7 +1091,7 @@ sys_rename (const char * oldname, const char * newname)
/* Force temp name to require a manufactured 8.3 alias - this
/* Force temp name to require a manufactured 8.3 alias - this
seems to make the second rename work properly. */
seems to make the second rename work properly. */
strcat
(
temp
,
".long"
);
strcat
(
temp
,
".long"
);
if
(
rename
(
map_w
in
32_filename
(
oldname
,
NULL
),
temp
)
<
0
)
if
(
rename
(
map_w32_filename
(
oldname
,
NULL
),
temp
)
<
0
)
return
-
1
;
return
-
1
;
}
}
...
@@ -1099,7 +1099,7 @@ sys_rename (const char * oldname, const char * newname)
...
@@ -1099,7 +1099,7 @@ sys_rename (const char * oldname, const char * newname)
(at least if it is a file; don't do this for directories).
(at least if it is a file; don't do this for directories).
However, don't do this if we are just changing the case of the file
However, don't do this if we are just changing the case of the file
name - we will end up deleting the file we are trying to rename! */
name - we will end up deleting the file we are trying to rename! */
newname
=
map_w
in
32_filename
(
newname
,
NULL
);
newname
=
map_w32_filename
(
newname
,
NULL
);
if
(
stricmp
(
newname
,
temp
)
!=
0
if
(
stricmp
(
newname
,
temp
)
!=
0
&&
(
attr
=
GetFileAttributes
(
newname
))
!=
-
1
&&
(
attr
=
GetFileAttributes
(
newname
))
!=
-
1
&&
(
attr
&
FILE_ATTRIBUTE_DIRECTORY
)
==
0
)
&&
(
attr
&
FILE_ATTRIBUTE_DIRECTORY
)
==
0
)
...
@@ -1114,13 +1114,13 @@ sys_rename (const char * oldname, const char * newname)
...
@@ -1114,13 +1114,13 @@ sys_rename (const char * oldname, const char * newname)
int
int
sys_rmdir
(
const
char
*
path
)
sys_rmdir
(
const
char
*
path
)
{
{
return
_rmdir
(
map_w
in
32_filename
(
path
,
NULL
));
return
_rmdir
(
map_w32_filename
(
path
,
NULL
));
}
}
int
int
sys_unlink
(
const
char
*
path
)
sys_unlink
(
const
char
*
path
)
{
{
return
_unlink
(
map_w
in
32_filename
(
path
,
NULL
));
return
_unlink
(
map_w32_filename
(
path
,
NULL
));
}
}
static
FILETIME
utc_base_ft
;
static
FILETIME
utc_base_ft
;
...
@@ -1218,7 +1218,7 @@ generate_inode_val (const char * name)
...
@@ -1218,7 +1218,7 @@ generate_inode_val (const char * name)
GetFullPathName
(
name
,
sizeof
(
fullname
),
fullname
,
&
p
);
GetFullPathName
(
name
,
sizeof
(
fullname
),
fullname
,
&
p
);
get_volume_info
(
fullname
,
&
p
);
get_volume_info
(
fullname
,
&
p
);
/* Normal W
in
32 filesystems are still case insensitive. */
/* Normal W32 filesystems are still case insensitive. */
_strlwr
(
p
);
_strlwr
(
p
);
hash
=
hashval
(
p
);
hash
=
hashval
(
p
);
return
(
_ino_t
)
(
hash
^
(
hash
>>
16
));
return
(
_ino_t
)
(
hash
^
(
hash
>>
16
));
...
@@ -1243,7 +1243,7 @@ stat (const char * path, struct stat * buf)
...
@@ -1243,7 +1243,7 @@ stat (const char * path, struct stat * buf)
return
-
1
;
return
-
1
;
}
}
name
=
(
char
*
)
map_w
in
32_filename
(
path
,
&
path
);
name
=
(
char
*
)
map_w32_filename
(
path
,
&
path
);
/* must be valid filename, no wild cards */
/* must be valid filename, no wild cards */
if
(
strchr
(
name
,
'*'
)
||
strchr
(
name
,
'?'
))
if
(
strchr
(
name
,
'*'
)
||
strchr
(
name
,
'?'
))
{
{
...
@@ -1340,7 +1340,7 @@ stat (const char * path, struct stat * buf)
...
@@ -1340,7 +1340,7 @@ stat (const char * path, struct stat * buf)
buf
->
st_uid
=
the_passwd
.
pw_uid
;
buf
->
st_uid
=
the_passwd
.
pw_uid
;
buf
->
st_gid
=
the_passwd
.
pw_gid
;
buf
->
st_gid
=
the_passwd
.
pw_gid
;
/* volume_info is set indirectly by map_w
in
32_filename */
/* volume_info is set indirectly by map_w32_filename */
buf
->
st_dev
=
volume_info
.
serialnum
;
buf
->
st_dev
=
volume_info
.
serialnum
;
buf
->
st_rdev
=
volume_info
.
serialnum
;
buf
->
st_rdev
=
volume_info
.
serialnum
;
...
@@ -1932,7 +1932,7 @@ sys_pipe (int * phandles)
...
@@ -1932,7 +1932,7 @@ sys_pipe (int * phandles)
}
}
/* From ntproc.c */
/* From ntproc.c */
extern
Lisp_Object
Vw
in
32_pipe_read_delay
;
extern
Lisp_Object
Vw32_pipe_read_delay
;
/* Function to do blocking read of one byte, needed to implement
/* Function to do blocking read of one byte, needed to implement
select. It is only allowed on sockets and pipes. */
select. It is only allowed on sockets and pipes. */
...
@@ -1969,11 +1969,11 @@ _sys_read_ahead (int fd)
...
@@ -1969,11 +1969,11 @@ _sys_read_ahead (int fd)
connects DOS programs to pipes by making the pipe appear to be
connects DOS programs to pipes by making the pipe appear to be
the normal console stdout - as a result most DOS programs will
the normal console stdout - as a result most DOS programs will
write to stdout without buffering, ie. one character at a
write to stdout without buffering, ie. one character at a
time. Even some W
in
32 programs do this - "dir" in a command
time. Even some W32 programs do this - "dir" in a command
shell on NT is very slow if we don't do this. */
shell on NT is very slow if we don't do this. */
if
(
rc
>
0
)
if
(
rc
>
0
)
{
{
int
wait
=
XINT
(
Vw
in
32_pipe_read_delay
);
int
wait
=
XINT
(
Vw32_pipe_read_delay
);