mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Fix build warnings.
This commit is contained in:
parent
51eb48d73b
commit
e33e65a165
@ -2248,7 +2248,6 @@ PRInt32
|
|||||||
nsJSSecurityManager::CheckForPrivilege(JSContext *cx, char *prop_name, int priv_code)
|
nsJSSecurityManager::CheckForPrivilege(JSContext *cx, char *prop_name, int priv_code)
|
||||||
{
|
{
|
||||||
char *tmp_prop_name;
|
char *tmp_prop_name;
|
||||||
JSBool priv = JS_TRUE;
|
|
||||||
|
|
||||||
if(prop_name == NULL) {
|
if(prop_name == NULL) {
|
||||||
return SCRIPT_SECURITY_NO_ACCESS;
|
return SCRIPT_SECURITY_NO_ACCESS;
|
||||||
@ -3017,4 +3016,4 @@ nsJSSecurityManager::CanSetProperty(JSContext * aJSContext,
|
|||||||
const jsid aName)
|
const jsid aName)
|
||||||
{
|
{
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
@ -224,6 +224,8 @@ extern XP_Bool XP_FileNameContainsBadChars (const char *name)
|
|||||||
|
|
||||||
#if defined(XP_UNIX) || defined(XP_BEOS)
|
#if defined(XP_UNIX) || defined(XP_BEOS)
|
||||||
|
|
||||||
|
#include <unistd.h> /* for fsync & getpid */
|
||||||
|
|
||||||
/* This is just like fclose(), except that it does fflush() and fsync() first,
|
/* This is just like fclose(), except that it does fflush() and fsync() first,
|
||||||
to ensure that the bits have made it to the disk before we return.
|
to ensure that the bits have made it to the disk before we return.
|
||||||
*/
|
*/
|
||||||
@ -264,8 +266,6 @@ XP_END_PROTOS
|
|||||||
|
|
||||||
#if defined(XP_UNIX) || defined(XP_BEOS)
|
#if defined(XP_UNIX) || defined(XP_BEOS)
|
||||||
|
|
||||||
#include <unistd.h> /* for getpid */
|
|
||||||
|
|
||||||
#ifdef TRACE
|
#ifdef TRACE
|
||||||
#define Debug 1
|
#define Debug 1
|
||||||
#define DO_TRACE(x) if (xp_file_debug) XP_TRACE(x)
|
#define DO_TRACE(x) if (xp_file_debug) XP_TRACE(x)
|
||||||
@ -482,12 +482,12 @@ int XP_FileTruncate(const char* name, XP_FileType type, int32 length)
|
|||||||
*/
|
*/
|
||||||
int XP_FileWrite (const void* source, int32 count, XP_File file)
|
int XP_FileWrite (const void* source, int32 count, XP_File file)
|
||||||
{
|
{
|
||||||
int32 realCount;
|
uint32 realCount;
|
||||||
|
|
||||||
if ( count < 0 )
|
if ( count < 0 )
|
||||||
realCount = XP_STRLEN( source );
|
realCount = XP_STRLEN( source );
|
||||||
else
|
else
|
||||||
realCount = count;
|
realCount = (uint32)count;
|
||||||
|
|
||||||
return( fwrite( source, 1, realCount, file ) );
|
return( fwrite( source, 1, realCount, file ) );
|
||||||
}
|
}
|
||||||
@ -1146,7 +1146,6 @@ xp_FileName (const char *name, XP_FileType type, char* buf, char* configBuf)
|
|||||||
sprintf(buf, "%.900s/%s", conf_dir, policyFN);
|
sprintf(buf, "%.900s/%s", conf_dir, policyFN);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif /* MOZ_SECURITY */
|
|
||||||
|
|
||||||
case xpSecurityModule:
|
case xpSecurityModule:
|
||||||
{
|
{
|
||||||
@ -1163,6 +1162,7 @@ xp_FileName (const char *name, XP_FileType type, char* buf, char* configBuf)
|
|||||||
HG06196
|
HG06196
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#endif /* MOZ_SECURITY */
|
||||||
|
|
||||||
case xpPKCS12File:
|
case xpPKCS12File:
|
||||||
/* Convert /a/b/c/foo to /a/b/c/foo.p12 (note leading dot) */
|
/* Convert /a/b/c/foo to /a/b/c/foo.p12 (note leading dot) */
|
||||||
|
@ -50,38 +50,17 @@ static char* GetFileName(const char* pathname)
|
|||||||
static PRUint32 CalculateVariantCount(char* mimeTypes)
|
static PRUint32 CalculateVariantCount(char* mimeTypes)
|
||||||
{
|
{
|
||||||
PRUint32 variants = 0;
|
PRUint32 variants = 0;
|
||||||
char* index = mimeTypes;
|
char* ptr = mimeTypes;
|
||||||
while (*index)
|
while (*ptr)
|
||||||
{
|
{
|
||||||
if (*index == ';')
|
if (*ptr == ';')
|
||||||
variants++;
|
variants++;
|
||||||
|
|
||||||
++index;
|
++ptr;
|
||||||
}
|
}
|
||||||
return variants;
|
return variants;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char** MakeStringArray(PRUint32 variants, char* data)
|
|
||||||
{
|
|
||||||
char** buffer = NULL;
|
|
||||||
char* index = data;
|
|
||||||
PRUint32 count = 0;
|
|
||||||
|
|
||||||
buffer = (char **)PR_Malloc(variants * sizeof(char *));
|
|
||||||
buffer[count++] = index;
|
|
||||||
|
|
||||||
while (*index && count<variants)
|
|
||||||
{
|
|
||||||
if (*index == '|')
|
|
||||||
{
|
|
||||||
buffer[count++] = index + 1;
|
|
||||||
*index = 0;
|
|
||||||
}
|
|
||||||
++index;
|
|
||||||
}
|
|
||||||
return buffer;
|
|
||||||
}
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
/* nsPluginsDir implementation */
|
/* nsPluginsDir implementation */
|
||||||
@ -149,7 +128,7 @@ nsresult nsPluginFile::LoadPlugin(PRLibrary* &outLibrary)
|
|||||||
pLibrary = outLibrary = PR_LoadLibrary(path);
|
pLibrary = outLibrary = PR_LoadLibrary(path);
|
||||||
|
|
||||||
#ifdef NS_DEBUG
|
#ifdef NS_DEBUG
|
||||||
printf("LoadPlugin() %s returned %lx\n",path,pLibrary);
|
printf("LoadPlugin() %s returned %lx\n",path,(unsigned long)pLibrary);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
@ -170,7 +149,7 @@ nsresult nsPluginFile::GetPluginInfo(nsPluginInfo& info)
|
|||||||
UNIX_Plugin_GetMIMEDescription procedure = nsnull;
|
UNIX_Plugin_GetMIMEDescription procedure = nsnull;
|
||||||
mimedescr=(char *)"";
|
mimedescr=(char *)"";
|
||||||
|
|
||||||
if(procedure = (UNIX_Plugin_GetMIMEDescription)PR_FindSymbol(pLibrary,"NP_GetMIMEDescription")) {
|
if((procedure = (UNIX_Plugin_GetMIMEDescription)PR_FindSymbol(pLibrary,"NP_GetMIMEDescription")) != 0) {
|
||||||
mimedescr = procedure();
|
mimedescr = procedure();
|
||||||
} else {
|
} else {
|
||||||
#ifdef NS_DEBUG
|
#ifdef NS_DEBUG
|
||||||
@ -182,7 +161,8 @@ nsresult nsPluginFile::GetPluginInfo(nsPluginInfo& info)
|
|||||||
info.fName = GetFileName(path);
|
info.fName = GetFileName(path);
|
||||||
|
|
||||||
#ifdef NS_DEBUG
|
#ifdef NS_DEBUG
|
||||||
printf("GetMIMEDescription() %lx returned \"%s\"\n",procedure,mimedescr);
|
printf("GetMIMEDescription() %lx returned \"%s\"\n",
|
||||||
|
(unsigned long)procedure, mimedescr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// copy string
|
// copy string
|
||||||
@ -200,8 +180,8 @@ nsresult nsPluginFile::GetPluginInfo(nsPluginInfo& info)
|
|||||||
for(i=0;i<num && *start;i++) {
|
for(i=0;i<num && *start;i++) {
|
||||||
// search start of next token (separator is ';')
|
// search start of next token (separator is ';')
|
||||||
|
|
||||||
if(i+1<num) {
|
if(i+1 < num) {
|
||||||
if(nexttoc=PL_strchr(start, ';'))
|
if((nexttoc=PL_strchr(start, ';')) != 0)
|
||||||
*nexttoc++=0;
|
*nexttoc++=0;
|
||||||
else
|
else
|
||||||
nexttoc=start+strlen(start);
|
nexttoc=start+strlen(start);
|
||||||
|
@ -50,38 +50,17 @@ static char* GetFileName(const char* pathname)
|
|||||||
static PRUint32 CalculateVariantCount(char* mimeTypes)
|
static PRUint32 CalculateVariantCount(char* mimeTypes)
|
||||||
{
|
{
|
||||||
PRUint32 variants = 0;
|
PRUint32 variants = 0;
|
||||||
char* index = mimeTypes;
|
char* ptr = mimeTypes;
|
||||||
while (*index)
|
while (*ptr)
|
||||||
{
|
{
|
||||||
if (*index == ';')
|
if (*ptr == ';')
|
||||||
variants++;
|
variants++;
|
||||||
|
|
||||||
++index;
|
++ptr;
|
||||||
}
|
}
|
||||||
return variants;
|
return variants;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char** MakeStringArray(PRUint32 variants, char* data)
|
|
||||||
{
|
|
||||||
char** buffer = NULL;
|
|
||||||
char* index = data;
|
|
||||||
PRUint32 count = 0;
|
|
||||||
|
|
||||||
buffer = (char **)PR_Malloc(variants * sizeof(char *));
|
|
||||||
buffer[count++] = index;
|
|
||||||
|
|
||||||
while (*index && count<variants)
|
|
||||||
{
|
|
||||||
if (*index == '|')
|
|
||||||
{
|
|
||||||
buffer[count++] = index + 1;
|
|
||||||
*index = 0;
|
|
||||||
}
|
|
||||||
++index;
|
|
||||||
}
|
|
||||||
return buffer;
|
|
||||||
}
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
/* nsPluginsDir implementation */
|
/* nsPluginsDir implementation */
|
||||||
@ -149,7 +128,7 @@ nsresult nsPluginFile::LoadPlugin(PRLibrary* &outLibrary)
|
|||||||
pLibrary = outLibrary = PR_LoadLibrary(path);
|
pLibrary = outLibrary = PR_LoadLibrary(path);
|
||||||
|
|
||||||
#ifdef NS_DEBUG
|
#ifdef NS_DEBUG
|
||||||
printf("LoadPlugin() %s returned %lx\n",path,pLibrary);
|
printf("LoadPlugin() %s returned %lx\n",path,(unsigned long)pLibrary);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
@ -170,7 +149,7 @@ nsresult nsPluginFile::GetPluginInfo(nsPluginInfo& info)
|
|||||||
UNIX_Plugin_GetMIMEDescription procedure = nsnull;
|
UNIX_Plugin_GetMIMEDescription procedure = nsnull;
|
||||||
mimedescr=(char *)"";
|
mimedescr=(char *)"";
|
||||||
|
|
||||||
if(procedure = (UNIX_Plugin_GetMIMEDescription)PR_FindSymbol(pLibrary,"NP_GetMIMEDescription")) {
|
if((procedure = (UNIX_Plugin_GetMIMEDescription)PR_FindSymbol(pLibrary,"NP_GetMIMEDescription")) != 0) {
|
||||||
mimedescr = procedure();
|
mimedescr = procedure();
|
||||||
} else {
|
} else {
|
||||||
#ifdef NS_DEBUG
|
#ifdef NS_DEBUG
|
||||||
@ -182,7 +161,8 @@ nsresult nsPluginFile::GetPluginInfo(nsPluginInfo& info)
|
|||||||
info.fName = GetFileName(path);
|
info.fName = GetFileName(path);
|
||||||
|
|
||||||
#ifdef NS_DEBUG
|
#ifdef NS_DEBUG
|
||||||
printf("GetMIMEDescription() %lx returned \"%s\"\n",procedure,mimedescr);
|
printf("GetMIMEDescription() %lx returned \"%s\"\n",
|
||||||
|
(unsigned long)procedure, mimedescr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// copy string
|
// copy string
|
||||||
@ -200,8 +180,8 @@ nsresult nsPluginFile::GetPluginInfo(nsPluginInfo& info)
|
|||||||
for(i=0;i<num && *start;i++) {
|
for(i=0;i<num && *start;i++) {
|
||||||
// search start of next token (separator is ';')
|
// search start of next token (separator is ';')
|
||||||
|
|
||||||
if(i+1<num) {
|
if(i+1 < num) {
|
||||||
if(nexttoc=PL_strchr(start, ';'))
|
if((nexttoc=PL_strchr(start, ';')) != 0)
|
||||||
*nexttoc++=0;
|
*nexttoc++=0;
|
||||||
else
|
else
|
||||||
nexttoc=start+strlen(start);
|
nexttoc=start+strlen(start);
|
||||||
|
@ -75,7 +75,7 @@ nsITextAreaWidget *textWidgetInstance = NULL;
|
|||||||
nsITextWidget *passwordText = NULL;
|
nsITextWidget *passwordText = NULL;
|
||||||
|
|
||||||
nsIComboBox *comboBox = NULL;
|
nsIComboBox *comboBox = NULL;
|
||||||
nsIListBox *listBox = NULL;
|
nsIListBox *gListBox = NULL;
|
||||||
nsIListBox *gMultiListBox = NULL;
|
nsIListBox *gMultiListBox = NULL;
|
||||||
|
|
||||||
nsIWidget *movingWidget = NULL;
|
nsIWidget *movingWidget = NULL;
|
||||||
@ -258,9 +258,9 @@ void listSelfTest(FILE * fd, char * aTitle, nsIListWidget * listBox) {
|
|||||||
|
|
||||||
int i;
|
int i;
|
||||||
for (i=0;i<(int)listBox->GetItemCount();i++) {
|
for (i=0;i<(int)listBox->GetItemCount();i++) {
|
||||||
nsAutoString buf;
|
nsAutoString buf2;
|
||||||
listBox->GetItemAt(buf, i);
|
listBox->GetItemAt(buf2, i);
|
||||||
char * str = buf.ToNewCString();
|
char * str = buf2.ToNewCString();
|
||||||
|
|
||||||
fprintf(fd, "Item %d [%s]\n", i, str);fflush(fd);
|
fprintf(fd, "Item %d [%s]\n", i, str);fflush(fd);
|
||||||
|
|
||||||
@ -273,9 +273,9 @@ void listSelfTest(FILE * fd, char * aTitle, nsIListWidget * listBox) {
|
|||||||
fprintf(fd, "\nTesting RemoveItemAt\n\tTest: [%s]\n", eval(-1 == (int)listBox->FindItem(item4string, 0))); fflush(fd);
|
fprintf(fd, "\nTesting RemoveItemAt\n\tTest: [%s]\n", eval(-1 == (int)listBox->FindItem(item4string, 0))); fflush(fd);
|
||||||
|
|
||||||
for (i=0;i<(int)listBox->GetItemCount();i++) {
|
for (i=0;i<(int)listBox->GetItemCount();i++) {
|
||||||
nsAutoString buf;
|
nsAutoString buf2;
|
||||||
listBox->GetItemAt(buf, i);
|
listBox->GetItemAt(buf2, i);
|
||||||
char * str = buf.ToNewCString();
|
char * str = buf2.ToNewCString();
|
||||||
|
|
||||||
fprintf(fd, "Item %d [%s]\n", i, str);fflush(fd);
|
fprintf(fd, "Item %d [%s]\n", i, str);fflush(fd);
|
||||||
|
|
||||||
@ -393,9 +393,9 @@ void multiListSelfTest(FILE * fd, char * aTitle, nsIListBox * listBox) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i=0;i<(int)multi->GetItemCount();i++) {
|
for (i=0;i<(int)multi->GetItemCount();i++) {
|
||||||
nsAutoString buf;
|
nsAutoString buf2;
|
||||||
multi->GetItemAt(buf, i);
|
multi->GetItemAt(buf2, i);
|
||||||
char * str = buf.ToNewCString();
|
char * str = buf2.ToNewCString();
|
||||||
|
|
||||||
fprintf(fd, "Item %d [%s]\n", i, str);fflush(fd);
|
fprintf(fd, "Item %d [%s]\n", i, str);fflush(fd);
|
||||||
|
|
||||||
@ -408,9 +408,9 @@ void multiListSelfTest(FILE * fd, char * aTitle, nsIListBox * listBox) {
|
|||||||
fprintf(fd, "\nTesting RemoveItemAt\n\tTest: [%s]\n", eval(-1 == (int)multi->FindItem(item4string, (PRInt32)0))); fflush(fd);
|
fprintf(fd, "\nTesting RemoveItemAt\n\tTest: [%s]\n", eval(-1 == (int)multi->FindItem(item4string, (PRInt32)0))); fflush(fd);
|
||||||
|
|
||||||
for (i=0;i<(int)multi->GetItemCount();i++) {
|
for (i=0;i<(int)multi->GetItemCount();i++) {
|
||||||
nsAutoString buf;
|
nsAutoString buf2;
|
||||||
multi->GetItemAt(buf, i);
|
multi->GetItemAt(buf2, i);
|
||||||
char * str = buf.ToNewCString();
|
char * str = buf2.ToNewCString();
|
||||||
|
|
||||||
fprintf(fd, "Item %d [%s]\n", i, str);fflush(fd);
|
fprintf(fd, "Item %d [%s]\n", i, str);fflush(fd);
|
||||||
|
|
||||||
@ -471,7 +471,7 @@ nsITooltipWidget* createTooltipWindow(nsIWidget * aWin,
|
|||||||
nsIWidget* toolTipWidget;
|
nsIWidget* toolTipWidget;
|
||||||
if (NS_OK == tooltip->QueryInterface(kIWidgetIID,(void**)&toolTipWidget))
|
if (NS_OK == tooltip->QueryInterface(kIWidgetIID,(void**)&toolTipWidget))
|
||||||
{
|
{
|
||||||
nsIButton *toolTipButton = createSimpleButton(toolTipWidget, "tooltip",5, 5, 80, 0);
|
/*nsIButton *toolTipButton =*/ createSimpleButton(toolTipWidget, "tooltip",5, 5, 80, 0);
|
||||||
NS_RELEASE(toolTipWidget);
|
NS_RELEASE(toolTipWidget);
|
||||||
}
|
}
|
||||||
return tooltip;
|
return tooltip;
|
||||||
@ -551,10 +551,10 @@ nsEventStatus PR_CALLBACK ListBoxTestHandleEvent(nsGUIEvent *aEvent)
|
|||||||
{
|
{
|
||||||
nsEventStatus result = nsEventStatus_eIgnore;
|
nsEventStatus result = nsEventStatus_eIgnore;
|
||||||
nsIListWidget* widget = nsnull;
|
nsIListWidget* widget = nsnull;
|
||||||
if (listBox != nsnull && NS_OK == listBox->QueryInterface(kIListWidgetIID,(void**)&widget))
|
if (gListBox != nsnull && NS_OK == gListBox->QueryInterface(kIListWidgetIID,(void**)&widget))
|
||||||
{
|
{
|
||||||
result = GenericListHandleEvent(aEvent, "ListBox", widget);
|
result = GenericListHandleEvent(aEvent, "ListBox", widget);
|
||||||
NS_RELEASE(listBox);
|
NS_RELEASE(gListBox);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -583,12 +583,11 @@ nsEventStatus PR_CALLBACK MultiListBoxTestHandleEvent(nsGUIEvent *aEvent)
|
|||||||
if (!strcmp(title, kSetSelection)) {
|
if (!strcmp(title, kSetSelection)) {
|
||||||
gMultiListBox->Deselect();
|
gMultiListBox->Deselect();
|
||||||
|
|
||||||
PRInt32 inxs[] = {0,2,4};
|
|
||||||
PRInt32 len = 3;
|
PRInt32 len = 3;
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
for (i=0;i<len;i++) {
|
for (i=0;i<len;i++) {
|
||||||
gMultiListBox->SelectItem(2);//inxs[i]);
|
gMultiListBox->SelectItem(2);
|
||||||
}
|
}
|
||||||
fprintf(gFD, "\tTested SelectItem()\n");
|
fprintf(gFD, "\tTested SelectItem()\n");
|
||||||
str.Append(" should show 'List Item 0,2,5'");
|
str.Append(" should show 'List Item 0,2,5'");
|
||||||
@ -596,7 +595,6 @@ nsEventStatus PR_CALLBACK MultiListBoxTestHandleEvent(nsGUIEvent *aEvent)
|
|||||||
gFailedMsg = "Multi-List::SelectItem";
|
gFailedMsg = "Multi-List::SelectItem";
|
||||||
} else if (!strcmp(title, kSetSelectedIndices)) {
|
} else if (!strcmp(title, kSetSelectedIndices)) {
|
||||||
PRInt32 inxs[] = {0,2,4};
|
PRInt32 inxs[] = {0,2,4};
|
||||||
PRInt32 len = 3;
|
|
||||||
gMultiListBox->SetSelectedIndices(inxs, 3);
|
gMultiListBox->SetSelectedIndices(inxs, 3);
|
||||||
} else if (!strcmp(title, kRemoveSelection)) {
|
} else if (!strcmp(title, kRemoveSelection)) {
|
||||||
nsString item2("Multi List Item 2");
|
nsString item2("Multi List Item 2");
|
||||||
@ -904,12 +902,12 @@ nsEventStatus PR_CALLBACK HandleEvent(nsGUIEvent *aEvent)
|
|||||||
NS_ShowWidget(tooltipWindow,PR_FALSE);
|
NS_ShowWidget(tooltipWindow,PR_FALSE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NS_MOVE:
|
case NS_MOVE: {
|
||||||
char str[256];
|
char str[256];
|
||||||
sprintf(str, "Moved window to %d,%d", aEvent->point.x, aEvent->point.y);
|
sprintf(str, "Moved window to %d,%d", aEvent->point.x, aEvent->point.y);
|
||||||
statusText->SetText(str,actualSize);
|
statusText->SetText(str,actualSize);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case NS_MOUSE_LEFT_DOUBLECLICK:
|
case NS_MOUSE_LEFT_DOUBLECLICK:
|
||||||
statusText->SetText("Left button double click",actualSize);
|
statusText->SetText("Left button double click",actualSize);
|
||||||
break;
|
break;
|
||||||
@ -919,11 +917,13 @@ nsEventStatus PR_CALLBACK HandleEvent(nsGUIEvent *aEvent)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case NS_MOUSE_ENTER:
|
case NS_MOUSE_ENTER:
|
||||||
if (DEBUG_MOUSE) printf("NS_MOUSE_ENTER 0x%X\n", aEvent->widget);
|
if (DEBUG_MOUSE) printf("NS_MOUSE_ENTER 0x%X\n",
|
||||||
|
(unsigned int)aEvent->widget);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NS_MOUSE_EXIT:
|
case NS_MOUSE_EXIT:
|
||||||
if (DEBUG_MOUSE) printf("NS_MOUSE_EXIT 0x%X\n", aEvent->widget);
|
if (DEBUG_MOUSE) printf("NS_MOUSE_EXIT 0x%X\n",
|
||||||
|
(unsigned int)aEvent->widget);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NS_MOUSE_MOVE:
|
case NS_MOUSE_MOVE:
|
||||||
@ -936,7 +936,9 @@ nsEventStatus PR_CALLBACK HandleEvent(nsGUIEvent *aEvent)
|
|||||||
for (i=0;i<gNumRadioBtns;i++) {
|
for (i=0;i<gNumRadioBtns;i++) {
|
||||||
nsIWidget * win;
|
nsIWidget * win;
|
||||||
if (NS_OK == gRadioBtns[i]->QueryInterface(kIWidgetIID, (void**)&win)) {
|
if (NS_OK == gRadioBtns[i]->QueryInterface(kIWidgetIID, (void**)&win)) {
|
||||||
printf("%d 0x%x 0x%x\n", i, win, aEvent->widget);
|
printf("%d 0x%x 0x%x\n", i,
|
||||||
|
(unsigned int)win,
|
||||||
|
(unsigned int)aEvent->widget);
|
||||||
if (win == aEvent->widget) {
|
if (win == aEvent->widget) {
|
||||||
gRadioBtns[i]->SetState(PR_TRUE);
|
gRadioBtns[i]->SetState(PR_TRUE);
|
||||||
} else {
|
} else {
|
||||||
@ -1164,10 +1166,10 @@ nsEventStatus PR_CALLBACK DoSelfTests(nsGUIEvent *aEvent)
|
|||||||
|
|
||||||
textSelfTest(gFD, "Password Text", passwordText);
|
textSelfTest(gFD, "Password Text", passwordText);
|
||||||
|
|
||||||
if (listBox)
|
if (gListBox)
|
||||||
{
|
{
|
||||||
nsIListWidget* widget;
|
nsIListWidget* widget;
|
||||||
if (NS_OK == listBox->QueryInterface(kIListWidgetIID,(void**)&widget))
|
if (NS_OK == gListBox->QueryInterface(kIListWidgetIID,(void**)&widget))
|
||||||
{
|
{
|
||||||
listSelfTest(gFD, "ListBox", widget);
|
listSelfTest(gFD, "ListBox", widget);
|
||||||
NS_RELEASE(widget);
|
NS_RELEASE(widget);
|
||||||
@ -1527,14 +1529,14 @@ nsresult WidgetTest(int *argc, char **argv)
|
|||||||
y = saveY;
|
y = saveY;
|
||||||
x = saveX;
|
x = saveX;
|
||||||
rect.SetRect(x, y, 150, 100);
|
rect.SetRect(x, y, 150, 100);
|
||||||
nsComponentManager::CreateInstance(kCListBoxCID, nsnull, kIListBoxIID, (void**)&listBox);
|
nsComponentManager::CreateInstance(kCListBoxCID, nsnull, kIListBoxIID, (void**)&gListBox);
|
||||||
if (listBox)
|
if (gListBox)
|
||||||
{
|
{
|
||||||
NS_CreateListBox(window,listBox,rect,HandleEvent);
|
NS_CreateListBox(window,gListBox,rect,HandleEvent);
|
||||||
for (i=0;i<NUM_COMBOBOX_ITEMS;i++) {
|
for (i=0;i<NUM_COMBOBOX_ITEMS;i++) {
|
||||||
sprintf(str, "%s %d", "List Item", i);
|
sprintf(str, "%s %d", "List Item", i);
|
||||||
nsString listStr1(str);
|
nsString listStr1(str);
|
||||||
listBox->AddItemAt(listStr1, i);
|
gListBox->AddItemAt(listStr1, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,18 +223,18 @@ TestSearch(const char* delim, PRUint32 segDataSize)
|
|||||||
rv = NS_NewBuffer(&buffer, segSize, bufSize, nsnull);
|
rv = NS_NewBuffer(&buffer, segSize, bufSize, nsnull);
|
||||||
NS_ASSERTION(NS_SUCCEEDED(rv), "NewBuffer failed");
|
NS_ASSERTION(NS_SUCCEEDED(rv), "NewBuffer failed");
|
||||||
|
|
||||||
PRUint32 i, amt;
|
PRUint32 i, j, amt;
|
||||||
PRUint32 delimLen = nsCRT::strlen(delim);
|
PRUint32 delimLen = nsCRT::strlen(delim);
|
||||||
for (i = 0; i < bufDataSize; i++) {
|
for (i = 0; i < bufDataSize; i++) {
|
||||||
// first fill the buffer
|
// first fill the buffer
|
||||||
for (PRUint32 j = 0; j < i; j++) {
|
for (j = 0; j < i; j++) {
|
||||||
rv = buffer->Write("-", 1, &amt);
|
rv = buffer->Write("-", 1, &amt);
|
||||||
NS_ASSERTION(NS_SUCCEEDED(rv) && amt == 1, "Write failed");
|
NS_ASSERTION(NS_SUCCEEDED(rv) && amt == 1, "Write failed");
|
||||||
}
|
}
|
||||||
rv = buffer->Write(delim, delimLen, &amt);
|
rv = buffer->Write(delim, delimLen, &amt);
|
||||||
NS_ASSERTION(NS_SUCCEEDED(rv), "Write failed");
|
NS_ASSERTION(NS_SUCCEEDED(rv), "Write failed");
|
||||||
if (i + amt < bufDataSize) {
|
if (i + amt < bufDataSize) {
|
||||||
for (PRUint32 j = i + amt; j < bufDataSize; j++) {
|
for (j = i + amt; j < bufDataSize; j++) {
|
||||||
rv = buffer->Write("+", 1, &amt);
|
rv = buffer->Write("+", 1, &amt);
|
||||||
NS_ASSERTION(NS_SUCCEEDED(rv) && amt == 1, "Write failed");
|
NS_ASSERTION(NS_SUCCEEDED(rv) && amt == 1, "Write failed");
|
||||||
}
|
}
|
||||||
|
@ -403,7 +403,6 @@ type_declaration(TreeState *state)
|
|||||||
*/
|
*/
|
||||||
IDL_tree type = IDL_TYPE_DCL(state->tree).type_spec;
|
IDL_tree type = IDL_TYPE_DCL(state->tree).type_spec;
|
||||||
IDL_tree dcls = IDL_TYPE_DCL(state->tree).dcls;
|
IDL_tree dcls = IDL_TYPE_DCL(state->tree).dcls;
|
||||||
IDL_tree complex = NULL;
|
|
||||||
|
|
||||||
/* XXX: check for illegal types */
|
/* XXX: check for illegal types */
|
||||||
|
|
||||||
|
@ -237,13 +237,6 @@ int main(int argc, char* argv[])
|
|||||||
// XXX: This call will be replaced by a registry initialization...
|
// XXX: This call will be replaced by a registry initialization...
|
||||||
NS_SetupRegistry_1();
|
NS_SetupRegistry_1();
|
||||||
|
|
||||||
nsIFileLocator* locator = nsnull;
|
|
||||||
rv = nsServiceManager::GetService(kFileLocatorCID, nsIFileLocator::GetIID(), (nsISupports**)&locator);
|
|
||||||
if (NS_FAILED(rv))
|
|
||||||
return rv;
|
|
||||||
if (!locator)
|
|
||||||
return NS_ERROR_FAILURE;
|
|
||||||
|
|
||||||
// get and start the ProfileManager service
|
// get and start the ProfileManager service
|
||||||
#if defined(NS_USING_PROFILES)
|
#if defined(NS_USING_PROFILES)
|
||||||
rv = nsServiceManager::GetService(kProfileCID,
|
rv = nsServiceManager::GetService(kProfileCID,
|
||||||
@ -345,8 +338,10 @@ int main(int argc, char* argv[])
|
|||||||
// No directory name provided. Get File Locator
|
// No directory name provided. Get File Locator
|
||||||
nsIFileLocator* locator = nsnull;
|
nsIFileLocator* locator = nsnull;
|
||||||
rv = nsServiceManager::GetService(kFileLocatorCID, nsIFileLocator::GetIID(), (nsISupports**)&locator);
|
rv = nsServiceManager::GetService(kFileLocatorCID, nsIFileLocator::GetIID(), (nsISupports**)&locator);
|
||||||
if (NS_FAILED(rv) || !locator)
|
if (NS_FAILED(rv))
|
||||||
return NS_ERROR_FAILURE;
|
return rv;
|
||||||
|
if (!locator)
|
||||||
|
return NS_ERROR_FAILURE;
|
||||||
|
|
||||||
// Get current profile, make the new one a sibling...
|
// Get current profile, make the new one a sibling...
|
||||||
nsIFileSpec* spec;
|
nsIFileSpec* spec;
|
||||||
@ -740,8 +735,6 @@ done:
|
|||||||
}
|
}
|
||||||
#endif // defined(NS_USING_PROFILES)
|
#endif // defined(NS_USING_PROFILES)
|
||||||
|
|
||||||
nsServiceManager::ReleaseService(kFileLocatorCID, locator);
|
|
||||||
|
|
||||||
#ifdef XP_MAC
|
#ifdef XP_MAC
|
||||||
(void)CloseTSMAwareApplication();
|
(void)CloseTSMAwareApplication();
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user