r=pedemont, sr=blizzard
OS/2 only - get NPNULL plugin working on OS/2
This commit is contained in:
mkaply%us.ibm.com 2002-06-27 22:26:41 +00:00
Родитель 80474fae36
Коммит c1c2583e67
3 изменённых файлов: 26 добавлений и 18 удалений

Просмотреть файл

@ -27,9 +27,11 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = plugin
LIBRARY_NAME = npnulos2
EXPORT_LIBRARY = 1
RESFILE = npnulos2.res
REQUIRES = java \
plugin \
$(NULL)
CPPSRCS = \
@ -42,20 +44,25 @@ CPPSRCS = \
utils.cpp\
$(NULL)
RES_FILE = $(srcdir)/npnulos2.res
# plugins should always be shared, even in the "static" build
FORCE_SHARED_LIB = 1
NO_DIST_INSTALL = 1
NO_INSTALL = 1
include $(topsrcdir)/config/rules.mk
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS) \
$(NULL)
MOZ_POST_DSO_LIB_COMMAND = rc -n -x2 $(RES_FILE)
$(SHARED_LIBRARY): $(OBJS) $(RES_FILE)
$(RES_FILE): $(srcdir)/npnulos2.rc
ifneq ($(DEPTH),$(topsrcdir))
cp $(srcdir)/plugicon.ico ./plugicon.ico
cp $(srcdir)/resource.h ./resource.h
install-plugin: $(SHARED_LIBRARY)
ifdef SHARED_LIBRARY
$(INSTALL) $(SHARED_LIBRARY) $(DIST)/bin/plugins
endif
libs:: install-plugin
install:: $(SHARED_LIBRARY)
ifdef SHARED_LIBRARY
$(SYSINSTALL) $(IFLAGS2) $< $(DESTDIR)$(mozappdir)/plugins
endif
rc -n -x2 -r $(srcdir)/npnulos2.rc

Просмотреть файл

@ -39,21 +39,22 @@
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
extern char szAppName[];
#ifdef _DEBUG
void __cdecl dbgOut(LPSTR format, ...) {
void dbgOut(PSZ format, ...) {
static char buf[1024];
lstrcpy(buf, szAppName);
lstrcat(buf, ": ");
strcpy(buf, szAppName);
strcat(buf, ": ");
va_list va;
va_start(va, format);
wvsprintf(&buf[lstrlen(buf)], format, va);
vsprintf(&buf[strlen(buf)], format, va);
va_end(va);
lstrcat(buf, "\n");
OutputDebugString(buf);
strcat(buf, "\n");
printf("%s\n", buf);
}
#endif

Просмотреть файл

@ -40,7 +40,7 @@
#ifdef _DEBUG
void __cdecl dbgOut(LPSTR format, ...);
void dbgOut(PSZ format, ...);
#define dbgOut1(x) dbgOut(x)
#define dbgOut2(x,y) dbgOut(x, y)
#define dbgOut3(x,y,z) dbgOut(x, y, z)