patches for warnings
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8316 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -67,6 +67,7 @@ void
|
|||||||
TerminalApp::OpenTerminal(BMessage * message)
|
TerminalApp::OpenTerminal(BMessage * message)
|
||||||
{
|
{
|
||||||
TerminalWindow * terminal = new TerminalWindow(message);
|
TerminalWindow * terminal = new TerminalWindow(message);
|
||||||
|
(void)terminal;
|
||||||
fWindowOpened = true;
|
fWindowOpened = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,7 +133,7 @@ struct option title_opt = { "title", required_argument, 0, 't' } ;
|
|||||||
struct option options[] =
|
struct option options[] =
|
||||||
{ curbg_opt, curfg_opt, bg_opt, fg_opt,
|
{ curbg_opt, curfg_opt, bg_opt, fg_opt,
|
||||||
geom_opt, help_opt, meta_opt, pref_opt,
|
geom_opt, help_opt, meta_opt, pref_opt,
|
||||||
selbg_opt, selfg_opt, title_opt, 0
|
selbg_opt, selfg_opt, title_opt, {0}
|
||||||
};
|
};
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
@@ -164,7 +165,6 @@ TerminalApp::ArgvReceived(int32 argc, char * const argv[], const char * cwd)
|
|||||||
if (argc > 1) {
|
if (argc > 1) {
|
||||||
if (argv[1][0] == '-') {
|
if (argv[1][0] == '-') {
|
||||||
const char * execname = (argc >= 1 ? argv[0] : "");
|
const char * execname = (argc >= 1 ? argv[0] : "");
|
||||||
const char * title = 0;
|
|
||||||
int indexptr = 0;
|
int indexptr = 0;
|
||||||
int ch;
|
int ch;
|
||||||
char * const * optargv = argv;
|
char * const * optargv = argv;
|
||||||
@@ -177,12 +177,12 @@ TerminalApp::ArgvReceived(int32 argc, char * const argv[], const char * cwd)
|
|||||||
case 'g':
|
case 'g':
|
||||||
printf("geometry is %s = ",optarg);
|
printf("geometry is %s = ",optarg);
|
||||||
int m, n;
|
int m, n;
|
||||||
if ((sscanf(optarg,"%ldx%ld%s",&m,&n) != 2) || (m < 0) || (n < 0)) {
|
if ((sscanf(optarg,"%dx%d",&m,&n) != 2) || (m < 0) || (n < 0)) {
|
||||||
printf("??\n");
|
printf("??\n");
|
||||||
printf("geometry must be of the format MxN where M and N are positive integers\n");
|
printf("geometry must be of the format MxN where M and N are positive integers\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
printf("%ld,%ld\n",m,n);
|
printf("%d,%d\n",m,n);
|
||||||
terminal.AddInt32("columns",m);
|
terminal.AddInt32("columns",m);
|
||||||
terminal.AddInt32("rows",n);
|
terminal.AddInt32("rows",n);
|
||||||
break;
|
break;
|
||||||
@@ -305,7 +305,7 @@ TerminalApp::ArgvReceived(int32 argc, char * const argv[], const char * cwd)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
printf("invalid indexptr %ld\n",indexptr);
|
printf("invalid indexptr %d\n",indexptr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
#include <Message.h>
|
#include <Message.h>
|
||||||
#include <Roster.h>
|
#include <Roster.h>
|
||||||
|
#include <cassert>
|
||||||
|
|
||||||
class TerminalWindow;
|
class TerminalWindow;
|
||||||
|
|
||||||
@@ -15,6 +16,7 @@ public:
|
|||||||
virtual ~TerminalApp();
|
virtual ~TerminalApp();
|
||||||
virtual void MessageReceived(BMessage *message);
|
virtual void MessageReceived(BMessage *message);
|
||||||
virtual void ArgvReceived(int32 argc, char * const argv[], const char * cwd);
|
virtual void ArgvReceived(int32 argc, char * const argv[], const char * cwd);
|
||||||
|
virtual void ArgvReceived(int32 argc, char **argv) { assert(false); }
|
||||||
virtual void RefsReceived(BMessage *message);
|
virtual void RefsReceived(BMessage *message);
|
||||||
virtual void ReadyToRun();
|
virtual void ReadyToRun();
|
||||||
|
|
||||||
|
|||||||
@@ -62,9 +62,10 @@ TerminalWindow::InitWindow(int32 id, entry_ref * settingsRef)
|
|||||||
AddChild(view);
|
AddChild(view);
|
||||||
rgb_color white = {255,255,255,0};
|
rgb_color white = {255,255,255,0};
|
||||||
view->SetViewColor(white);
|
view->SetViewColor(white);
|
||||||
BShelf * shelf = new BShelf(view);
|
// BShelf * shelf = new BShelf(view);
|
||||||
|
|
||||||
status_t ignore = RestoreSettings(settingsRef);
|
// status_t ignore = RestoreSettings(settingsRef);
|
||||||
|
RestoreSettings(settingsRef);
|
||||||
|
|
||||||
BString unTitled;
|
BString unTitled;
|
||||||
unTitled.SetTo("Terminal ");
|
unTitled.SetTo("Terminal ");
|
||||||
|
|||||||
Reference in New Issue
Block a user