nspluginwrapper-1.2.2

Taken from Debian orig.tar.gz file.
This commit is contained in:
David Benjamin 2011-03-05 22:19:49 -05:00
parent 74360b0d71
commit 910986a89b
38 changed files with 158 additions and 59 deletions

View File

@ -1,3 +1,66 @@
2009-01-01 07:36 Gwenole Beauchesne <gb.public@free.fr>
* NEWS, nspluginwrapper.spec: Updates for 1.2.2.
2009-01-01 07:34 Gwenole Beauchesne <gb.public@free.fr>
* Makefile, NEWS, README, configure, src/cxxabi-compat.cpp,
src/debug.c, src/debug.h, src/libxpcom.c, src/npruntime-impl.h,
src/npruntime.c, src/npw-common.c, src/npw-common.h,
src/npw-config-template.h, src/npw-config.c, src/npw-malloc.c,
src/npw-malloc.h, src/npw-player.c, src/npw-rpc.c,
src/npw-rpc.h, src/npw-viewer.c, src/npw-wrapper.c, src/rpc.c,
src/rpc.h, src/sysdeps.h, src/utils.c, src/utils.h,
src/xembed.h, tests/test-rpc-common.c, tests/test-rpc-common.h,
tests/test-rpc-concurrent.c, tests/test-rpc-nested-1.c,
tests/test-rpc-nested-2.c, tests/test-rpc-types.c,
utils/getdeps.sh, utils/mkruntime.sh, utils/repackage.sh: Update
copyright notices.
2008-12-28 11:36 Gwenole Beauchesne <gb.public@free.fr>
* NEWS, src/npw-malloc.c, src/npw-malloc.h, src/npw-viewer.c:
Backport from trunk:
Make sure NPWindow::ws_info points to a unique location for the
lifetime of the window. This fixes support for the VLC plugin
that makes a local copy of NPWindow but doesn't bother about
making an NPWindow::ws_info copy.
2008-12-26 23:37 Gwenole Beauchesne <gb.public@free.fr>
* NEWS: Updates with "hot" fixes.
2008-12-26 23:33 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-wrapper.c: Backport from trunk:
Fix NPN_GetStringIdentifiers() to free identifiers with
NPW_MemFree().
* src/npw-player.c: Backport from trunk:
Fix stream_new() to return NULL if an error occurred.
2008-12-26 13:42 Gwenole Beauchesne <gb.public@free.fr>
* nspluginwrapper.spec: Bump release for development.
2008-12-25 21:43 Gwenole Beauchesne <gb.public@free.fr>
* nspluginwrapper.spec: Fix day-of-week.
2008-12-25 21:40 Gwenole Beauchesne <gb.public@free.fr>
* NEWS, nspluginwrapper.spec: Updates for real 1.2.0 release.
2008-12-25 21:37 Gwenole Beauchesne <gb.public@free.fr>
* ChangeLog, Makefile: Fix ChangeLog generation for the branch.
2008-12-25 21:29 Gwenole Beauchesne <gb.public@free.fr>
* ChangeLog: Generated by svn2cl.
2008-12-25 21:29 Gwenole Beauchesne <gb.public@free.fr>
* ChangeLog: Generated by svn2cl.

View File

@ -1,5 +1,5 @@
#
# nspluginwrapper Makefile (C) 2005-2008 Gwenole Beauchesne
# nspluginwrapper Makefile (C) 2005-2009 Gwenole Beauchesne
#
-include config.mak

9
NEWS
View File

@ -1,5 +1,10 @@
nspluginwrapper NEWS -- history of user-visible changes. 2008-12-26
Copyright (C) 2005-2008 Gwenole Beauchesne
nspluginwrapper NEWS -- history of user-visible changes. 2009-01-02
Copyright (C) 2005-2009 Gwenole Beauchesne
Version 1.2.2 - 02.Jan.2009
* Fix support for the VLC plug-in
* Fix memory deallocation in NPN_GetStringIdentifiers()
* Fix return value if stream creation failed in standalone player
Version 1.2.0 - 26.Dec.2008
* Drop obsolete mkruntime scripts

2
README
View File

@ -2,7 +2,7 @@
nspluginwrapper
A cross-platform NPAPI plugin viewer
Copyright (C) 2005-2008 Gwenole Beauchesne
Copyright (C) 2005-2009 Gwenole Beauchesne
License

2
configure vendored
View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# nspluginwrapper configure script (C) 2005-2008 Gwenole Beauchesne
# nspluginwrapper configure script (C) 2005-2009 Gwenole Beauchesne
# derived from qemu configure script, (C) 2003 Fabrice Bellard
#
PACKAGE=nspluginwrapper

