зеркало из https://github.com/mozilla/pjs.git
Added --long-argument support for BeOS. Thanks to justin@68k.org for the patch.
This commit is contained in:
Родитель
966fe87e27
Коммит
2caf60b140
|
@ -168,8 +168,8 @@ PRBool nsCmdLineService::ArgsMatch(const char *lookingFor, const char *userGave)
|
|||
|
||||
if (!PL_strcasecmp(lookingFor,userGave)) return PR_TRUE;
|
||||
|
||||
#ifdef XP_UNIX
|
||||
/* on unix, we'll allow --mail for -mail */
|
||||
#if defined(XP_UNIX) || defined(XP_BEOS)
|
||||
/* on unix and beos, we'll allow --mail for -mail */
|
||||
if ((PL_strlen(lookingFor) > 0) && (PL_strlen(userGave) > 1)) {
|
||||
if (!PL_strcasecmp(lookingFor+1,userGave+2) && (lookingFor[0] == '-') && (userGave[0] == '-') && (userGave[1] == '-')) return PR_TRUE;
|
||||
}
|
||||
|
|
|
@ -824,9 +824,9 @@ int main(int argc, char* argv[])
|
|||
for (i=1; i<argc; i++) {
|
||||
if ((PL_strcasecmp(argv[i], "-h") == 0)
|
||||
|| (PL_strcasecmp(argv[i], "-help") == 0)
|
||||
#ifdef XP_UNIX
|
||||
#if defined(XP_UNIX) || defined(XP_BEOS)
|
||||
|| (PL_strcasecmp(argv[i], "--help") == 0)
|
||||
#endif /* XP_UNIX */
|
||||
#endif /* XP_UNIX || XP_BEOS*/
|
||||
#ifdef XP_PC
|
||||
|| (PL_strcasecmp(argv[i], "/h") == 0)
|
||||
|| (PL_strcasecmp(argv[i], "/help") == 0)
|
||||
|
@ -838,9 +838,9 @@ int main(int argc, char* argv[])
|
|||
}
|
||||
if ((PL_strcasecmp(argv[i], "-v") == 0)
|
||||
|| (PL_strcasecmp(argv[i], "-version") == 0)
|
||||
#ifdef XP_UNIX
|
||||
#if defined(XP_UNIX) || defined(XP_BEOS)
|
||||
|| (PL_strcasecmp(argv[i], "--version") == 0)
|
||||
#endif /* XP_UNIX */
|
||||
#endif /* XP_UNIX || XP_BEOS */
|
||||
#ifdef XP_PC
|
||||
|| (PL_strcasecmp(argv[i], "/v") == 0)
|
||||
|| (PL_strcasecmp(argv[i], "/version") == 0)
|
||||
|
@ -950,8 +950,15 @@ int main(int argc, char* argv[])
|
|||
PRBool dosplash = PR_TRUE;
|
||||
for (i=1; i<argc; i++)
|
||||
if ((PL_strcasecmp(argv[i], "-nosplash") == 0)
|
||||
|| (PL_strcasecmp(argv[i], "/nosplash") == 0))
|
||||
#ifdef XP_BEOS
|
||||
|| (PL_strcasecmp(argv[i], "--nosplash") == 0)
|
||||
#endif /* XP_BEOS */
|
||||
#ifdef XP_PC
|
||||
|| (PL_strcasecmp(argv[i], "/nosplash") == 0)
|
||||
#endif /* XP_PC */
|
||||
) {
|
||||
dosplash = PR_FALSE;
|
||||
}
|
||||
#endif
|
||||
if (dosplash) {
|
||||
rv = NS_CreateSplashScreen( &splash );
|
||||
|
|
|
@ -168,8 +168,8 @@ PRBool nsCmdLineService::ArgsMatch(const char *lookingFor, const char *userGave)
|
|||
|
||||
if (!PL_strcasecmp(lookingFor,userGave)) return PR_TRUE;
|
||||
|
||||
#ifdef XP_UNIX
|
||||
/* on unix, we'll allow --mail for -mail */
|
||||
#if defined(XP_UNIX) || defined(XP_BEOS)
|
||||
/* on unix and beos, we'll allow --mail for -mail */
|
||||
if ((PL_strlen(lookingFor) > 0) && (PL_strlen(userGave) > 1)) {
|
||||
if (!PL_strcasecmp(lookingFor+1,userGave+2) && (lookingFor[0] == '-') && (userGave[0] == '-') && (userGave[1] == '-')) return PR_TRUE;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче