Removing stricmp

master
boisso 8 years ago
parent 657aa3b1fb
commit e4d3f98568
  1. 19
      k-meleon/JSBridge/jsplugin.cpp
  2. 14
      k-meleon/bmp_menu/bmp_menu.cpp
  3. 22
      k-meleon/fullscreen/fullscreen.cpp
  4. 12
      k-meleon/gestures/gestures.cpp
  5. 20
      k-meleon/ie_favorites/ie_plugin.cpp
  6. 14
      k-meleon/login/login.cpp
  7. 22
      k-meleon/ns_bookmarks/ns_bookmarks.cpp
  8. 20
      k-meleon/op_hotlist/op_plugin.cpp
  9. 12
      k-meleon/privacy/privacy.cpp
  10. 14
      k-meleon/rebar_menu/rebar_menu.cpp
  11. 28
      k-meleon/sessions/sessions.cpp
  12. 26
      k-meleon/toolbars/toolbars.cpp

@ -60,6 +60,13 @@ static const nsModuleComponentInfo components =
static nsCOMPtr<nsIGenericFactory> componentFactory;
extern NS_COM_GLUE nsresult NS_NewGenericFactory(nsIGenericFactory* *result,
const nsModuleComponentInfo *info);
int Load()
{
cmdList = new CCmdList();
return 1;
}
BOOL Init()
{
nsCOMPtr<nsIComponentRegistrar> compReg;
@ -75,7 +82,7 @@ BOOL Init()
components.mContractID,
componentFactory);
cmdList = new CCmdList();
return NS_SUCCEEDED(rv) ? TRUE : FALSE;
}
@ -115,15 +122,17 @@ long DoMessage(const char *to, const char *from, const char *subject,
long data1, long data2)
{
if (to[0] == '*' || stricmp(to, kPlugin.dllname) == 0) {
if (stricmp(subject, "Init") == 0) {
if (strcmp(subject, "Init") == 0) {
Init();
}
else if (stricmp(subject, "Create") == 0) {
else if (strcmp(subject, "Load") == 0) {
Load();
}
else if (strcmp(subject, "Create") == 0) {
Create((HWND)data1);
}
else if (stricmp(subject, "Quit") == 0) {
else if (strcmp(subject, "Quit") == 0) {
Quit();
}

@ -118,26 +118,26 @@ HFONT gMenuFont = NULL;
long DoMessage(const char *to, const char *from, const char *subject, long data1, long data2)
{
if (to[0] == '*' || stricmp(to, kPlugin.dllname) == 0) {
if (to[0] == '*' || strcmp(to, kPlugin.dllname) == 0) {
if (stricmp(subject, "Init") == 0) {
Init();
}
else if (stricmp(subject, "Create") == 0) {
else if (strcmp(subject, "Create") == 0) {
Create((HWND)data1);
}
else if (stricmp(subject, "Config") == 0) {
else if (strcmp(subject, "Config") == 0) {
Config((HWND)data1);
}
else if (stricmp(subject, "Quit") == 0) {
else if (strcmp(subject, "Quit") == 0) {
Quit();
}
else if (stricmp(subject, "DoMenu") == 0) {
else if (strcmp(subject, "DoMenu") == 0) {
DoMenu((HMENU)data1, (char *)data2);
}
else if (stricmp(subject, "UnSetOwnerDrawn") == 0) {
else if (strcmp(subject, "UnSetOwnerDrawn") == 0) {
UnSetOwnerDrawn((HMENU)data1);
}
else if (stricmp(subject, "SetOwnerDrawn") == 0) {
else if (strcmp(subject, "SetOwnerDrawn") == 0) {
// if this menu has already been "ownerdrawn", then it's
// probably being called again as a result of an update,

@ -67,37 +67,37 @@ long DoMessage(const char *to, const char *from, const char *subject, long data1
if (stricmp(subject, "Load") == 0) {
Load();
}
else if (stricmp(subject, "Create") == 0) {
else if (strcmp(subject, "Create") == 0) {
Create((HWND)data1);
}
else if (stricmp(subject, "CreateTab") == 0) {
else if (strcmp(subject, "CreateTab") == 0) {
CreateTab((HWND)data1, (HWND)data2);
}
else if (stricmp(subject, "DestroyTab") == 0) {
else if (strcmp(subject, "DestroyTab") == 0) {
DestroyTab((HWND)data1, (HWND)data2);
}
else if (stricmp(subject, "SwitchTab") == 0) {
else if (strcmp(subject, "SwitchTab") == 0) {
SwitchTab((HWND)data1, (HWND)data2);
}
else if (stricmp(subject, "Config") == 0) {
else if (strcmp(subject, "Config") == 0) {
Config((HWND)data1);
}
else if (stricmp(subject, "Quit") == 0) {
else if (strcmp(subject, "Quit") == 0) {
Quit();
}
else if (stricmp(subject, "DoMenu") == 0) {
else if (strcmp(subject, "DoMenu") == 0) {
DoMenu((HMENU)data1, (char *)data2);
}
else if (stricmp(subject, "DoRebar") == 0) {
else if (strcmp(subject, "DoRebar") == 0) {
DoRebar((HWND)data1);
}
else if (stricmp(subject, "DoAccel") == 0) {
else if (strcmp(subject, "DoAccel") == 0) {
*(int *)data2 = DoAccel((char *)data1);
}
else if (stricmp(subject, "Destroy") == 0) {
else if (strcmp(subject, "Destroy") == 0) {
Destroy((HWND)data1);
}
else if (stricmp(subject, "DoLocale") == 0) {
else if (strcmp(subject, "DoLocale") == 0) {
if (gLoc) delete gLoc;
gLoc = Locale::kmInit(&kPlugin);
}

@ -77,22 +77,22 @@ long DoMessage(const char *to, const char *from, const char *subject, long data1
if (stricmp(subject, "Init") == 0) {
Init();
}
else if (stricmp(subject, "Create") == 0) {
else if (strcmp(subject, "Create") == 0) {
Create((HWND)data1);
}
else if (stricmp(subject, "Config") == 0) {
else if (strcmp(subject, "Config") == 0) {
Config((HWND)data1);
}
else if (stricmp(subject, "Quit") == 0) {
else if (strcmp(subject, "Quit") == 0) {
Quit();
}
else if (stricmp(subject, "DoMenu") == 0) {
else if (strcmp(subject, "DoMenu") == 0) {
DoMenu((HMENU)data1, (char *)data2);
}
else if (stricmp(subject, "DoRebar") == 0) {
else if (strcmp(subject, "DoRebar") == 0) {
DoRebar((HWND)data1);
}
else if (stricmp(subject, "DoAccel") == 0) {
else if (strcmp(subject, "DoAccel") == 0) {
*(int *)data2 = DoAccel((char *)data1);
}
else return 0;

@ -99,34 +99,34 @@ long DoMessage(const char *to, const char *from, const char *subject, long data1
if (stricmp(subject, "Load") == 0) {
Load();
}
else if (stricmp(subject, "Create") == 0) {
else if (strcmp(subject, "Create") == 0) {
Create((HWND)data1);
}
else if (stricmp(subject, "Config") == 0) {
else if (strcmp(subject, "Config") == 0) {
Config((HWND)data1);
}
else if (stricmp(subject, "Destroy") == 0) {
else if (strcmp(subject, "Destroy") == 0) {
Destroy((HWND)data1);
}
else if (stricmp(subject, "Quit") == 0) {
else if (strcmp(subject, "Quit") == 0) {
Quit();
}
else if (stricmp(subject, "DoMenu") == 0) {
else if (strcmp(subject, "DoMenu") == 0) {
DoMenu((HMENU)data1, (char *)data2);
}
else if (stricmp(subject, "DoRebar") == 0) {
else if (strcmp(subject, "DoRebar") == 0) {
DoRebar((HWND)data1);
}
else if (stricmp(subject, "DoAccel") == 0) {
else if (strcmp(subject, "DoAccel") == 0) {
*(int *)data2 = DoAccel((char *)data1);
}
else if (stricmp(subject, "AddLink") == 0) {
else if (strcmp(subject, "AddLink") == 0) {
addLink((char *)data1, (char *)data2);
}
else if (stricmp(subject, "FindNick") == 0) {
else if (strcmp(subject, "FindNick") == 0) {
findNick((char *)data1, (char **)data2);
}
else if (stricmp(subject, "DoLocale") == 0) {
else if (strcmp(subject, "DoLocale") == 0) {
if (gLoc) delete gLoc;
gLoc = Locale::kmInit(&kPlugin);
}

@ -74,25 +74,25 @@ long DoMessage(const char *to, const char *from, const char *subject, long data1
if (stricmp(subject, "Init") == 0) {
Init();
}
else if (stricmp(subject, "Create") == 0) {
else if (strcmp(subject, "Create") == 0) {
Create((HWND)data1);
}
else if (stricmp(subject, "CreateTab") == 0) {
else if (strcmp(subject, "CreateTab") == 0) {
CreateTab((HWND)data1, (HWND)data2);
}
else if (stricmp(subject, "DestroyTab") == 0) {
else if (strcmp(subject, "DestroyTab") == 0) {
DestroyTab((HWND)data1, (HWND)data2);
}
else if (stricmp(subject, "Config") == 0) {
else if (strcmp(subject, "Config") == 0) {
Config((HWND)data1);
}
else if (stricmp(subject, "Quit") == 0) {
else if (strcmp(subject, "Quit") == 0) {
Quit();
}
else if (stricmp(subject, "Destroy") == 0) {
else if (strcmp(subject, "Destroy") == 0) {
Destroy((HWND)data1);
}
else if (stricmp(subject, "DoMenu") == 0) {
else if (strcmp(subject, "DoMenu") == 0) {
DoMenu((HMENU)data1, (char *)data2);
}
else return 0;

@ -101,41 +101,41 @@ void Setup()
long DoMessage(const char *to, const char *from, const char *subject, long data1, long data2)
{
if (to[0] == '*' || stricmp(to, kPlugin.dllname) == 0) {
if (stricmp(subject, "Load") == 0) {
if (strcmp(subject, "Load") == 0) {
Load();
}
else if (stricmp(subject, "Config") == 0) {
else if (strcmp(subject, "Config") == 0) {
Config((HWND)data1);
}
else if (stricmp(subject, "Create") == 0) {
else if (strcmp(subject, "Create") == 0) {
Create((HWND)data1);
}
else if (stricmp(subject, "Close") == 0) {
else if (strcmp(subject, "Close") == 0) {
Close((HWND)data1);
}
else if (stricmp(subject, "Quit") == 0) {
else if (strcmp(subject, "Quit") == 0) {
Quit();
}
else if (stricmp(subject, "DoRebar") == 0) {
else if (strcmp(subject, "DoRebar") == 0) {
DoRebar((HWND)data1);
}
else if (stricmp(subject, "DoMenu") == 0) {
else if (strcmp(subject, "DoMenu") == 0) {
DoMenu((HMENU)data1, (char *)data2);
}
else if (stricmp(subject, "DoAccel") == 0) {
*(int *)data2 = DoAccel((char *)data1);
}
else if (stricmp(subject, "AddLink") == 0) {
else if (strcmp(subject, "AddLink") == 0) {
addLink((char *)data1, (char *)data2, BOOKMARK_FLAG_NB);
}
else if (stricmp(subject, "FindNick") == 0) {
else if (strcmp(subject, "FindNick") == 0) {
findNick((char *)data1, (char **)data2);
}
else if (stricmp(subject, "DoLocale") == 0) {
else if (strcmp(subject, "DoLocale") == 0) {
if (gLoc) delete gLoc;
gLoc = Locale::kmInit(&kPlugin);
}
else if (stricmp(subject, "Setup") == 0) {
else if (strcmp(subject, "Setup") == 0) {
Setup();
}
else return 0;

@ -99,39 +99,39 @@ long DoMessage(const char *to, const char *from, const char *subject, long data1
if (stricmp(subject, "Load") == 0) {
Load();
}
else if (stricmp(subject, "Create") == 0) {
else if (strcmp(subject, "Create") == 0) {
Create((HWND)data1);
}
else if (stricmp(subject, "Config") == 0) {
else if (strcmp(subject, "Config") == 0) {
Config((HWND)data1);
}
else if (stricmp(subject, "Destroy") == 0) {
else if (strcmp(subject, "Destroy") == 0) {
Destroy((HWND)data1);
}
else if (stricmp(subject, "Quit") == 0) {
else if (strcmp(subject, "Quit") == 0) {
Quit();
}
else if (stricmp(subject, "DoMenu") == 0) {
else if (strcmp(subject, "DoMenu") == 0) {
DoMenu((HMENU)data1, (char *)data2);
}
else if (stricmp(subject, "DoRebar") == 0) {
DoRebar((HWND)data1);
}
else if (stricmp(subject, "DoAccel") == 0) {
else if (strcmp(subject, "DoAccel") == 0) {
*(int *)data2 = DoAccel((char *)data1);
}
else if (stricmp(subject, "AddLink") == 0) {
else if (strcmp(subject, "AddLink") == 0) {
addLink((char *)data1, (char *)data2);
}
else if (stricmp(subject, "FindNick") == 0) {
else if (strcmp(subject, "FindNick") == 0) {
if (data1 && data2)
findNick((char *)data1, (char **)data2);
}
else if (stricmp(subject, "DoLocale") == 0) {
else if (strcmp(subject, "DoLocale") == 0) {
if (gLoc) delete gLoc;
gLoc = Locale::kmInit(&kPlugin);
}
else if (stricmp(subject, "Setup") == 0) {
else if (strcmp(subject, "Setup") == 0) {
Setup();
}
else return 0;

@ -345,22 +345,22 @@ void DoMenu(HMENU menu, LPSTR param)
string = action;
UINT command = 0;
if (stricmp(action, "Config") == 0) {
if (strcmp(action, "Config") == 0) {
command = cmdConfig;
}
else if (stricmp(action, "ClearCookies") == 0) {
else if (strcmp(action, "ClearCookies") == 0) {
command = cmdClearCookies;
}
else if (stricmp(action, "ClearHistory") == 0) {
else if (strcmp(action, "ClearHistory") == 0) {
command = cmdClearHistory;
}
else if (stricmp(action, "ClearCache") == 0) {
else if (strcmp(action, "ClearCache") == 0) {
command = cmdClearCache;
}
else if (stricmp(action, "ClearMRU") == 0) {
else if (strcmp(action, "ClearMRU") == 0) {
command = cmdClearMRU;
}
else if (stricmp(action, "ClearSignon") == 0) {
else if (strcmp(action, "ClearSignon") == 0) {
command = cmdClearSignon;
}
if (command) {

@ -72,28 +72,28 @@ kmeleonPlugin kPlugin = {
long DoMessage(const char *to, const char *from, const char *subject, long data1, long data2)
{
if (to[0] == '*' || stricmp(to, kPlugin.dllname) == 0) {
if (stricmp(subject, "Load") == 0) {
if (strcmp(subject, "Load") == 0) {
Load();
}
if (stricmp(subject, "Setup") == 0) {
if (strcmp(subject, "Setup") == 0) {
Setup();
}
else if (stricmp(subject, "Create") == 0) {
else if (strcmp(subject, "Create") == 0) {
Create((HWND)data1);
}
else if (stricmp(subject, "Config") == 0) {
Config((HWND)data1);
}
else if (stricmp(subject, "Quit") == 0) {
else if (strcmp(subject, "Quit") == 0) {
Quit();
}
else if (stricmp(subject, "DoRebar") == 0) {
else if (strcmp(subject, "DoRebar") == 0) {
DoRebar((HWND)data1);
}
else if (stricmp(subject, "DoAccel") == 0) {
else if (strcmp(subject, "DoAccel") == 0) {
*(int *)data2 = DoAccel((char *)data1);
}
else if (stricmp(subject, "DoLocale") == 0) {
else if (strcmp(subject, "DoLocale") == 0) {
DoLocale();
}

@ -166,13 +166,13 @@ void DeleteSession(const char* name)
long DoMessage(const char *to, const char *from, const char *subject, long data1, long data2)
{
if (to[0] == '*' || stricmp(to, kPlugin.dllname) == 0) {
if (stricmp(subject, "Load") == 0) {
if (strcmp(subject, "Load") == 0) {
return Load();
}
if (stricmp(subject, "UserSetup") == 0) {
if (strcmp(subject, "UserSetup") == 0) {
return Init();
}
else if (stricmp(subject, "SwitchTab") == 0) {
else if (strcmp(subject, "SwitchTab") == 0) {
int selected = 0;
Window* w = currentSession.getWindow(GetParent((HWND)data1));
if (w) {
@ -180,37 +180,37 @@ long DoMessage(const char *to, const char *from, const char *subject, long data1
w->selectedTab = selected;
}
}
else if (stricmp(subject, "Create") == 0) {
else if (strcmp(subject, "Create") == 0) {
Create((HWND)data1);
}
else if (stricmp(subject, "Destroy") == 0) {
else if (strcmp(subject, "Destroy") == 0) {
Destroy((HWND)data1);
}
else if (stricmp(subject, "CreateTab") == 0) {
else if (strcmp(subject, "CreateTab") == 0) {
CreateTab((HWND)data1, (HWND)data2);
}
else if (stricmp(subject, "DestroyTab") == 0) {
else if (strcmp(subject, "DestroyTab") == 0) {
DestroyTab((HWND)data1, (HWND)data2);
}
else if (stricmp(subject, "MoveTab") == 0) {
else if (strcmp(subject, "MoveTab") == 0) {
MoveTab((HWND)data1, (HWND)data2);
}
else if (stricmp(subject, "DoMenu") == 0) {
else if (strcmp(subject, "DoMenu") == 0) {
DoMenu((HMENU)data1, (char *)data2);
}
else if (stricmp(subject, "DoAccel") == 0) {
else if (strcmp(subject, "DoAccel") == 0) {
*(int *)data2 = DoAccel((char *)data1);
}
else if (stricmp(subject, "Config") == 0) {
else if (strcmp(subject, "Config") == 0) {
Config((HWND)data1);
}
else if (stricmp(subject, "Undo") == 0) {
else if (strcmp(subject, "Undo") == 0) {
Undo(0);
}
else if (stricmp(subject, "Quit") == 0) {
else if (strcmp(subject, "Quit") == 0) {
Quit();
}
else if (stricmp(subject, "DoLocale") == 0) {
else if (strcmp(subject, "DoLocale") == 0) {
if (gLoc) delete gLoc;
gLoc = Locale::kmInit(&kPlugin);
}

@ -75,43 +75,43 @@ long DoMessage(const char *to, const char *from, const char *subject, long data1
if (stricmp(subject, "Init") == 0) {
Setup();
}
else if (stricmp(subject, "Create") == 0) {
else if (strcmp(subject, "Create") == 0) {
Create((HWND)data1);
}
else if (stricmp(subject, "Config") == 0) {
else if (strcmp(subject, "Config") == 0) {
Config((HWND)data1);
}
else if (stricmp(subject, "Destroy") == 0) {
else if (strcmp(subject, "Destroy") == 0) {
Destroy((HWND)data1);
}
else if (stricmp(subject, "Quit") == 0) {
else if (strcmp(subject, "Quit") == 0) {
Quit();
}
else if (stricmp(subject, "DoRebar") == 0) {
else if (strcmp(subject, "DoRebar") == 0) {
DoRebar((HWND)data1);
}
else if (stricmp(subject, "GetConfigFiles") == 0) {
else if (strcmp(subject, "GetConfigFiles") == 0) {
*(int *)data2 = GetConfigFiles((configFileType**)data1);
}
else if (stricmp(subject, "SetButtonImage") == 0) {
else if (strcmp(subject, "SetButtonImage") == 0) {
SetButtonImage((char *)data1);
}
else if (stricmp(subject, "EnableButton") == 0) {
else if (strcmp(subject, "EnableButton") == 0) {
EnableButton((char *)data1);
}
else if (stricmp(subject, "IsButtonEnabled") == 0) {
else if (strcmp(subject, "IsButtonEnabled") == 0) {
*(int *)data2 = IsButtonEnabled((char *)data1);
}
else if (stricmp(subject, "CheckButton") == 0) {
else if (strcmp(subject, "CheckButton") == 0) {
CheckButton((char *)data1);
}
else if (stricmp(subject, "IsButtonChecked") == 0) {
else if (strcmp(subject, "IsButtonChecked") == 0) {
*(int *)data2 = IsButtonChecked((char *)data1);
}
else if (stricmp(subject, "AddToolbar") == 0) {
else if (strcmp(subject, "AddToolbar") == 0) {
*(int *)data2 = AddToolbarMsg((char *)data1);
}
else if (stricmp(subject, "AddButton") == 0) {
else if (strcmp(subject, "AddButton") == 0) {
*(int *)data2 = AddButtonMsg((char *)data1);
}
else return 0;

Loading…
Cancel
Save