Back to index

lightning-sunbird  0.9+nobinonly
RobotMain.cpp
Go to the documentation of this file.
00001 #include "nsXPCOM.h"
00002 #include "nsVoidArray.h"
00003 #include "nsString.h"
00004 class nsIDocShell;
00005 
00006 //XXXbz is this even used?  There is no DebugRobot() with this
00007 //signature in the tree!
00008 
00009 extern "C" NS_EXPORT int DebugRobot(nsVoidArray * workList, nsIDocShell * ww);
00010 
00011 int main(int argc, char **argv)
00012 {
00013   nsresult rv = NS_InitXPCOM2(nsnull, nsnull, nsnull);
00014   if (NS_FAILED(rv)) {
00015     printf("NS_InitXPCOM2 failed\n");
00016     return 1;
00017   }
00018 
00019   nsVoidArray * gWorkList = new nsVoidArray();
00020   if(gWorkList) {
00021     int i;
00022     for (i = 1; i < argc; ++i) {
00023       nsString *tempString = new nsString;
00024       tempString->AssignWithConversion(argv[i]);
00025       gWorkList->AppendElement(tempString);
00026     }
00027   }
00028 
00029   return DebugRobot(gWorkList, nsnull);
00030 }
00031