summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2018-02-09 14:39:42 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2018-02-09 14:39:42 +0000
commit52ae3582a2c7bb437df33c0a30bfd5a01d6c5282 (patch)
tree4f532a97ab0a6a1c2f96454290bc8803ee022f1f /src
parent30dad6a4aa2b94fe91783160c86abc75f9dc9e23 (diff)
Replace "WIN32" with "_WIN32" or "Windows".
Replace compiler/preprocessor/platform macro "WIN32" with "_WIN32". Replace "WIN32" in text and documentation with "Windows". Replace "MSWindows" with "Windows". To do: README.Windows.txt (and maybe other documentation as well) needs updates. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12655 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl.cxx4
-rw-r--r--src/Fl_File_Chooser2.cxx86
-rw-r--r--src/Fl_Gl_Overlay.cxx4
-rw-r--r--src/Fl_Graphics_Driver.cxx4
-rw-r--r--src/Fl_JPEG_Image.cxx4
-rw-r--r--src/Fl_Table.cxx6
-rw-r--r--src/Fl_Text_Editor.cxx7
-rw-r--r--src/Fl_Window.cxx6
-rw-r--r--src/Fl_Window_Driver.cxx2
-rw-r--r--src/Fl_arg.cxx8
-rw-r--r--src/Fl_get_key_win32.cxx8
-rw-r--r--src/Fl_grab.cxx4
-rw-r--r--src/Fl_win32.cxx32
-rw-r--r--src/Makefile4
-rw-r--r--src/config_lib.h10
-rw-r--r--src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H4
-rw-r--r--src/drivers/Darwin/Fl_Darwin_System_Driver.cxx2
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver.H19
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx4
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver_font.cxx28
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx4
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx2
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver_vertex.cxx2
-rw-r--r--src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_color.cxx6
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_Printer_Driver.cxx10
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H4
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx4
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_System_Driver.H7
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx10
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_Window_Driver.H6
-rw-r--r--src/drivers/X11/Fl_X11_Window_Driver.H2
-rw-r--r--src/drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.cxx2
-rw-r--r--src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx2
-rw-r--r--src/filename_list.cxx54
-rw-r--r--src/fl_call_main.c12
-rw-r--r--src/fl_dnd_win32.cxx4
-rw-r--r--src/fl_encoding_latin1.cxx6
-rw-r--r--src/fl_encoding_mac_roman.cxx6
-rw-r--r--src/fl_overlay.cxx2
-rw-r--r--src/flstring.h6
-rw-r--r--src/forms_fselect.cxx2
-rw-r--r--src/forms_timer.cxx4
-rw-r--r--src/scandir_win32.c6
-rw-r--r--src/screen_xywh.cxx2
-rw-r--r--src/xutf8/lcUniConv/cp936ext.h6
45 files changed, 209 insertions, 208 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx
index d5d6fb8b7..efbf90986 100644
--- a/src/Fl.cxx
+++ b/src/Fl.cxx
@@ -101,12 +101,12 @@ bool Fl::cfg_win_win32 = 1;
bool Fl::cfg_win_win32 = 0;
#endif
-#ifdef FL_SYS_POSIX
+#ifdef FL_CFG_SYS_POSIX
bool Fl::cfg_sys_posix = 1;
#else
bool Fl::cfg_sys_posix = 0;
#endif
-#ifdef FL_SYS_WIN32
+#ifdef FL_CFG_SYS_WIN32
bool Fl::cfg_sys_win32 = 1;
#else
bool Fl::cfg_sys_win32 = 0;
diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx
index 94cbbfe63..eed1d670b 100644
--- a/src/Fl_File_Chooser2.cxx
+++ b/src/Fl_File_Chooser2.cxx
@@ -23,85 +23,85 @@
/** \class Fl_File_Chooser
The Fl_File_Chooser widget displays a standard file selection
dialog that supports various selection modes.
-
+
\image html Fl_File_Chooser.jpg
\image latex Fl_File_Chooser.jpg "Fl_File_Chooser" width=12cm
-
- The Fl_File_Chooser widget transmits UTF-8 encoded filenames to its user. It is
- recommended to open files that may have non-ASCII names with the fl_fopen() or
- fl_open() utility functions that handle these names in a cross-platform way
- (whereas the standard fopen()/open() functions fail on the MSWindows platform
- to open files with a non-ASCII name).
-
+
+ The Fl_File_Chooser widget transmits UTF-8 encoded filenames to its user. It is
+ recommended to open files that may have non-ASCII names with the fl_fopen() or
+ fl_open() utility functions that handle these names in a cross-platform way
+ (whereas the standard fopen()/open() functions fail on the Windows platform
+ to open files with a non-ASCII name).
+
The Fl_File_Chooser class also exports several static values
that may be used to localize or customize the appearance of all file chooser
dialogs:
<CENTER><TABLE BORDER="1">
<TR>
- <TH>Member</TH>
- <TH>Default value</TH>
+ <TH>Member</TH>
+ <TH>Default value</TH>
</TR>
<TR>
- <TD>add_favorites_label</TD>
- <TD>"Add to Favorites"</TD>
+ <TD>add_favorites_label</TD>
+ <TD>"Add to Favorites"</TD>
</TR>
<TR>
- <TD>all_files_label</TD>
- <TD>"All Files (*)"</TD>
+ <TD>all_files_label</TD>
+ <TD>"All Files (*)"</TD>
</TR>
<TR>
- <TD>custom_filter_label</TD>
- <TD>"Custom Filter"</TD>
+ <TD>custom_filter_label</TD>
+ <TD>"Custom Filter"</TD>
</TR>
<TR>
- <TD>existing_file_label</TD>
- <TD>"Please choose an existing file!"</TD>
+ <TD>existing_file_label</TD>
+ <TD>"Please choose an existing file!"</TD>
</TR>
<TR>
- <TD>favorites_label</TD>
- <TD>"Favorites"</TD>
+ <TD>favorites_label</TD>
+ <TD>"Favorites"</TD>
</TR>
<TR>
- <TD>filename_label</TD>
- <TD>"Filename:"</TD>
+ <TD>filename_label</TD>
+ <TD>"Filename:"</TD>
</TR>
<TR>
- <TD>filesystems_label</TD>
- <TD>"My Computer" (WIN32)<BR>
- "File Systems" (all others)</TD>
+ <TD>filesystems_label</TD>
+ <TD>"My Computer" (Windows)<BR>
+ "File Systems" (all others)</TD>
</TR>
- <TR>
+ <TR>
<TD>hidden_label</TD>
<TD>"Show hidden files:"</TD>
- </TR>
- <TR>
- <TD>manage_favorites_label</TD>
- <TD>"Manage Favorites"</TD>
</TR>
<TR>
- <TD>new_directory_label</TD>
- <TD>"New Directory?"</TD>
+ <TD>manage_favorites_label</TD>
+ <TD>"Manage Favorites"</TD>
</TR>
<TR>
- <TD>new_directory_tooltip</TD>
- <TD>"Create a new directory."</TD>
+ <TD>new_directory_label</TD>
+ <TD>"New Directory?"</TD>
</TR>
<TR>
- <TD>preview_label</TD>
- <TD>"Preview"</TD>
+ <TD>new_directory_tooltip</TD>
+ <TD>"Create a new directory."</TD>
</TR>
<TR>
- <TD>save_label</TD>
- <TD>"Save"</TD>
+ <TD>preview_label</TD>
+ <TD>"Preview"</TD>
</TR>
<TR>
- <TD>show_label</TD>
- <TD>"Show:"</TD>
+ <TD>save_label</TD>
+ <TD>"Save"</TD>
</TR>
- <TR>
- <TD>sort</TD>
- <TD>fl_numericsort</TD>
+ <TR>
+ <TD>show_label</TD>
+ <TD>"Show:"</TD>
+ </TR>
+ <TR>
+ <TD>sort</TD>
+ <TD>fl_numericsort</TD>
</TR>
</TABLE></CENTER>
diff --git a/src/Fl_Gl_Overlay.cxx b/src/Fl_Gl_Overlay.cxx
index 0c98ca707..161a51bb6 100644
--- a/src/Fl_Gl_Overlay.cxx
+++ b/src/Fl_Gl_Overlay.cxx
@@ -62,7 +62,7 @@ void Fl_Gl_Window::make_overlay_current() {
pGlWindowDriver->make_overlay_current();
}
-/** Hides the window if it is not this window, does nothing in WIN32. */
+/** Hides the window if it is not this window, does nothing in Windows. */
void Fl_Gl_Window::hide_overlay() {
pGlWindowDriver->hide_overlay();
}
@@ -211,7 +211,7 @@ void Fl_X11_Gl_Window_Driver::make_overlay(void *&current) {
#include "drivers/WinAPI/Fl_WinAPI_Window_Driver.H"
////////////////////////////////////////////////////////////////
-// WIN32 version:
+// Windows version:
void Fl_WinAPI_Gl_Window_Driver::hide_overlay(void *& overlay) {
#if HAVE_GL_OVERLAY
diff --git a/src/Fl_Graphics_Driver.cxx b/src/Fl_Graphics_Driver.cxx
index 05d609f14..d27bb3eaa 100644
--- a/src/Fl_Graphics_Driver.cxx
+++ b/src/Fl_Graphics_Driver.cxx
@@ -1,7 +1,7 @@
//
// "$Id$"
//
-// implementation of Fl_Graphics_Driver class for the Fast Light Tool Kit (FLTK).
+// Fl_Graphics_Driver class for the Fast Light Tool Kit (FLTK).
//
// Copyright 2010-2018 by Bill Spitzak and others.
//
@@ -89,7 +89,7 @@ void Fl_Graphics_Driver::copy_offscreen(int x, int y, int w, int h, Fl_Offscreen
fl_begin_offscreen(pixmap); // does nothing if pixmap was not created by fl_create_offscreen()
float s = 1;
if (current == Fl_Surface_Device::surface()) {// pixmap was not created by fl_create_offscreen()
- // happens, e.g., when drawing images under WIN32
+ // happens, e.g., when drawing images under Windows
surface = new Fl_Image_Surface(px_width, px_height, 0, pixmap);
Fl_Surface_Device::push_current(surface);
}
diff --git a/src/Fl_JPEG_Image.cxx b/src/Fl_JPEG_Image.cxx
index 8c8b762d1..384acd2a4 100644
--- a/src/Fl_JPEG_Image.cxx
+++ b/src/Fl_JPEG_Image.cxx
@@ -39,9 +39,9 @@
// updated header file for the INT32 data type; the following define
// from Shane Hill seems to be a usable workaround...
-#if defined(WIN32) && defined(__CYGWIN__)
+#if defined(__CYGWIN__)
# define XMD_H
-#endif // WIN32 && __CYGWIN__
+#endif // __CYGWIN__
extern "C"
diff --git a/src/Fl_Table.cxx b/src/Fl_Table.cxx
index 8ebc9044f..aea25a0b3 100644
--- a/src/Fl_Table.cxx
+++ b/src/Fl_Table.cxx
@@ -26,11 +26,11 @@
#include <string.h> // memcpy
#include <stdio.h> // fprintf
-#ifdef WIN32
+#ifdef _WIN32
#include <malloc.h> // WINDOWS: malloc/realloc
-#else /*WIN32*/
+#else /* _WIN32 */
#include <stdlib.h> // UNIX: malloc/realloc
-#endif /*WIN32*/
+#endif /* _WIN32 */
// An STL-ish vector without templates (private to Fl_Table)
diff --git a/src/Fl_Text_Editor.cxx b/src/Fl_Text_Editor.cxx
index f3167e232..ab2f30c51 100644
--- a/src/Fl_Text_Editor.cxx
+++ b/src/Fl_Text_Editor.cxx
@@ -1,7 +1,8 @@
//
// "$Id$"
//
-// Copyright 2001-2010 by Bill Spitzak and others.
+// Copyright 2001-2018 by Bill Spitzak and others.
+//
// Original code Copyright Mark Edel. Permission to distribute under
// the LGPL for the FLTK library granted by Mark Edel.
//
@@ -696,8 +697,8 @@ int Fl_Text_Editor::handle(int event) {
return 1;
case FL_ENTER:
-// MRS: WIN32 only? Need to test!
-// case FL_MOVE:
+// MRS: Windows only? Need to test!
+// case FL_MOVE:
show_cursor(mCursorOn);
return 1;
diff --git a/src/Fl_Window.cxx b/src/Fl_Window.cxx
index 7a2ae7270..dedbf525d 100644
--- a/src/Fl_Window.cxx
+++ b/src/Fl_Window.cxx
@@ -19,7 +19,7 @@
// The Fl_Window is a window in the fltk library.
// This is the system-independent portions. The huge amount of
// crap you need to do to communicate with X is in Fl_x.cxx, the
-// equivalent (but totally different) crap for MSWindows is in Fl_win32.cxx
+// equivalent (but totally different) crap for Windows is in Fl_win32.cxx
#include <config.h>
#include <FL/Fl.H>
@@ -597,10 +597,10 @@ int Fl_Window::handle(int ev)
<LI>\p dw and \p dh are size increments. The window will be constrained
to widths of minw + N * dw, where N is any non-negative integer.
If these are less or equal to 1 they are ignored (this is ignored
- on WIN32).</LI>
+ on Windows).</LI>
<LI>\p aspect is a flag that indicates that the window should preserve its
aspect ratio. This only works if both the maximum and minimum have
- the same aspect ratio (ignored on WIN32 and by many X window managers).
+ the same aspect ratio (ignored on Windows and by many X window managers).
</LI>
</UL>
diff --git a/src/Fl_Window_Driver.cxx b/src/Fl_Window_Driver.cxx
index 7a391e13f..f9cc27912 100644
--- a/src/Fl_Window_Driver.cxx
+++ b/src/Fl_Window_Driver.cxx
@@ -131,7 +131,7 @@ void Fl_Window_Driver::destroy_double_buffer() {
Platform details:
\li On the unix/linux platform, the SHAPE extension of the X server is required.
This function does control the shape of Fl_Gl_Window instances.
- \li On the MSWindows platform, this function does nothing with class Fl_Gl_Window.
+ \li On the Windows platform, this function does nothing with class Fl_Gl_Window.
\li On the Mac platform, OS version 10.4 or above is required.
An 8-bit shape-mask is used when \p img is an Fl_RGB_Image:
with depths 2 or 4, the image alpha channel becomes the shape mask such that areas with alpha = 0
diff --git a/src/Fl_arg.cxx b/src/Fl_arg.cxx
index ad2a47938..2712b72ae 100644
--- a/src/Fl_arg.cxx
+++ b/src/Fl_arg.cxx
@@ -3,7 +3,7 @@
//
// Optional argument initialization code for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2018 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -16,7 +16,7 @@
// http://www.fltk.org/str.php
//
-// OPTIONAL initialization code for a program using fltk.
+// OPTIONAL initialization code for a program using FLTK.
// You do not need to call this! Feel free to make up your own switches.
#include <FL/Fl.H>
@@ -69,7 +69,7 @@ extern const char *fl_bg2;
\li -display host:n.n
<br>
Sets the X display to use; this option is silently
- ignored under WIN32 and MacOS.
+ ignored under Windows and MacOS.
\li -dnd and -nodnd
<br>
@@ -292,7 +292,7 @@ void Fl_Window::show(int argc, char **argv) {
// if (mh > gh) gh = mh;
Fl_Widget *r = resizable();
if (!r) resizable(this);
- // for WIN32 we assume window is not mapped yet:
+ // for Windows we assume window is not mapped yet:
if (fl & (Fl_System_Driver::fl_XValue | Fl_System_Driver::fl_YValue))
x(-1), resize(gx,gy,gw,gh);
else
diff --git a/src/Fl_get_key_win32.cxx b/src/Fl_get_key_win32.cxx
index 66b27c7ae..fb6a49238 100644
--- a/src/Fl_get_key_win32.cxx
+++ b/src/Fl_get_key_win32.cxx
@@ -1,7 +1,7 @@
//
// "$Id$"
//
-// WIN32 keyboard state routines for the Fast Light Tool Kit (FLTK).
+// Windows keyboard state routines for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2018 by Bill Spitzak and others.
//
@@ -17,15 +17,15 @@
//
// Return the current state of a key. Keys are named by fltk symbols,
-// which are actually X keysyms. So this has to translate to MSWindows
+// which are actually X keysyms. So this has to translate to Windows
// VK_x symbols.
#include "drivers/WinAPI//Fl_WinAPI_System_Driver.H"
#include <FL/platform.H>
-// convert an Fltk (X) keysym to a MSWindows VK symbol:
+// Convert an FLTK (X) keysym to a Windows VK symbol:
// See also the inverse converter in Fl_win32.cxx
-// This table is in numeric order by Fltk symbol order for binary search:
+// This table is in numeric order by FLTK symbol order for binary search:
static const struct {unsigned short vk, fltk;} vktab[] = {
{VK_SPACE, ' '},
diff --git a/src/Fl_grab.cxx b/src/Fl_grab.cxx
index 5a33e4b7c..f7fc8c904 100644
--- a/src/Fl_grab.cxx
+++ b/src/Fl_grab.cxx
@@ -3,7 +3,7 @@
//
// Grab/release code for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2016 by Bill Spitzak and others.
+// Copyright 1998-2018 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -25,7 +25,7 @@
// have to be displayed (and in the case of Fl_Menu.cxx it isn't).
// The system is also told to "grab" events and send them to this app.
// This also modifies how Fl_Window::show() works, on X it turns on
-// override_redirect, it does similar things on WIN32.
+// override_redirect, it does similar things on Windows.
void Fl::grab(Fl_Window *win)
{
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx
index 0a8e399b9..24b0548fb 100644
--- a/src/Fl_win32.cxx
+++ b/src/Fl_win32.cxx
@@ -1,7 +1,7 @@
//
// "$Id$"
//
-// WIN32-specific code for the Fast Light Tool Kit (FLTK).
+// Windows-specific code for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2018 by Bill Spitzak and others.
//
@@ -16,11 +16,11 @@
// http://www.fltk.org/str.php
//
-// This file contains win32-specific code for fltk which is always linked
-// in. Search other files for "WIN32" or filenames ending in _win32.cxx
+// This file contains Windows-specific code for FLTK which is always linked
+// in. Search other files for "_WIN32" or filenames ending in _win32.cxx
// for other system-specific code.
-#if defined(WIN32) && !defined(FL_DOXYGEN)
+#if defined(_WIN32) && !defined(FL_DOXYGEN)
/* We require Windows 2000 features (e.g. VK definitions) */
# if !defined(WINVER) || (WINVER < 0x0500)
@@ -271,7 +271,7 @@ static Fl_Window *track_mouse_win = 0; // current TrackMouseEvent() window
// devices, or pipes...
//
// Microsoft provides the Berkeley select() call and an asynchronous
-// select function that sends a WIN32 message when the select condition
+// select function that sends a Windows message when the select condition
// exists. However, we don't try to use the asynchronous WSAAsyncSelect()
// any more for good reasons (see above).
//
@@ -399,7 +399,7 @@ double Fl_WinAPI_Screen_Driver::wait(double time_to_wait) {
}
if (nfds) {
- // For WIN32 we need to poll for socket input FIRST, since
+ // For Windows we need to poll for socket input FIRST, since
// the event queue is not something we can select() on...
timeval t;
t.tv_sec = 0;
@@ -560,7 +560,7 @@ class Fl_Win32_At_Exit {
public:
Fl_Win32_At_Exit() {}
~Fl_Win32_At_Exit() {
- fl_free_fonts(); // do some WIN32 cleanup
+ fl_free_fonts(); // do some Windows cleanup
fl_cleanup_pens();
OleUninitialize();
fl_brush_action(1);
@@ -1043,7 +1043,7 @@ static int mouse_event(Fl_Window *window, int what, int button,
case 3: // move:
default: // avoid compiler warning
- // MSWindows produces extra events even if mouse does not move, ignore em:
+ // Windows produces extra events even if the mouse does not move, ignore em:
if (Fl::e_x_root == pmx && Fl::e_y_root == pmy)
return 1;
pmx = Fl::e_x_root;
@@ -1054,7 +1054,7 @@ static int mouse_event(Fl_Window *window, int what, int button,
}
}
-// convert a MSWindows VK_x to an Fltk (X) Keysym:
+// Convert a Windows VK_x to an FLTK (X) Keysym:
// See also the inverse converter in Fl_get_key_win32.cxx
// This table is in numeric order by VK:
static const struct {
@@ -1216,7 +1216,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
redraw_whole_window = true;
}
- // We need to merge WIN32's damage into FLTK's damage.
+ // We need to merge Windows' damage into FLTK's damage.
R = CreateRectRgn(0, 0, 0, 0);
int r = GetUpdateRgn(hWnd, R, 0);
if (r == NULLREGION && !redraw_whole_window) {
@@ -1228,7 +1228,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
R2 = Fl_GDI_Graphics_Driver::scale_region(i->region, scale, NULL);
if (R2) {
- // Also tell WIN32 that we are drawing someplace else as well...
+ // Also tell Windows that we are drawing someplace else as well...
CombineRgn(R2, R2, R, RGN_OR);
DeleteObject(R);
} else {
@@ -1245,7 +1245,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
window->clear_damage((uchar)(window->damage() | FL_DAMAGE_EXPOSE));
// These next two statements should not be here, so that all update
- // is deferred until Fl::flush() is called during idle. However WIN32
+ // is deferred until Fl::flush() is called during idle. However Windows
// apparently is very unhappy if we don't obey it and draw right now.
// Very annoying!
fl_GetDC(hWnd); // Make sure we have a DC for this window...
@@ -1403,7 +1403,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
if (GetKeyState(VK_NUMLOCK))
state |= FL_NUM_LOCK;
if ((GetKeyState(VK_LWIN) | GetKeyState(VK_RWIN)) & ~1) {
- // WIN32 bug? GetKeyState returns garbage if the user hit the
+ // Windows bug? GetKeyState returns garbage if the user hit the
// meta key to pop up start menu. Sigh.
if ((GetAsyncKeyState(VK_LWIN) | GetAsyncKeyState(VK_RWIN)) & ~1)
state |= FL_META;
@@ -1677,7 +1677,7 @@ static int fake_X_wm_style(const Fl_Window *w, int &X, int &Y, int &bt, int &bx,
if (!style) {
HWND hwnd = fl_xid(w);
- // request the style flags of this window, as WIN32 sees them
+ // request the style flags of this window, as Windows sees them
style = GetWindowLong(hwnd, GWL_STYLE);
styleEx = GetWindowLong(hwnd, GWL_EXSTYLE);
}
@@ -2529,7 +2529,7 @@ fl_uintptr_t Fl_WinAPI_Window_Driver::current_cursor() {
// faster by using X's background pixel erasing. We can make it
// actually *be* faster by drawing the frame only, this is done by
// setting fl_boxcheat, which is seen by code in fl_drawbox.cxx:
-// For WIN32 it looks like all windows share a background color, so
+// For Windows it looks like all windows share a background color, so
// I use FL_GRAY for this and only do this cheat for windows that are
// that color.
// Actually it is totally disabled.
@@ -2810,7 +2810,7 @@ void preparePrintFront(void) {
}
#endif // USE_PRINT_BUTTON
-#endif // defined(WIN32) and !defined(FL_DOXYGEN)
+#endif // defined(_WIN32) and !defined(FL_DOXYGEN)
//
// End of "$Id$".
diff --git a/src/Makefile b/src/Makefile
index 9364320a7..bb9560463 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -3,7 +3,7 @@
#
# Library Makefile for the Fast Light Tool Kit (FLTK).
#
-# Copyright 1998-2017 by Bill Spitzak and others.
+# Copyright 1998-2018 by Bill Spitzak and others.
#
# This library is free software. Distribution and use rights are outlined in
# the file "COPYING" which should have been included with this file. If this
@@ -612,7 +612,7 @@ depend: $(CPPFILES) $(MMFILES) $(FLCPPFILES) $(GLCPPFILES) $(IMGCPPFILES) $(CFIL
include makedepend
# These dependencies aren't part of the makedepend file since
-# they are part of the WIN32 and MacOS code base...
+# they are part of the Windows and MacOS code base...
# Please add only non-Linux/Unix files or such that are optional
# (like "*xft*") here:
Fl_get_key_mac.o: Fl_get_key_mac.cxx
diff --git a/src/config_lib.h b/src/config_lib.h
index 0fd18a322..bef665b71 100644
--- a/src/config_lib.h
+++ b/src/config_lib.h
@@ -3,7 +3,7 @@
*
* Configuration file for the Fast Light Tool Kit (FLTK).
*
- * Copyright 1998-2016 by Bill Spitzak and others.
+ * Copyright 1998-2018 by Bill Spitzak and others.
*/
#ifndef FL_CONFIG_LIB_H
@@ -20,7 +20,7 @@
# ifdef HAVE_GL
# define FL_CFG_GFX_OPENGL
# endif
-#elif defined(WIN32)
+#elif defined(_WIN32)
# define FL_CFG_GFX_GDI
# ifdef HAVE_GL
# define FL_CFG_GFX_OPENGL
@@ -42,7 +42,7 @@
#ifdef __APPLE__ /* default configurations */
# define FL_CFG_PRN_QUARTZ
-#elif defined(WIN32)
+#elif defined(_WIN32)
# define FL_CFG_PRN_WIN32
#elif defined(FL_PORTING)
# pragma message "FL_PORTING: please choose a printer driver"
@@ -58,7 +58,7 @@
#ifdef __APPLE__ /* default configurations */
# define FL_CFG_WIN_COCOA
-#elif defined(WIN32)
+#elif defined(_WIN32)
# define FL_CFG_WIN_WIN32
#elif defined(FL_PORTING)
# pragma message "FL_PORTING: please choose a window management library"
@@ -74,7 +74,7 @@
#ifdef __APPLE__ /* default configurations */
# define FL_CFG_SYS_POSIX
-#elif defined(WIN32)
+#elif defined(_WIN32)
# define FL_CFG_SYS_WIN32
#elif defined(FL_PORTING)
# pragma message "FL_PORTING: please choose a system library"
diff --git a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H
index ef64799c9..f9631198e 100644
--- a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H
+++ b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H
@@ -4,7 +4,7 @@
// Definition of Apple Cocoa window driver
// for the Fast Light Tool Kit (FLTK).
//
-// Copyright 2010-2016 by Bill Spitzak and others.
+// Copyright 2010-2018 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -52,7 +52,7 @@ class FLWindow;
- window types and styles, depth, etc.
- decorations
- ? where do we handle the interface between OpenGL/DirectX and Cocoa/WIN32/Glx?
+ ? where do we handle the interface between OpenGL/DirectX and Cocoa/Windows/Glx?
*/
struct Fl_Window_Driver::shape_data_type {
Fl_Image* shape_; ///< shape image
diff --git a/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx b/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx
index ddcf5b812..1662f6847 100644
--- a/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx
+++ b/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx
@@ -205,7 +205,7 @@ char *Fl_Darwin_System_Driver::preference_rootnode(Fl_Preferences *prefs, Fl_Pre
{
static char filename[ FL_PATH_MAX ];
// TODO: verify that this is the Apple sanctioned way of finding these folders
- // (On MSWindows, this frequently leads to issues with internationalized systems)
+ // (On Windows, this frequently leads to issues with internationalized systems)
// Carbon: err = FindFolder( kLocalDomain, kPreferencesFolderType, 1, &spec.vRefNum, &spec.parID );
switch (root) {
case Fl_Preferences::SYSTEM:
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver.H b/src/drivers/GDI/Fl_GDI_Graphics_Driver.H
index 8de2a9a1d..1ab61722b 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver.H
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver.H
@@ -19,7 +19,7 @@
/**
\file Fl_GDI_Graphics_Driver.H
- \brief Definition of MSWindows GDI graphics driver.
+ \brief Definition of Windows GDI graphics driver.
*/
#ifndef FL_GDI_GRAPHICS_DRIVER_H
@@ -30,10 +30,10 @@
/**
- \brief The MSWindows-specific graphics class.
- *
- This class is implemented only on the MSWindows platform.
- */
+ \brief The Windows-specific graphics driver class.
+
+ This class is implemented only on the Windows platform.
+*/
class FL_EXPORT Fl_GDI_Graphics_Driver : public Fl_Scalable_Graphics_Driver {
private:
BOOL alpha_blend_(int x, int y, int w, int h, HDC src_gc, int srcx, int srcy, int srcw, int srch);
@@ -151,10 +151,11 @@ protected:
/**
- The graphics driver used when printing on MSWindows.
- *
- This class is implemented only on the MSWindows platform. It 's extremely similar to Fl_GDI_Graphics_Driver.
- */
+ The graphics driver used when printing on Windows.
+
+ This class is implemented only on the Windows platform.
+ It is extremely similar to Fl_GDI_Graphics_Driver.
+*/
class FL_EXPORT Fl_GDI_Printer_Graphics_Driver : public Fl_GDI_Graphics_Driver {
private:
typedef BOOL (WINAPI* transparent_f_type) (HDC,int,int,int,int,HDC,int,int,int,int,UINT);
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx
index 4a49db6d5..e4088b0c0 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx
@@ -25,7 +25,7 @@
/*
* By linking this module, the following static method will instantiate the
- * MSWindows GDI Graphics driver as the main display driver.
+ * Windows GDI Graphics driver as the main display driver.
*/
Fl_Graphics_Driver *Fl_Graphics_Driver::newMainGraphicsDriver()
{
@@ -53,7 +53,7 @@ void Fl_GDI_Graphics_Driver::global_gc()
}
/*
- * This function checks if the version of MSWindows that we
+ * This function checks if the version of Windows that we
* curently run on supports alpha blending for bitmap transfers
* and finds the required function if so.
*/
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_font.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_font.cxx
index c9d74e59e..7127682cc 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_font.cxx
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_font.cxx
@@ -1,7 +1,7 @@
//
// "$Id$"
//
-// WIN32 font utilities for the Fast Light Tool Kit (FLTK).
+// Windows font utilities for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2018 by Bill Spitzak and others.
//
@@ -16,23 +16,21 @@
// http://www.fltk.org/str.php
//
-#ifdef WIN32
-# ifndef WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
-# endif
+#ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+#endif
/* We require Windows 2000 features such as GetGlyphIndices */
-# if !defined(WINVER) || (WINVER < 0x0500)
-# ifdef WINVER
-# undef WINVER
-# endif
-# define WINVER 0x0500
+#if !defined(WINVER) || (WINVER < 0x0500)
+# ifdef WINVER
+# undef WINVER
# endif
-# if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0500)
-# ifdef _WIN32_WINNT
-# undef _WIN32_WINNT
-# endif
-# define _WIN32_WINNT 0x0500
+# define WINVER 0x0500
+#endif
+#if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0500)
+# ifdef _WIN32_WINNT
+# undef _WIN32_WINNT
# endif
+# define _WIN32_WINNT 0x0500
#endif
// Select fonts from the FLTK font table.
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx
index 63dded34d..31d308464 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx
@@ -1,7 +1,7 @@
//
// "$Id$"
//
-// WIN32 image drawing code for the Fast Light Tool Kit (FLTK).
+// Windows image drawing code for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2018 by Bill Spitzak and others.
//
@@ -414,7 +414,7 @@ void Fl_GDI_Graphics_Driver::draw_unscaled(Fl_Bitmap *bm, float s, int XP, int Y
int save = SaveDC(tempdc);
SelectObject(tempdc, (HGDIOBJ)*Fl_Graphics_Driver::id(bm));
SelectObject(gc_, fl_brush());
- // secret bitblt code found in old MSWindows reference manual:
+ // secret bitblt code found in old Windows reference manual:
BitBlt(gc_, X, Y, W, H, tempdc, cx, cy, 0xE20746L);
RestoreDC(tempdc, save);
DeleteDC(tempdc);
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx
index d347cc6a8..0dbb674f0 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx
@@ -19,7 +19,7 @@
/**
\file Fl_GDI_Graphics_Driver_rect.cxx
- \brief MSWindows GDI specific line and polygon drawing with integer coordinates.
+ \brief Windows GDI specific line and polygon drawing with integer coordinates.
*/
#include <config.h>
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_vertex.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_vertex.cxx
index b8ee81d65..caace8b39 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_vertex.cxx
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_vertex.cxx
@@ -20,7 +20,7 @@
\file Fl_GDI_Graphics_Driver_vertex.cxx
\brief Portable drawing code for drawing arbitrary shapes with
- simple 2D transformations, implemented for MSWindows GDI.
+ simple 2D transformations, implemented for Windows GDI.
*/
#include "Fl_GDI_Graphics_Driver.H"
diff --git a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_color.cxx b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_color.cxx
index 193f766cb..f6586aa85 100644
--- a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_color.cxx
+++ b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_color.cxx
@@ -3,7 +3,7 @@
//
// Color functions for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2016 by Bill Spitzak and others.
+// Copyright 1998-2018 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -21,8 +21,8 @@
\brief Color handling
*/
-#include <config.h>
#include "../../config_lib.h"
+// #include <config.h>
#include "Fl_OpenGL_Graphics_Driver.H"
#include <FL/gl.h>
#include <FL/Fl_Gl_Window.H>
@@ -37,7 +37,7 @@ void Fl_OpenGL_Graphics_Driver::color(Fl_Color i) {
// FIXME: do we need the code below?
/*
#if HAVE_GL_OVERLAY
-#if defined(WIN32)
+#if defined(_WIN32)
if (fl_overlay && fl_overlay_depth) {
if (fl_overlay_depth < 8) {
// only black & white produce the expected colors. This could
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Printer_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Printer_Driver.cxx
index 2c318d0b4..7492074a7 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_Printer_Driver.cxx
+++ b/src/drivers/WinAPI/Fl_WinAPI_Printer_Driver.cxx
@@ -1,9 +1,9 @@
//
// "$Id$"
//
-// Support for WIN32 printing for the Fast Light Tool Kit (FLTK).
+// Printing support for Windows for the Fast Light Tool Kit (FLTK).
//
-// Copyright 2010-2016 by Bill Spitzak and others.
+// Copyright 2010-2018 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -16,7 +16,7 @@
// http://www.fltk.org/str.php
//
-#ifdef WIN32
+#ifdef _WIN32
#include "../GDI/Fl_GDI_Graphics_Driver.H"
#include <FL/Fl_Printer.H>
@@ -27,7 +27,7 @@
extern HWND fl_window;
-/** Support for printing on the MSWindows platform */
+/** Support for printing on the Windows platform */
class Fl_WinAPI_Printer_Driver : public Fl_Paged_Device {
friend class Fl_Paged_Device;
private:
@@ -318,7 +318,7 @@ void Fl_WinAPI_Printer_Driver::origin(int *x, int *y)
Fl_Paged_Device::origin(x, y);
}
-#endif // WIN32
+#endif // _WIN32
//
// End of "$Id$".
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H
index b5d238ba9..d6dfaf889 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H
+++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H
@@ -1,7 +1,7 @@
//
// "$Id$"
//
-// Definition of MSWindows Win32/64 Screen interface
+// Definition of Windows screen interface
// for the Fast Light Tool Kit (FLTK).
//
// Copyright 2010-2018 by Bill Spitzak and others.
@@ -19,7 +19,7 @@
/**
\file Fl_WinAPI_Screen_Driver.H
- \brief Definition of MSWindows Win32/64 Screen interface.
+ \brief Definition of Windows screen interface.
*/
#ifndef FL_WINAPI_SCREEN_DRIVER_H
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
index f44fa7a3c..4521038f0 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
+++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
@@ -1,7 +1,7 @@
//
// "$Id$"
//
-// Definition of MSWindows Win32/64 Screen interface
+// Windows screen interface for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2018 by Bill Spitzak and others.
//
@@ -275,7 +275,7 @@ void Fl_WinAPI_Screen_Driver::flush()
extern void fl_fix_focus(); // in Fl.cxx
// We have to keep track of whether we have captured the mouse, since
-// MSWindows shows little respect for this... Grep for fl_capture to
+// Windows shows little respect for this... Grep for fl_capture to
// see where and how this is used.
extern HWND fl_capture;
diff --git a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H
index 0f376a00a..0fe23cfda 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H
+++ b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H
@@ -1,10 +1,9 @@
//
// "$Id$"
//
-// Definition of MSWindows system driver
-// for the Fast Light Tool Kit (FLTK).
+// Definition of Windows system driver for the Fast Light Tool Kit (FLTK).
//
-// Copyright 2010-2017 by Bill Spitzak and others.
+// Copyright 2010-2018 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -19,7 +18,7 @@
/**
\file Fl_WinAPI_System_Driver.H
- \brief Definition of MSWindows system driver.
+ \brief Definition of Windows system driver.
*/
#ifndef FL_WINAPI_SYSTEM_DRIVER_H
diff --git a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx
index 26a41bd61..f2b56e0e0 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx
+++ b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx
@@ -3,7 +3,7 @@
//
// Definition of Apple Darwin system driver.
//
-// Copyright 1998-2017 by Bill Spitzak and others.
+// Copyright 1998-2018 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -155,7 +155,7 @@ Fl_System_Driver *Fl_System_Driver::newSystemDriver()
}
void Fl_WinAPI_System_Driver::warning(const char *format, va_list args) {
- // Show nothing for warnings under WIN32...
+ // Show nothing for warnings under Windows...
}
void Fl_WinAPI_System_Driver::error(const char *format, va_list args) {
@@ -308,7 +308,7 @@ int Fl_WinAPI_System_Driver::rename(const char *fnam, const char *newnam) {
return _wrename(wbuf, wbuf1);
}
-// Two WIN32-specific functions fl_utf8_to_locale() and fl_locale_to_utf8()
+// Two Windows-specific functions fl_utf8_to_locale() and fl_locale_to_utf8()
// from file fl_utf8.cxx are put here for API compatibility
static char *buf = NULL;
@@ -721,7 +721,7 @@ int Fl_WinAPI_System_Driver::file_browser_load_filesystem(Fl_File_Browser *brows
endmntent(m);
# else
//
- // Normal WIN32 code uses drive bits...
+ // Normal Windows code uses drive bits...
//
DWORD drives; // Drive available bits
drives = GetLogicalDrives();
@@ -729,7 +729,7 @@ int Fl_WinAPI_System_Driver::file_browser_load_filesystem(Fl_File_Browser *brows
if (drives & 1)
{
sprintf(filename, "%c:/", i);
- if (i < 'C') // see also: GetDriveType and GetVolumeInformation in WIN32
+ if (i < 'C') // see also: GetDriveType and GetVolumeInformation in Windows
browser->add(filename, icon);
else
browser->add(filename, icon);
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.H b/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.H
index 576d42736..7e67f2355 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.H
+++ b/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.H
@@ -4,7 +4,7 @@
// Definition of Apple Cocoa window driver
// for the Fast Light Tool Kit (FLTK).
//
-// Copyright 2010-2016 by Bill Spitzak and others.
+// Copyright 2010-2018 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -19,7 +19,7 @@
/**
\file Fl_WinAPI_Window_Driver.H
- \brief Definition of MSWindows window driver.
+ \brief Definition of Windows window driver.
*/
#ifndef FL_WINAPI_WINDOW_DRIVER_H
@@ -40,7 +40,7 @@
- window types and styles, depth, etc.
- decorations
- ? where do we handle the interface between OpenGL/DirectX and Cocoa/WIN32/Glx?
+ ? where do we handle the interface between OpenGL/DirectX and Cocoa/Windows/Glx?
*/
diff --git a/src/drivers/X11/Fl_X11_Window_Driver.H b/src/drivers/X11/Fl_X11_Window_Driver.H
index ad1c29c3d..c84949e3b 100644
--- a/src/drivers/X11/Fl_X11_Window_Driver.H
+++ b/src/drivers/X11/Fl_X11_Window_Driver.H
@@ -42,7 +42,7 @@ class Fl_Bitmap;
- window types and styles, depth, etc.
- decorations
- ? where do we handle the interface between OpenGL/DirectX and Cocoa/WIN32/Glx?
+ ? where do we handle the interface between OpenGL/DirectX and Cocoa/Windows/Glx?
*/
diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.cxx
index 34ae4bd38..da88cc00e 100644
--- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.cxx
+++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.cxx
@@ -32,7 +32,7 @@
void Fl_Xlib_Graphics_Driver::line_style_unscaled(int style, float width, char* dashes) {
int ndashes = dashes ? strlen(dashes) : 0;
- // emulate the WIN32 dash patterns on X
+ // emulate the Windows dash patterns on X
char buf[7];
if (!ndashes && (style&0xff)) {
int w = width ? width : 1;
diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx
index 954b36b60..10d6f4875 100644
--- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx
+++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx
@@ -142,7 +142,7 @@ int Fl_Xlib_Graphics_Driver::clip_x (int x) {
}
// Missing X call: (is this the fastest way to init a 1-rectangle region?)
-// MSWindows equivalent exists, implemented inline in win32.H
+// Windows equivalent exists, implemented inline in win32.H
Fl_Region Fl_Xlib_Graphics_Driver::XRectangleRegion(int x, int y, int w, int h) {
XRectangle R;
clip_to_short(x, y, w, h, line_width_);
diff --git a/src/filename_list.cxx b/src/filename_list.cxx
index cd1f1d4df..262b79974 100644
--- a/src/filename_list.cxx
+++ b/src/filename_list.cxx
@@ -3,7 +3,7 @@
//
// Filename list routines for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2018 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -36,33 +36,35 @@ int fl_casealphasort(struct dirent **a, struct dirent **b) {
/**
- Portable and const-correct wrapper for the scandir() function.
- For each file in that directory a "dirent" structure is created.
- The only portable thing about a dirent is that dirent.d_name is the nul-terminated file name.
- An pointers array to these dirent's is created and a pointer to the array is returned in *list.
- The number of entries is given as a return value.
- If there is an error reading the directory a number less than zero is returned,
- and errno has the reason; errno does not work under WIN32.
+ Portable and const-correct wrapper for the scandir() function.
- \b Include:
- \code
- #include <FL/filename.H>
- \endcode
+ For each file in that directory a "dirent" structure is created.
+ The only portable thing about a dirent is that dirent.d_name is the
+ nul-terminated file name. A pointers array to these dirent's is created
+ and a pointer to the array is returned in *list.
+ The number of entries is given as a return value.
+ If there is an error reading the directory a number less than zero is
+ returned, and errno has the reason; errno does not work under Windows.
- \param[in] d the name of the directory to list. It does not matter if it has a trailing slash.
- \param[out] list table containing the resulting directory listing
- \param[in] sort sorting functor:
- - fl_alphasort: The files are sorted in ascending alphabetical order;
- upper and lowercase letters are compared according to their ASCII ordering uppercase before lowercase.
- - fl_casealphasort: The files are sorted in ascending alphabetical order;
- upper and lowercase letters are compared equally case is not significant.
- - fl_casenumericsort: The files are sorted in ascending "alphanumeric" order, where an attempt is made
- to put unpadded numbers in consecutive order; upper and lowercase letters
- are compared equally case is not significant.
- - fl_numericsort: The files are sorted in ascending "alphanumeric" order, where an attempt is made
- to put unpadded numbers in consecutive order; upper and lowercase letters are compared
- according to their ASCII ordering - uppercase before lowercase.
- \return the number of entries if no error, a negative value otherwise.
+ \b Include:
+ \code
+ #include <FL/filename.H>
+ \endcode
+
+ \param[in] d the name of the directory to list. It does not matter if it has a trailing slash.
+ \param[out] list table containing the resulting directory listing
+ \param[in] sort sorting functor:
+ - fl_alphasort: The files are sorted in ascending alphabetical order;
+ upper and lowercase letters are compared according to their ASCII ordering uppercase before lowercase.
+ - fl_casealphasort: The files are sorted in ascending alphabetical order;
+ upper and lowercase letters are compared equally case is not significant.
+ - fl_casenumericsort: The files are sorted in ascending "alphanumeric" order, where an attempt is made
+ to put unpadded numbers in consecutive order; upper and lowercase letters
+ are compared equally case is not significant.
+ - fl_numericsort: The files are sorted in ascending "alphanumeric" order, where an attempt is made
+ to put unpadded numbers in consecutive order; upper and lowercase letters are compared
+ according to their ASCII ordering - uppercase before lowercase.
+ \return the number of entries if no error, a negative value otherwise.
*/
int fl_filename_list(const char *d, dirent ***list, Fl_File_Sort_F *sort) {
return Fl::system_driver()->filename_list(d, list, sort);
diff --git a/src/fl_call_main.c b/src/fl_call_main.c
index 2f8e6b0d5..6fa541a55 100644
--- a/src/fl_call_main.c
+++ b/src/fl_call_main.c
@@ -1,7 +1,7 @@
/*
* "$Id$"
*
- * Copyright 1998-2016 by Bill Spitzak and others.
+ * Copyright 1998-2018 by Bill Spitzak and others.
*
* fl_call_main() calls main() for you Windows people. Needs to be done in C
* because Borland C++ won't let you call main() from C++.
@@ -21,7 +21,7 @@
* This WinMain() function can be overridden by an application and
* is provided for compatibility with programs written for other
* operating systems that conform to the ANSI standard entry point
- * "main()". This will allow you to build a WIN32 Application
+ * "main()". This will allow you to build a Windows Application
* without any special settings.
*
* Because of problems with the Microsoft Visual C++ header files
@@ -37,13 +37,13 @@
* Microsoft(r) Windows(r) that allows for it.
*/
-#if defined(WIN32) || defined(__APPLE__) /* PORTME: Fl_System_Driver - platform main() */
+#if defined(_WIN32) || defined(__APPLE__) /* PORTME: Fl_System_Driver - platform main() */
#elif defined(FL_PORTING)
# pragma message "FL_PORTING: implement 'main()' here if your platform provides another app entry point"
#else
#endif
-#if defined(WIN32) && !defined(FL_DLL) && !defined (__GNUC__)
+#if defined(_WIN32) && !defined(FL_DLL) && !defined (__GNUC__)
# include <windows.h>
# include <stdio.h>
@@ -85,7 +85,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
*
* While we can detect if the program was run from the command-line -
* look at the CMDLINE environment variable, it will be "WIN" for
- * programs started from the GUI - the shell seems to run all WIN32
+ * programs started from the GUI - the shell seems to run all Windows
* applications in the background anyways...
*/
@@ -132,7 +132,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
#else
/* STR# 2973: solves "empty translation unit" error (Sun, HP-UX..) */
typedef int dummy;
-#endif /* WIN32 && !FL_DLL && !__GNUC__ */
+#endif /* _WIN32 && !FL_DLL && !__GNUC__ */
/*
* End of "$Id$".
diff --git a/src/fl_dnd_win32.cxx b/src/fl_dnd_win32.cxx
index 0c625c1d0..f6d68676e 100644
--- a/src/fl_dnd_win32.cxx
+++ b/src/fl_dnd_win32.cxx
@@ -16,8 +16,8 @@
// http://www.fltk.org/str.php
//
-// This file contains win32-specific code for fltk which is always linked
-// in. Search other files for "WIN32" or filenames ending in _win32.cxx
+// This file contains Windows-specific code for FLTK which is always linked
+// in. Search other files for "_WIN32" or filenames ending in _win32.cxx
// for other system-specific code.
#include <FL/Fl.H>
diff --git a/src/fl_encoding_latin1.cxx b/src/fl_encoding_latin1.cxx
index c7995aac7..10b899f92 100644
--- a/src/fl_encoding_latin1.cxx
+++ b/src/fl_encoding_latin1.cxx
@@ -1,7 +1,7 @@
//
// "$Id$"
//
-// Convert MSWindows-1252 (Latin-1) encoded text to the local encoding.
+// Convert Windows-1252 (Latin-1) encoded text to the local encoding.
//
// Copyright 1998-2016 by Bill Spitzak and others.
//
@@ -44,7 +44,7 @@
// lookup tables below will convert all common character codes and replace
// unknown characters with an upsidedown question mark.
-// This table converts MSWindows-1252/Latin 1 into MacRoman encoding
+// This table converts Windows-1252/Latin 1 into MacRoman encoding
static uchar latin2roman[128] = {
0xdb, 0xc0, 0xe2, 0xc4, 0xe3, 0xc9, 0xa0, 0xe0, 0xf6, 0xe4, 0xc0, 0xdc, 0xce, 0xc0, 0xc0, 0xc0,
0xc0, 0xd4, 0xd5, 0xd2, 0xd3, 0xa5, 0xd0, 0xd1, 0xf7, 0xaa, 0xc0, 0xdd, 0xcf, 0xc0, 0xc0, 0xd9,
@@ -56,7 +56,7 @@ static uchar latin2roman[128] = {
0xc0, 0x96, 0x98, 0x97, 0x99, 0x9b, 0x9a, 0xd6, 0xbf, 0x9d, 0x9c, 0x9e, 0x9f, 0xc0, 0xc0, 0xd8
};
-// This table converts MacRoman into MSWindows-1252/Latin 1
+// This table converts MacRoman into Windows-1252/Latin 1
static uchar roman2latin[128] = {
0xc4, 0xc5, 0xc7, 0xc9, 0xd1, 0xd6, 0xdc, 0xe1, 0xe0, 0xe2, 0xe4, 0xe3, 0xe5, 0xe7, 0xe9, 0xe8,
0xea, 0xeb, 0xed, 0xec, 0xee, 0xef, 0xf1, 0xf3, 0xf2, 0xf4, 0xf6, 0xf5, 0xfa, 0xf9, 0xfb, 0xfc,
diff --git a/src/fl_encoding_mac_roman.cxx b/src/fl_encoding_mac_roman.cxx
index d0217ba34..2036fb4dd 100644
--- a/src/fl_encoding_mac_roman.cxx
+++ b/src/fl_encoding_mac_roman.cxx
@@ -29,7 +29,7 @@
// On Mac OS X, nothing need to be converted. We simply return the
// original pointer.
//
-// MSWindows and X11 render text in ISO or Latin-1 for western settings. The
+// Windows and X11 render text in ISO or Latin-1 for western settings. The
// lookup tables below will convert all common character codes and replace
// unknown characters with an upsidedown question mark.
@@ -49,7 +49,7 @@ const char *Fl_Darwin_System_Driver::local_to_mac_roman(const char *t, int)
#endif
-// This table converts MSWindows-1252/Latin 1 into MacRoman encoding
+// This table converts Windows-1252/Latin 1 into MacRoman encoding
static uchar latin2roman[128] = {
0xdb, 0xc0, 0xe2, 0xc4, 0xe3, 0xc9, 0xa0, 0xe0, 0xf6, 0xe4, 0xc0, 0xdc, 0xce, 0xc0, 0xc0, 0xc0,
0xc0, 0xd4, 0xd5, 0xd2, 0xd3, 0xa5, 0xd0, 0xd1, 0xf7, 0xaa, 0xc0, 0xdd, 0xcf, 0xc0, 0xc0, 0xd9,
@@ -61,7 +61,7 @@ static uchar latin2roman[128] = {
0xc0, 0x96, 0x98, 0x97, 0x99, 0x9b, 0x9a, 0xd6, 0xbf, 0x9d, 0x9c, 0x9e, 0x9f, 0xc0, 0xc0, 0xd8
};
-// This table converts MacRoman into MSWindows-1252/Latin 1
+// This table converts MacRoman into Windows-1252/Latin 1
static uchar roman2latin[128] = {
0xc4, 0xc5, 0xc7, 0xc9, 0xd1, 0xd6, 0xdc, 0xe1, 0xe0, 0xe2, 0xe4, 0xe3, 0xe5, 0xe7, 0xe9, 0xe8,
0xea, 0xeb, 0xed, 0xec, 0xee, 0xef, 0xf1, 0xf3, 0xf2, 0xf4, 0xf6, 0xf5, 0xfa, 0xf9, 0xfb, 0xfc,
diff --git a/src/fl_overlay.cxx b/src/fl_overlay.cxx
index 8e095a962..a26af33ec 100644
--- a/src/fl_overlay.cxx
+++ b/src/fl_overlay.cxx
@@ -53,7 +53,7 @@ static void draw_current_rect() {
XSetForeground(fl_display, gc, 0xffffffff);
XDrawRectangle(fl_display, fl_window, gc, px, py, pw, ph);
XSetFunction(fl_display, gc, GXcopy);
-# elif defined(WIN32)
+# elif defined(_WIN32)
int old = SetROP2(fl_graphics_driver->gc(), R2_NOT);
fl_rect(px, py, pw, ph);
SetROP2(fl_graphics_driver->gc(), old);
diff --git a/src/flstring.h b/src/flstring.h
index 0d865738a..da242b3d4 100644
--- a/src/flstring.h
+++ b/src/flstring.h
@@ -3,7 +3,7 @@
*
* Common string header file for the Fast Light Tool Kit (FLTK).
*
- * Copyright 1998-2017 by Bill Spitzak and others.
+ * Copyright 1998-2018 by Bill Spitzak and others.
*
* This library is free software. Distribution and use rights are outlined in
* the file "COPYING" which should have been included with this file. If this
@@ -49,10 +49,10 @@
# define strdup _strdup
# endif /* _MSC_VER */
-# if defined(WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
+# if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
# define strcasecmp(s,t) _stricmp((s), (t))
# define strncasecmp(s,t,n) _strnicmp((s), (t), (n))
-# endif /* WIN32 && ... */
+# endif /* _WIN32 && ... */
# ifdef __cplusplus
extern "C" {
diff --git a/src/forms_fselect.cxx b/src/forms_fselect.cxx
index 2b89b3cd6..6b9f0d713 100644
--- a/src/forms_fselect.cxx
+++ b/src/forms_fselect.cxx
@@ -32,7 +32,7 @@ char* fl_show_file_selector(const char *message,const char *dir,
if (fname && fname[0]) strlcpy(fl_filename,fname,sizeof(fl_filename));
char *p = fl_directory+strlen(fl_directory);
if (p > fl_directory && *(p-1)!='/'
-#ifdef WIN32
+#ifdef _WIN32
&& *(p-1)!='\\' && *(p-1)!=':'
#endif
) *p++ = '/';
diff --git a/src/forms_timer.cxx b/src/forms_timer.cxx
index dbaacce5d..c8782c7c3 100644
--- a/src/forms_timer.cxx
+++ b/src/forms_timer.cxx
@@ -24,7 +24,7 @@
#include <FL/Fl_Timer.H>
#include <FL/fl_draw.H>
#include <FL/forms.H>
-#ifdef WIN32
+#ifdef _WIN32
# ifdef __MWERKS__
# include <time.h>
# else
@@ -40,7 +40,7 @@
#define FL_TIMER_BLINKRATE 0.2
void fl_gettime(long* sec, long* usec) {
-#ifdef WIN32
+#ifdef _WIN32
# ifdef __MWERKS__
time_t localTime = time(NULL);
struct tm *now = localtime(&localTime);
diff --git a/src/scandir_win32.c b/src/scandir_win32.c
index c72581c23..cd14a92d7 100644
--- a/src/scandir_win32.c
+++ b/src/scandir_win32.c
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
- * WIN32 scandir function for the Fast Light Tool Kit (FLTK).
+ * Windows scandir function for the Fast Light Tool Kit (FLTK).
*
- * Copyright 1998-2010 by Bill Spitzak and others.
+ * Copyright 1998-2018 by Bill Spitzak and others.
*
* This library is free software. Distribution and use rights are outlined in
* the file "COPYING" which should have been included with this file. If this
@@ -17,7 +17,7 @@
*/
#ifndef __CYGWIN__
-/* Emulation of posix scandir() call */
+/* Emulation of POSIX scandir() call */
#include <FL/platform_types.h>
#include <FL/fl_utf8.h>
#include "flstring.h"
diff --git a/src/screen_xywh.cxx b/src/screen_xywh.cxx
index 6c214b322..607f6df52 100644
--- a/src/screen_xywh.cxx
+++ b/src/screen_xywh.cxx
@@ -104,7 +104,7 @@ void Fl::screen_work_area(int &X, int &Y, int &W, int &H, int n)
/**
Gets the screen bounding rect for the given screen.
- Under MSWindows, Mac OS X, and the Gnome desktop, screen #0 contains the menubar/taskbar
+ Under Windows, Mac OS X, and the Gnome desktop, screen #0 contains the menubar/taskbar
\param[out] X,Y,W,H the corresponding screen bounding box
\param[in] n the screen number (0 to Fl::screen_count() - 1)
\see void screen_xywh(int &x, int &y, int &w, int &h, int mx, int my)
diff --git a/src/xutf8/lcUniConv/cp936ext.h b/src/xutf8/lcUniConv/cp936ext.h
index 64bd0fc97..e1a524d44 100644
--- a/src/xutf8/lcUniConv/cp936ext.h
+++ b/src/xutf8/lcUniConv/cp936ext.h
@@ -3,7 +3,7 @@
*
* Character encoding support for the Fast Light Tool Kit (FLTK).
*
- * Copyright 1998-2016 by Bill Spitzak and others.
+ * Copyright 1998-2018 by Bill Spitzak and others.
*
* This library is free software. Distribution and use rights are outlined in
* the file "COPYING" which should have been included with this file. If this
@@ -16,7 +16,7 @@
* http://www.fltk.org/str.php
*/
-#if defined(WIN32) || defined(__APPLE__) /* PORTME: is this really needed? It's huge! */
+#if defined(_WIN32) || defined(__APPLE__) /* PORTME: is this really needed? It's huge! */
/* not needed */
@@ -6251,7 +6251,7 @@ cp936ext_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
#endif /* CP936 */
-#endif /* __APPLE__ WIN32 */ /* PORTME: Unicode stuff */
+#endif /* _WIN32 || __APPLE__ */ /* PORTME: Unicode stuff */
/*
* End of "$Id$".