View File

@ -1,5 +1,5 @@
%define name nspluginwrapper
%define version 1.2.0
%define version 1.2.2
%define release 1
#define svndate DATE
@ -191,6 +191,11 @@ fi
%endif
%changelog
* Fri Jan 02 2009 Gwenole Beauchesne <gb.public@free.fr> 1.2.2-1
- fix support for the VLC plug-in
- fix memory deallocation in NPN_GetStringIdentifiers()
- fix return value if stream creation failed in standalone player
* Fri Dec 26 2008 Gwenole Beauchesne <gb.public@free.fr> 1.2.0-1
- drop obsolete mkruntime scripts
- use valgrind if NPW_USE_VALGRIND=yes

View File

@ -1,7 +1,7 @@
/*
* cxxabi-compat.cpp - Compatibility glue for older libg++ symbols
*
* nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
* nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
/*
* debug.c - Debugging utilities
*
* nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
* nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
/*
* debug.h - Debugging utilities
*
* nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
* nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
/*
* libxpcom.c - Dummy XPCOM glue
*
* nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
* nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
/*
* npruntime.c - Scripting plugins support
*
* nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
* nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
/*
* npruntime.c - Scripting plugins support
*
* nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
* nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
/*
* npw-common.c - Common code for both the wrapper and the plugin
*
* nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
* nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
/*
* npw-common.h - Common code for both the wrapper and the plugin
*
* nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
* nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
/*
* npw-config-template.h - nspluginwrapper configuration tool, template defs
*
* nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
* nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
/*
* npw-config.c - nspluginwrapper configuration tool
*
* nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
* nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
/*
* npw-malloc.c - Memory allocation
*
* nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
* nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -199,6 +199,15 @@ NPW_MemAlloc0 (uint32_t size)
return get_malloc_hooks ()->memalloc0 (size);
}
void *
NPW_MemAllocCopy (uint32_t size, const void *src)
{
void *ptr = NPW_MemAlloc (size);
if (ptr)
memcpy (ptr, src, size);
return ptr;
}
void
NPW_MemFree (void *ptr)
{

View File

@ -1,7 +1,7 @@
/*
* npw-malloc.h - Memory allocation
*
* nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
* nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -27,6 +27,9 @@ NPW_MemAlloc (uint32_t size);
void *
NPW_MemAlloc0 (uint32_t size);
void *
NPW_MemAllocCopy (uint32_t size, const void *ptr);
void
NPW_MemFree (void *ptr);
@ -36,4 +39,7 @@ NPW_MemFree (void *ptr);
#define NPW_MemNew0(type, n) \
((type *) NPW_MemAlloc0 ((n) * sizeof (type)))
#define NPW_MemClone(type, ptr) \
((type *) NPW_MemAllocCopy (sizeof (type), ptr))
#endif /* NPW_MALLOC_H */

View File

