forked from AuroraMiddleware/gtk
8caba9536c
Massive changes to OLE2 DnD protocol, which was completely broken before: * Keep GdkDragContext and OLE2 objects separate (don't ref/unref them together, don't necessarily create them together). * Keep IDataObject formats in the object itself, not in a global variable. * Fix getdata() to look up the request target in its format list, not in the global hash table * Create target GdkDragContext on each drag_enter, destroy it on drag_leave, whereas IDropTarget is created when a window becomes a drag destination and is re-used indefinitely. * Query the source IDataObject for its supported types, cache them in the target (!) context. This is how GTK+ works, honestly. * Remember current_src_object when we initiate a drag, to be able to detect later on that the data object is ours and use a shortcut when querying targets * Make sure GDK_DRAG_MOTION is only sent when something changes * Support GTK drag cursors * Ensure that exotic GTK clipboard formats are registered (but try to avoid registering formats that can't be used between applications). * Don't enumerate internal formats * Ensure that DnD indicator window can't accept drags or receive any kind of input (use WS_EX_TRANSPARENT). * Remove unneeded indentation in _gdk_win32_dnd_do_dragdrop() * Fix indentation in gdk_win32_drag_context_drop_finish() * Remove obsolete comments in _gdk_win32_window_register_dnd() * Check for DnD in progress when processing WM_KILLFOCUS, don't emit a grab break event in such cases (this allows alt-tabbing while DnD is in progress, though there may be lingering issues with focus after dropping...) * Support Shell ID List -> text/uri-list conversion, now it's possible to drop files (dragged from Explorer) on GTK+ applications * Explicitly use RegisterClipboardFormatA() when we know that the string is not in unicode. Otherwise explicitly use RegisterClipboardFormatW() with a UTF8->UTF16 converted string * Fix _gdk_win32_display_get_selection_owner() to correctly bail when selection owner HWND is NULL (looking up GdkWindow for NULL HWND always succeeds and returns the root window - not the intended effect) * More logging * Send DROP_FINISHED event after DnD loop ends * Send STATUS event on feedback * Move GetKeyboardState() and related code into _gdk_win32_window_drag_begin(), so that it's closer to the point where last_pt and start_pt are set * Use & 0x80 to check for the key being pressed. Windows will set low-order bit to 1 for all mouse buttons to indicate that they are toggled, so simply checking for the value not being 0 is not enough anymore. This is probably a new thing in modern W32 that didn't exist before (OLE2 DnD code is old). * Fixed (hopefully) and simplified HiDPI parts of the code. Also adds managed DnD implementation for W32 GDK backend (for both OLE2 and LOCAL protocols). Mostly a copy of the X11 backend code, but there are some minor differences: * doesn't use drag_window field in GdkDragContext, uses the one in GdkWin32DragContext exclusively * subtracts hotspot offset from the window coordinates when showing the dragback animation * tries to consistently support scaling and caches the scale in the context * Some keynav code is removed (places where grabbing/ungrabbing should happen is marked with TODOs), and the rest is probably inert. Also significantly changes the way selection (and clipboard) is handled (as MSDN rightly notes, the handling for DnD and Clipboard formats is virtually the same, so it makes sense to handle both with the same code): * Don't spam GDK_OWNER_CHANGE, send them only when owner actually changes * Open clipboard when our process becomes the clipboard owner (we are doing it anyway, to empty the clipboard and *become* the owner), and then don't close it until a scheduled selection request event (with TARGETS target) is received. Process that event by announcing all of our supported formats (by that time add_targets() should have been called up the stack, thus the formats are known; just in case, add_targets() will also schedule a selection request, if one isn't scheduled already, so that late-coming formats can still be announced). * Allow clipboard opening for selection_convert() to be delayed if it fails initially. * The last two points above should fix all the bugs about GTK+ rising too much ruckus over OpenClipboard() failures, as owner change *is allowed* to fail (though not all callers currently handle that case), and selection_convert() is asynchronous to begin with. Still, this is somewhat risky, as there's a possibility that the code will work in unexpected ways and the clipboard will remain open. There's now logging to track the clipboard being opened and closed, and a number of failsafes that try to ensure that it isn't kept open for no reason. * Added copious notes on the way clipboard works on X11, Windows and GDK-W32, also removed old comments in DnD implementation, replaced some of them with the new ones * A lot of crufty module-global variables are stuffed into a singleton object, GdkWin32Selection. It's technically possible to make it a sub-object of the Display object (the way Wayland backend does), but since Display object on W32 is a singleton anyway... why bother? * Fixed the send_change_events() a bit (was slightly broken in one of the previous iterations) * Ensure that there's no confusion between selection conversion (an artifact term from X11) and selection transmutation (changing the data to be W32-compatible) * Put all the transmutation code and format-target-matching code into gdkselection-win32.c, now this code isn't spread across multiple files. * Consequently, moved some code away from gdkproperty-win32.c and gdkdnd-win32.c * Extensive format transmutation checks for OLE2 DnD and clipboard. We now keep track of which format mappings are for transmutations, and which aren't (for example, when formats are passed as-is, or when a registered name is just an alias) * Put transmutation code into separate functions * Ensure that drop target keeps a format->target map for supported formats, this is useful when selection_convert() is called, as it only receives a single target and no hints on the format from which the data should be transmuted into this target. * Add clear_targets() on W32, to de called by GTK * Use g_set_object() instead of g_ref_object() where it is allowed. * Fix indentation (and convert tabs to spaces), remove unused variables https://bugzilla.gnome.org/show_bug.cgi?id=786509
394 lines
14 KiB
C
394 lines
14 KiB
C
/* GDK - The GIMP Drawing Kit
|
|
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
|
* Copyright (C) 1998-2002 Tor Lillqvist
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
/*
|
|
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
|
* file for a list of people on the GTK+ Team. See the ChangeLog
|
|
* files for a list of changes. These files are distributed with
|
|
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
|
*/
|
|
|
|
#include "config.h"
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
#include <glib/gprintf.h>
|
|
|
|
#include "gdkscreen.h"
|
|
#include "gdkproperty.h"
|
|
#include "gdkselection.h"
|
|
#include "gdkprivate-win32.h"
|
|
#include "gdkwin32.h"
|
|
|
|
GdkAtom
|
|
_gdk_win32_display_manager_atom_intern (GdkDisplayManager *manager,
|
|
const gchar *atom_name,
|
|
gint only_if_exists)
|
|
{
|
|
ATOM win32_atom;
|
|
GdkAtom retval;
|
|
static GHashTable *atom_hash = NULL;
|
|
|
|
if (!atom_hash)
|
|
atom_hash = g_hash_table_new (g_str_hash, g_str_equal);
|
|
|
|
retval = g_hash_table_lookup (atom_hash, atom_name);
|
|
if (!retval)
|
|
{
|
|
if (strcmp (atom_name, "PRIMARY") == 0)
|
|
retval = GDK_SELECTION_PRIMARY;
|
|
else if (strcmp (atom_name, "SECONDARY") == 0)
|
|
retval = GDK_SELECTION_SECONDARY;
|
|
else if (strcmp (atom_name, "CLIPBOARD") == 0)
|
|
retval = GDK_SELECTION_CLIPBOARD;
|
|
else if (strcmp (atom_name, "ATOM") == 0)
|
|
retval = GDK_SELECTION_TYPE_ATOM;
|
|
else if (strcmp (atom_name, "BITMAP") == 0)
|
|
retval = GDK_SELECTION_TYPE_BITMAP;
|
|
else if (strcmp (atom_name, "COLORMAP") == 0)
|
|
retval = GDK_SELECTION_TYPE_COLORMAP;
|
|
else if (strcmp (atom_name, "DRAWABLE") == 0)
|
|
retval = GDK_SELECTION_TYPE_DRAWABLE;
|
|
else if (strcmp (atom_name, "INTEGER") == 0)
|
|
retval = GDK_SELECTION_TYPE_INTEGER;
|
|
else if (strcmp (atom_name, "PIXMAP") == 0)
|
|
retval = GDK_SELECTION_TYPE_PIXMAP;
|
|
else if (strcmp (atom_name, "WINDOW") == 0)
|
|
retval = GDK_SELECTION_TYPE_WINDOW;
|
|
else if (strcmp (atom_name, "STRING") == 0)
|
|
retval = GDK_SELECTION_TYPE_STRING;
|
|
else
|
|
{
|
|
win32_atom = GlobalAddAtom (atom_name);
|
|
retval = GUINT_TO_POINTER ((guint) win32_atom);
|
|
}
|
|
g_hash_table_insert (atom_hash,
|
|
g_strdup (atom_name),
|
|
retval);
|
|
}
|
|
|
|
return retval;
|
|
}
|
|
|
|
gchar *
|
|
_gdk_win32_display_manager_get_atom_name (GdkDisplayManager *manager,
|
|
GdkAtom atom)
|
|
{
|
|
ATOM win32_atom;
|
|
gchar name[256];
|
|
|
|
if (GDK_NONE == atom) return g_strdup ("<none>");
|
|
else if (GDK_SELECTION_PRIMARY == atom) return g_strdup ("PRIMARY");
|
|
else if (GDK_SELECTION_SECONDARY == atom) return g_strdup ("SECONDARY");
|
|
else if (GDK_SELECTION_CLIPBOARD == atom) return g_strdup ("CLIPBOARD");
|
|
else if (GDK_SELECTION_TYPE_ATOM == atom) return g_strdup ("ATOM");
|
|
else if (GDK_SELECTION_TYPE_BITMAP == atom) return g_strdup ("BITMAP");
|
|
else if (GDK_SELECTION_TYPE_COLORMAP == atom) return g_strdup ("COLORMAP");
|
|
else if (GDK_SELECTION_TYPE_DRAWABLE == atom) return g_strdup ("DRAWABLE");
|
|
else if (GDK_SELECTION_TYPE_INTEGER == atom) return g_strdup ("INTEGER");
|
|
else if (GDK_SELECTION_TYPE_PIXMAP == atom) return g_strdup ("PIXMAP");
|
|
else if (GDK_SELECTION_TYPE_WINDOW == atom) return g_strdup ("WINDOW");
|
|
else if (GDK_SELECTION_TYPE_STRING == atom) return g_strdup ("STRING");
|
|
|
|
win32_atom = GPOINTER_TO_UINT (atom);
|
|
|
|
if (win32_atom < 0xC000)
|
|
return g_strdup_printf ("#%p", atom);
|
|
else if (GlobalGetAtomName (win32_atom, name, sizeof (name)) == 0)
|
|
return NULL;
|
|
return g_strdup (name);
|
|
}
|
|
|
|
gint
|
|
_gdk_win32_window_get_property (GdkWindow *window,
|
|
GdkAtom property,
|
|
GdkAtom type,
|
|
gulong offset,
|
|
gulong length,
|
|
gint pdelete,
|
|
GdkAtom *actual_property_type,
|
|
gint *actual_format_type,
|
|
gint *actual_length,
|
|
guchar **data)
|
|
{
|
|
g_return_val_if_fail (window != NULL, FALSE);
|
|
g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
|
|
|
|
if (GDK_WINDOW_DESTROYED (window))
|
|
return FALSE;
|
|
|
|
g_warning ("gdk_property_get: Not implemented");
|
|
|
|
return FALSE;
|
|
}
|
|
|
|
void
|
|
_gdk_win32_window_change_property (GdkWindow *window,
|
|
GdkAtom property,
|
|
GdkAtom type,
|
|
gint format,
|
|
GdkPropMode mode,
|
|
const guchar *data,
|
|
gint nelements)
|
|
{
|
|
GdkWin32Selection *win32_sel = _gdk_win32_selection_get ();
|
|
|
|
g_return_if_fail (window != NULL);
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
|
|
|
if (GDK_WINDOW_DESTROYED (window))
|
|
return;
|
|
|
|
GDK_NOTE (DND, {
|
|
gchar *prop_name = gdk_atom_name (property);
|
|
gchar *type_name = gdk_atom_name (type);
|
|
gchar *datastring = _gdk_win32_data_to_string (data, MIN (10, format*nelements/8));
|
|
|
|
g_print ("gdk_property_change: %p %s %s %s %d*%d bits: %s\n",
|
|
GDK_WINDOW_HWND (window),
|
|
prop_name,
|
|
type_name,
|
|
(mode == GDK_PROP_MODE_REPLACE ? "REPLACE" :
|
|
(mode == GDK_PROP_MODE_PREPEND ? "PREPEND" :
|
|
(mode == GDK_PROP_MODE_APPEND ? "APPEND" :
|
|
"???"))),
|
|
format, nelements,
|
|
datastring);
|
|
g_free (datastring);
|
|
g_free (prop_name);
|
|
g_free (type_name);
|
|
});
|
|
|
|
#ifndef G_DISABLE_CHECKS
|
|
/* We should never come here for these types */
|
|
if (G_UNLIKELY (type == _gdk_win32_selection_atom (GDK_WIN32_ATOM_INDEX_COMPOUND_TEXT) ||
|
|
type == _gdk_win32_selection_atom (GDK_WIN32_ATOM_INDEX_SAVE_TARGETS)))
|
|
{
|
|
g_return_if_fail_warning (G_LOG_DOMAIN,
|
|
G_STRFUNC,
|
|
"change_property called with a bad type");
|
|
return;
|
|
}
|
|
#endif
|
|
|
|
if (property == _gdk_win32_selection_atom (GDK_WIN32_ATOM_INDEX_GDK_SELECTION) ||
|
|
property == _gdk_win32_selection_atom (GDK_WIN32_ATOM_INDEX_OLE2_DND))
|
|
{
|
|
_gdk_win32_selection_property_change (win32_sel,
|
|
window,
|
|
property,
|
|
type,
|
|
format,
|
|
mode,
|
|
data,
|
|
nelements);
|
|
}
|
|
else
|
|
g_warning ("gdk_property_change: General case not implemented");
|
|
}
|
|
|
|
void
|
|
_gdk_win32_window_delete_property (GdkWindow *window,
|
|
GdkAtom property)
|
|
{
|
|
gchar *prop_name;
|
|
|
|
g_return_if_fail (window != NULL);
|
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
|
|
|
GDK_NOTE (DND, {
|
|
prop_name = gdk_atom_name (property);
|
|
|
|
g_print ("gdk_property_delete: %p %s\n",
|
|
GDK_WINDOW_HWND (window),
|
|
prop_name);
|
|
g_free (prop_name);
|
|
});
|
|
|
|
if (property == _gdk_win32_selection_atom (GDK_WIN32_ATOM_INDEX_GDK_SELECTION) ||
|
|
property == _gdk_win32_selection_atom (GDK_WIN32_ATOM_INDEX_OLE2_DND))
|
|
_gdk_selection_property_delete (window);
|
|
else if (property == _gdk_win32_selection_atom (GDK_WIN32_ATOM_INDEX_WM_TRANSIENT_FOR))
|
|
{
|
|
GdkScreen *screen;
|
|
|
|
screen = gdk_window_get_screen (window);
|
|
gdk_window_set_transient_for (window, gdk_screen_get_root_window (screen));
|
|
}
|
|
else
|
|
{
|
|
prop_name = gdk_atom_name (property);
|
|
g_warning ("gdk_property_delete: General case (%s) not implemented",
|
|
prop_name);
|
|
g_free (prop_name);
|
|
}
|
|
}
|
|
|
|
/*
|
|
For reference, from gdk/x11/gdksettings.c:
|
|
|
|
"Net/DoubleClickTime\0" "gtk-double-click-time\0"
|
|
"Net/DoubleClickDistance\0" "gtk-double-click-distance\0"
|
|
"Net/DndDragThreshold\0" "gtk-dnd-drag-threshold\0"
|
|
"Net/CursorBlink\0" "gtk-cursor-blink\0"
|
|
"Net/CursorBlinkTime\0" "gtk-cursor-blink-time\0"
|
|
"Net/ThemeName\0" "gtk-theme-name\0"
|
|
"Net/IconThemeName\0" "gtk-icon-theme-name\0"
|
|
"Gtk/ColorPalette\0" "gtk-color-palette\0"
|
|
"Gtk/FontName\0" "gtk-font-name\0"
|
|
"Gtk/KeyThemeName\0" "gtk-key-theme-name\0"
|
|
"Gtk/Modules\0" "gtk-modules\0"
|
|
"Gtk/CursorBlinkTimeout\0" "gtk-cursor-blink-timeout\0"
|
|
"Gtk/CursorThemeName\0" "gtk-cursor-theme-name\0"
|
|
"Gtk/CursorThemeSize\0" "gtk-cursor-theme-size\0"
|
|
"Gtk/ColorScheme\0" "gtk-color-scheme\0"
|
|
"Gtk/EnableAnimations\0" "gtk-enable-animations\0"
|
|
"Xft/Antialias\0" "gtk-xft-antialias\0"
|
|
"Xft/Hinting\0" "gtk-xft-hinting\0"
|
|
"Xft/HintStyle\0" "gtk-xft-hintstyle\0"
|
|
"Xft/RGBA\0" "gtk-xft-rgba\0"
|
|
"Xft/DPI\0" "gtk-xft-dpi\0"
|
|
"Gtk/EnableAccels\0" "gtk-enable-accels\0"
|
|
"Gtk/ScrolledWindowPlacement\0" "gtk-scrolled-window-placement\0"
|
|
"Gtk/IMModule\0" "gtk-im-module\0"
|
|
"Fontconfig/Timestamp\0" "gtk-fontconfig-timestamp\0"
|
|
"Net/SoundThemeName\0" "gtk-sound-theme-name\0"
|
|
"Net/EnableInputFeedbackSounds\0" "gtk-enable-input-feedback-sounds\0"
|
|
"Net/EnableEventSounds\0" "gtk-enable-event-sounds\0";
|
|
|
|
More, from various places in gtk sources:
|
|
|
|
gtk-entry-select-on-focus
|
|
gtk-split-cursor
|
|
|
|
*/
|
|
gboolean
|
|
_gdk_win32_screen_get_setting (GdkScreen *screen,
|
|
const gchar *name,
|
|
GValue *value)
|
|
{
|
|
g_return_val_if_fail (GDK_IS_SCREEN (screen), FALSE);
|
|
|
|
/*
|
|
* XXX : if these values get changed through the Windoze UI the
|
|
* respective gdk_events are not generated yet.
|
|
*/
|
|
if (strcmp ("gtk-double-click-time", name) == 0)
|
|
{
|
|
gint i = GetDoubleClickTime ();
|
|
GDK_NOTE(MISC, g_print("gdk_screen_get_setting(\"%s\") : %d\n", name, i));
|
|
g_value_set_int (value, i);
|
|
return TRUE;
|
|
}
|
|
else if (strcmp ("gtk-double-click-distance", name) == 0)
|
|
{
|
|
gint i = MAX(GetSystemMetrics (SM_CXDOUBLECLK), GetSystemMetrics (SM_CYDOUBLECLK));
|
|
GDK_NOTE(MISC, g_print("gdk_screen_get_setting(\"%s\") : %d\n", name, i));
|
|
g_value_set_int (value, i);
|
|
return TRUE;
|
|
}
|
|
else if (strcmp ("gtk-dnd-drag-threshold", name) == 0)
|
|
{
|
|
gint i = MAX(GetSystemMetrics (SM_CXDRAG), GetSystemMetrics (SM_CYDRAG));
|
|
GDK_NOTE(MISC, g_print("gdk_screen_get_setting(\"%s\") : %d\n", name, i));
|
|
g_value_set_int (value, i);
|
|
return TRUE;
|
|
}
|
|
else if (strcmp ("gtk-split-cursor", name) == 0)
|
|
{
|
|
GDK_NOTE(MISC, g_print("gdk_screen_get_setting(\"%s\") : FALSE\n", name));
|
|
g_value_set_boolean (value, FALSE);
|
|
return TRUE;
|
|
}
|
|
else if (strcmp ("gtk-alternative-button-order", name) == 0)
|
|
{
|
|
GDK_NOTE(MISC, g_print("gdk_screen_get_setting(\"%s\") : TRUE\n", name));
|
|
g_value_set_boolean (value, TRUE);
|
|
return TRUE;
|
|
}
|
|
else if (strcmp ("gtk-alternative-sort-arrows", name) == 0)
|
|
{
|
|
GDK_NOTE(MISC, g_print("gdk_screen_get_setting(\"%s\") : TRUE\n", name));
|
|
g_value_set_boolean (value, TRUE);
|
|
return TRUE;
|
|
}
|
|
else if (strcmp ("gtk-shell-shows-desktop", name) == 0)
|
|
{
|
|
GDK_NOTE(MISC, g_print("gdk_screen_get_setting(\"%s\") : TRUE\n", name));
|
|
g_value_set_boolean (value, TRUE);
|
|
return TRUE;
|
|
}
|
|
else if (strcmp ("gtk-font-name", name) == 0)
|
|
{
|
|
NONCLIENTMETRICS ncm;
|
|
CPINFOEX cpinfoex_default, cpinfoex_curr_thread;
|
|
OSVERSIONINFO info;
|
|
BOOL result_default, result_curr_thread;
|
|
|
|
info.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
|
|
|
|
/* TODO: Fallback to using Pango on Windows 8 and later,
|
|
* as this method of handling gtk-font-name does not work
|
|
* well there, where garbled text will be displayed for texts
|
|
* that are not supported by the default menu font. Look for
|
|
* whether there is a better solution for this on Windows 8 and
|
|
* later
|
|
*/
|
|
if (!GetVersionEx (&info) ||
|
|
info.dwMajorVersion > 6 ||
|
|
(info.dwMajorVersion == 6 && info.dwMinorVersion >= 2))
|
|
return FALSE;
|
|
|
|
/* check whether the system default ANSI codepage matches the
|
|
* ANSI code page of the running thread. If so, continue, otherwise
|
|
* fall back to using Pango to handle gtk-font-name
|
|
*/
|
|
result_default = GetCPInfoEx (CP_ACP, 0, &cpinfoex_default);
|
|
result_curr_thread = GetCPInfoEx (CP_THREAD_ACP, 0, &cpinfoex_curr_thread);
|
|
|
|
if (!result_default ||
|
|
!result_curr_thread ||
|
|
cpinfoex_default.CodePage != cpinfoex_curr_thread.CodePage)
|
|
return FALSE;
|
|
|
|
ncm.cbSize = sizeof(NONCLIENTMETRICS);
|
|
if (SystemParametersInfo (SPI_GETNONCLIENTMETRICS, ncm.cbSize, &ncm, FALSE))
|
|
{
|
|
/* Pango finally uses GetDeviceCaps to scale, we use simple
|
|
* approximation here.
|
|
*/
|
|
int nHeight = (0 > ncm.lfMenuFont.lfHeight ? - 3 * ncm.lfMenuFont.lfHeight / 4 : 10);
|
|
if (OUT_STRING_PRECIS == ncm.lfMenuFont.lfOutPrecision)
|
|
GDK_NOTE(MISC, g_print("gdk_screen_get_setting(%s) : ignoring bitmap font '%s'\n",
|
|
name, ncm.lfMenuFont.lfFaceName));
|
|
else if (ncm.lfMenuFont.lfFaceName && strlen(ncm.lfMenuFont.lfFaceName) > 0 &&
|
|
/* Avoid issues like those described in bug #135098 */
|
|
g_utf8_validate (ncm.lfMenuFont.lfFaceName, -1, NULL))
|
|
{
|
|
char *s = g_strdup_printf ("%s %d", ncm.lfMenuFont.lfFaceName, nHeight);
|
|
GDK_NOTE(MISC, g_print("gdk_screen_get_setting(%s) : %s\n", name, s));
|
|
g_value_set_string (value, s);
|
|
|
|
g_free(s);
|
|
return TRUE;
|
|
}
|
|
}
|
|
}
|
|
|
|
return FALSE;
|
|
}
|