* fix gcc4 build

* some style cleanup


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29290 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2009-02-22 18:26:19 +00:00
parent 08f7275afa
commit e2c33fb995
4 changed files with 38 additions and 28 deletions

View File

@ -494,6 +494,8 @@ static long long atoll (const char *str) {
#include <string>
#include <vector>
using namespace std;
/* BeOS (Be Operating System) headers. */
#include <Alert.h>
@ -1184,6 +1186,11 @@ private:
};
/* Various message codes for various buttons etc. */
static const uint32 MSG_LINE_DOWN = 'LnDn';
static const uint32 MSG_LINE_UP = 'LnUp';
static const uint32 MSG_PAGE_DOWN = 'PgDn';
static const uint32 MSG_PAGE_UP = 'PgUp';
/******************************************************************************
* This view contains the list of words. It displays as many as can fit in the
@ -1207,12 +1214,6 @@ public:
virtual void Pulse ();
private:
/* Various message codes for various buttons etc. */
static const uint32 MSG_LINE_DOWN = 'LnDn';
static const uint32 MSG_LINE_UP = 'LnUp';
static const uint32 MSG_PAGE_DOWN = 'PgDn';
static const uint32 MSG_PAGE_UP = 'PgUp';
/* Our member functions. */
void MoveTextUpOrDown (uint32 MovementType);
void RefsDroppedHere (BMessage *MessagePntr);
@ -1524,7 +1525,7 @@ static void DisplayErrorMessage (
* result on the given output stream.
*/
static void WrapTextToStream (ostream& OutputStream, char *TextPntr)
static void WrapTextToStream (ostream& OutputStream, const char *TextPntr)
{
const int LineLength = 79;
char *StringPntr;

View File

@ -1,3 +1,4 @@
#include <StorageDefs.h>
#include "bfs_control.h"
#include <fs_info.h>

View File

@ -4,6 +4,7 @@
*/
#include <stdio.h>
#include <string.h>
#include <Application.h>
#include <Accelerant.h>
#include <Screen.h>

View File

@ -11,29 +11,33 @@
#include <strings.h>
#include <InterfaceDefs.h>
int32 modifier_bits[] = {
B_SHIFT_KEY,
B_COMMAND_KEY,
B_CONTROL_KEY,
B_CAPS_LOCK,
B_SCROLL_LOCK,
B_NUM_LOCK,
B_OPTION_KEY,
B_MENU_KEY,
B_LEFT_SHIFT_KEY,
B_RIGHT_SHIFT_KEY,
B_LEFT_COMMAND_KEY,
B_RIGHT_COMMAND_KEY,
B_LEFT_CONTROL_KEY,
B_RIGHT_CONTROL_KEY,
B_LEFT_OPTION_KEY,
B_RIGHT_OPTION_KEY,
0
B_SHIFT_KEY,
B_COMMAND_KEY,
B_CONTROL_KEY,
B_CAPS_LOCK,
B_SCROLL_LOCK,
B_NUM_LOCK,
B_OPTION_KEY,
B_MENU_KEY,
B_LEFT_SHIFT_KEY,
B_RIGHT_SHIFT_KEY,
B_LEFT_COMMAND_KEY,
B_RIGHT_COMMAND_KEY,
B_LEFT_CONTROL_KEY,
B_RIGHT_CONTROL_KEY,
B_LEFT_OPTION_KEY,
B_RIGHT_OPTION_KEY,
0
};
const char *modifier_names[] = { "shift", "command", "control", "capslock", "scrolllock", "numlock", "option", "menu", "lshift", "rshift", "lcommand", "rcommand", "lcontrol", "rcontrol", "loption", "roption", NULL };
int usage(char *progname, int error)
int
usage(char *progname, int error)
{
FILE *outstr;
outstr = error?stderr:stdout;
@ -43,7 +47,9 @@ int usage(char *progname, int error)
return error;
}
int list_modifiers(int mods)
int
list_modifiers(int mods)
{
int i;
int gotone = 0;
@ -61,7 +67,9 @@ int list_modifiers(int mods)
return 0;
}
int main(int argc, char **argv)
int
main(int argc, char **argv)
{
int32 mods;
int32 mask_xor = 0x0;
@ -69,7 +77,6 @@ int main(int argc, char **argv)
int i, j;
mods = modifiers();
// printf("mods = 0x%08lx\n", mods);
if (argc == 1)
return usage(argv[0], 1);
for (i=1; i<argc; i++) {