@ -1,7 +1,7 @@
/*
* npw-player.c - Standalone plugin player
*
* nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
* nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -1324,6 +1324,7 @@ stream_new (Plugin *plugin,
np_stream_destroy (np_stream);
if (pstream)
g_free (pstream);
pstream = NULL;
l_return:
if (error)

View File

@ -1,7 +1,7 @@
/*
* npw-rpc.c - Remote Procedure Calls (NPAPI specialisation)
*
* nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
* nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
/*
* npw-rpc.h - Remote Procedure Calls (NPAPI specialisation)
*
* nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
* nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
/*
* npw-viewer.c - Target plugin loader and viewer
*
* nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
* nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -516,7 +516,7 @@ static void destroy_window_attributes(NPSetWindowCallbackStruct *ws_info)
{
if (ws_info == NULL)
return;
free(ws_info);
NPW_MemFree(ws_info);
}
// Fix size hints in NPWindow (Flash Player doesn't like null width)
@ -551,21 +551,23 @@ static void fixup_size_hints(PluginInstance *plugin)
static int create_window(PluginInstance *plugin, NPWindow *window)
{
// XXX destroy previous window here?
if (plugin->is_windowless)
if (plugin->is_windowless) {
destroy_window_attributes(plugin->window.ws_info);
else
assert(plugin->window.ws_info == NULL);
plugin->window.ws_info = NULL;
}
assert(plugin->window.ws_info == NULL);
// cache new window information (and take ownership of window->ws_info)
// cache new window information and reconstruct window attributes
NPSetWindowCallbackStruct *ws_info;
if ((ws_info = NPW_MemClone(NPSetWindowCallbackStruct, window->ws_info)) == NULL)
return -1;
if (create_window_attributes(ws_info) < 0)
return -1;
memcpy(&plugin->window, window, sizeof(*window));
window = &plugin->window;
window->ws_info = ws_info;
fixup_size_hints(plugin);
// reconstruct window attributes
if (create_window_attributes(window->ws_info) < 0)
return -1;
NPSetWindowCallbackStruct *ws_info = window->ws_info;
// that's all for windowless plugins
if (plugin->is_windowless)
return 0;
@ -646,20 +648,21 @@ static int create_window(PluginInstance *plugin, NPWindow *window)
// Update window information from NPWindow
static int update_window(PluginInstance *plugin, NPWindow *window)
{
// always synchronize window attributes (and take ownership of window->ws_info)
if (plugin->window.ws_info) {
destroy_window_attributes(plugin->window.ws_info);
plugin->window.ws_info = NULL;
if (plugin->is_windowless) {
npw_printf("ERROR: update_window() called for windowless plugin\n");
return -1;
}
if (window->ws_info) {
create_window_attributes(window->ws_info);
plugin->window.ws_info = window->ws_info;
}
else {
if (window->ws_info == NULL) {
npw_printf("ERROR: no window attributes for window %p\n", window->window);
return -1;
}
// always synchronize window attributes
NPSetWindowCallbackStruct *ws_info = plugin->window.ws_info;
memcpy(ws_info, window->ws_info, sizeof(*ws_info));
create_window_attributes(ws_info);
// synchronize cliprect
memcpy(&plugin->window.clipRect, &window->clipRect, sizeof(window->clipRect));;
@ -3162,8 +3165,15 @@ static int handle_NPP_SetWindow(rpc_connection_t *connection)
}
NPError ret = g_NPP_SetWindow(PLUGIN_INSTANCE_NPP(plugin), window);
if (window)
if (window) {
if (window->ws_info) {
free(window->ws_info);
window->ws_info = NULL;
}
free(window);
}
return rpc_method_send_reply(connection, RPC_TYPE_INT32, ret, RPC_TYPE_INVALID);
}

View File

@ -1,7 +1,7 @@
/*
* npw-wrapper.c - Host Mozilla plugin (loads the actual viewer)
*
* nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
* nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -1616,7 +1616,7 @@ static int handle_NPN_GetStringIdentifiers(rpc_connection_t *connection)
RPC_TYPE_ARRAY, RPC_TYPE_NP_IDENTIFIER, nameCount, idents,
RPC_TYPE_INVALID);
NPN_MemFree(idents);
NPW_MemFree(idents);
return rpc_ret;
}

View File

@ -1,7 +1,7 @@
/*
* rpc.c - Remote Procedure Calls
*
* nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
* nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
/*
* rpc.h - Remote Procedure Calls
*
* nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
* nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
/*
* sysdeps.h - System dependent definitions
*
* nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
* nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
/*
* utils.c - Utility functions
*
* nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
* nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
/*
* utils.h - Utility functions
*
* nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
* nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
/*
* xembed.h - XEMBED definitions
*
* nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
* nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
/*
* test-rpc-common.c - Common RPC test code
*
* nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
* nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
/*
* test-rpc-common.h - Common RPC test code
*
* nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
* nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
/*
* test-rpc-concurrent.c - Test concurrent RPC invoke
*
* nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
* nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
/*
* test-rpc-nested.c - Test nested RPC invoke
*
* nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
* nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
/*
* test-rpc-nested-2.c - Test nested RPC invoke
*
* nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
* nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
/*
* test-rpc-types.c - Test marshaling of common data types
*
* nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
* nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -2,7 +2,7 @@
#
# getdeps.sh - get dependent libs of a program
#
# nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
# nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
#
# FIXME: needs pango config files, extra X11 libraries, etc. Thus it's

View File

@ -2,7 +2,7 @@
#
# mkruntime.sh - prepare QEMU runtime from Mandriva Linux 2006.0
#
# nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
# nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
#
# Usage: mkruntime <MDV2006-RPMS>

View File

@ -2,7 +2,7 @@
#
# repackage.sh - repackage script for nspluginwrapper-ARCH
#
# nspluginwrapper (C) 2005-2008 Gwenole Beauchesne
# nspluginwrapper (C) 2005-2009 Gwenole Beauchesne
#
TMPDIR=${TMPDIR:-/tmp}