Ignore:
Timestamp:
Apr 26, 2012, 10:51:16 PM (13 years ago)
Author:
dmik
Message:

icedtea-web: Port plugin to OS/2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/icedtea-web/plugin/icedteanp/IcedTeaNPPlugin.cc

    r348 r357  
    3737exception statement from your version. */
    3838
     39#ifdef __OS2__
     40// OS/2 includes.
     41#define INCL_PM
     42#include <os2.h>
     43#endif
     44
    3945// System includes.
    4046#include <dlfcn.h>
     
    5157#include "IcedTeaScriptablePluginObject.h"
    5258#include "IcedTeaNPPlugin.h"
     59
     60#include "OS.h"
    5361
    5462#if MOZILLA_VERSION_COLLAPSED < 1090100
     
    10791087plugin_display_failure_dialog ()
    10801088{
     1089#ifdef __OS2__
     1090  gchar *msg = NULL;
     1091
     1092  PLUGIN_DEBUG ("plugin_display_failure_dialog\n");
     1093
     1094  msg = g_strdup_printf (FAILURE_MESSAGE, appletviewer_executable);
     1095  WinMessageBox (HWND_DESKTOP, HWND_DESKTOP,
     1096                 msg, "Error", 0, MB_ERROR | MB_OK);
     1097  g_free(msg);
     1098#else
    10811099  GtkWidget* dialog = NULL;
    10821100
     
    10921110  gtk_dialog_run (GTK_DIALOG (dialog));
    10931111  gtk_widget_destroy (dialog);
     1112#endif
    10941113
    10951114  PLUGIN_DEBUG ("plugin_display_failure_dialog return\n");
     
    15341553      command_line = (gchar**) malloc(sizeof(gchar*)*11);
    15351554      command_line[cmd_num++] = g_strdup(appletviewer_executable);
    1536       command_line[cmd_num++] = g_strdup(PLUGIN_BOOTCLASSPATH);
     1555      command_line[cmd_num++] = g_strdup_printf(PLUGIN_BOOTCLASSPATH);
    15371556      // set the classpath to avoid using the default (cwd).
    15381557      command_line[cmd_num++] = g_strdup("-classpath");
     
    15551574      command_line = (gchar**) malloc(sizeof(gchar*)*8);
    15561575      command_line[cmd_num++] = g_strdup(appletviewer_executable);
    1557       command_line[cmd_num++] = g_strdup(PLUGIN_BOOTCLASSPATH);
     1576      command_line[cmd_num++] = g_strdup_printf(PLUGIN_BOOTCLASSPATH);
    15581577      command_line[cmd_num++] = g_strdup("-classpath");
    15591578      command_line[cmd_num++] = g_strdup_printf("%s/lib/rt.jar", ICEDTEA_WEB_JRE);
     
    22632282// Returns a string describing the MIME type that this plugin
    22642283// handles.
    2265 char*
     2284const char*
    22662285NP_GetMIMEDescription ()
    22672286{
     
    22702289  PLUGIN_DEBUG ("NP_GetMIMEDescription return\n");
    22712290
    2272   return (char*) PLUGIN_MIME_DESC;
     2291  return PLUGIN_MIME_DESC;
    22732292}
    22742293
Note: See TracChangeset for help on using the changeset viewer.