Back to index

lightning-sunbird  0.9+nobinonly
Functions
nsCommandLineServiceMac.cpp File Reference
#include "nsCommandLineServiceMac.h"
#include "nsDebug.h"
#include "nsILocalFileMac.h"
#include "nsNetUtil.h"
#include "nsIAppStartup.h"
#include "nsIServiceManager.h"
#include "nsIURL.h"
#include "nsIIOService.h"
#include "nsNetCID.h"
#include "nsIDOMWindow.h"
#include "nsXPCOM.h"
#include "nsISupportsPrimitives.h"
#include "nsIWindowWatcher.h"
#include "jsapi.h"
#include "nsReadableUtils.h"
#include "nsICloseAllWindows.h"
#include "nsIPrefService.h"
#include "nsAEEventHandling.h"
#include "nsXPFEComponentsCID.h"
#include "prmem.h"
#include "plstr.h"
#include "prenv.h"

Go to the source code of this file.

Functions

static PRInt32 ReadLine (FILE *inStream, char *buf, PRInt32 bufSize)
nsresult InitializeMacCommandLine (int &argc, char **&argv)

Function Documentation

nsresult InitializeMacCommandLine ( int argc,
char **&  argv 
)

Definition at line 419 of file nsCommandLineServiceMac.cpp.

{

  nsMacCommandLine&  cmdLine = nsMacCommandLine::GetMacCommandLine();
  return cmdLine.Initialize(argc, argv);
} // InitializeMac

Here is the caller graph for this function:

static PRInt32 ReadLine ( FILE inStream,
char *  buf,
PRInt32  bufSize 
) [static]

Definition at line 88 of file nsCommandLineServiceMac.cpp.

{
  PRInt32 charsRead = 0;
  int c;
  
  if (bufSize < 2)
    return -1;

  while (charsRead < (bufSize-1)) {
    c = getc(inStream);
    if (c == EOF || c == '\n' || c == '\r')
      break;
    buf[charsRead++] = c;
  }
  buf[charsRead] = '\0';
  
  return (c == EOF && !charsRead) ? -1 : charsRead; 
}