mail: partial style cleanup

No functional changes

Change-Id: I8f2b18da4955ee48cba87359050fbe3fc8cdb9ea
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3830
Reviewed-by: Jérôme Duval <[email protected]>
This commit is contained in:
Siddhant Gupta
2021-04-01 14:02:32 +00:00
committed by Jérôme Duval
parent 16196fd3b7
commit f67bf6411c
4 changed files with 19 additions and 19 deletions
+2 -2
View File
@@ -1371,7 +1371,7 @@ TTextView::MessageReceived(BMessage *msg)
case B_INPUT_METHOD_EVENT:
{
int32 im_op;
if (msg->FindInt32("be:opcode", &im_op) == B_OK){
if (msg->FindInt32("be:opcode", &im_op) == B_OK) {
switch (im_op) {
case B_INPUT_METHOD_STARTED:
fInputMethodUndoState.replace = true;
@@ -1382,7 +1382,7 @@ TTextView::MessageReceived(BMessage *msg)
if (fInputMethodUndoBuffer.CountItems() > 0) {
KUndoItem *undo = fInputMethodUndoBuffer.ItemAt(
fInputMethodUndoBuffer.CountItems() - 1);
if (undo->History == K_INSERTED){
if (undo->History == K_INSERTED) {
fUndoBuffer.MakeNewUndoItem();
fUndoBuffer.AddUndo(undo->RedoText, undo->Length,
undo->Offset, undo->History, undo->CursorPos);
+1 -1
View File
@@ -154,7 +154,7 @@ KUndoBuffer::AddUndo(const char* text, int32 length, int32 offset,
int32 c_offset = CurrentUndoItem->Offset;
undo_type c_history = CurrentUndoItem->History;
if (c_history == history) {
switch(c_history) {
switch (c_history) {
case K_INSERTED:
case K_REPLACED:
if ((c_offset + c_length) == offset)
+3 -3
View File
@@ -392,7 +392,7 @@ TMailApp::MessageReceived(BMessage *msg)
case MAIL_WINDOW:
{
TMailWindow* window;
if( msg->FindPointer("window", (void**)&window) == B_OK)
if (msg->FindPointer("window", (void**)&window) == B_OK)
fWindowList.RemoveItem(window);
fWindowCount--;
break;
@@ -623,7 +623,7 @@ TMailApp::RefsReceived(BMessage *msg)
|| strcmp(type, B_PARTIAL_MAIL_TYPE) == 0) {
window = NewWindow(&ref, NULL, false, &messenger);
window->Show();
} else if(strcmp(type, "application/x-person") == 0) {
} else if (strcmp(type, "application/x-person") == 0) {
/* Got a People contact info file, see if it has an Email address. */
BString name;
BString email;
@@ -640,7 +640,7 @@ TMailApp::RefsReceived(BMessage *msg)
/* we got something... */
if (email.Length() > 0) {
/* see if we can get a username as well */
if(file.GetAttrInfo("META:name", &info) == B_NO_ERROR) {
if (file.GetAttrInfo("META:name", &info) == B_NO_ERROR) {
attrib = (char *) malloc(info.size + 1);
file.ReadAttr("META:name", B_STRING_TYPE, 0, attrib, info.size);
attrib[info.size] = 0; // Just in case it wasn't NUL terminated.
+13 -13
View File
@@ -525,9 +525,9 @@ suffix_word(char* dst, const char* src, char flag)
end = stpcpy(dst, src);
flag = toupper(flag);
switch(flag) {
switch (flag) {
case 'V':
switch(end[-1]) {
switch (end[-1]) {
case 'e':
end = stpcpy(end - 1, "ive");
break;
@@ -537,7 +537,7 @@ suffix_word(char* dst, const char* src, char flag)
}
break;
case 'N':
switch(end[-1]) {
switch (end[-1]) {
case 'e':
end = stpcpy(end - 1, "ion");
break;
@@ -550,7 +550,7 @@ suffix_word(char* dst, const char* src, char flag)
}
break;
case 'X':
switch(end[-1]) {
switch (end[-1]) {
case 'e':
end = stpcpy(end - 1, "ions");
break;
@@ -563,7 +563,7 @@ suffix_word(char* dst, const char* src, char flag)
}
break;
case 'H':
switch(end[-1]) {
switch (end[-1]) {
case 'y':
end = stpcpy(end - 1, "ieth");
break;
@@ -576,7 +576,7 @@ suffix_word(char* dst, const char* src, char flag)
end = stpcpy(end, "ly");
break;
case 'G':
switch(end[-1]) {
switch (end[-1]) {
case 'e':
end = stpcpy(end - 1, "ing");
break;
@@ -586,7 +586,7 @@ suffix_word(char* dst, const char* src, char flag)
}
break;
case 'J':
switch(end[-1]) {
switch (end[-1]) {
case 'e':
end = stpcpy(end - 1, "ings");
break;
@@ -596,7 +596,7 @@ suffix_word(char* dst, const char* src, char flag)
}
break;
case 'D':
switch(end[-1]) {
switch (end[-1]) {
case 'e':
end = stpcpy(end - 1, "ed");
break;
@@ -612,7 +612,7 @@ suffix_word(char* dst, const char* src, char flag)
}
break;
case 'T':
switch(end[-1]) {
switch (end[-1]) {
case 'e':
end = stpcpy(end - 1, "est");
break;
@@ -628,7 +628,7 @@ suffix_word(char* dst, const char* src, char flag)
}
break;
case 'R':
switch(end[-1]) {
switch (end[-1]) {
case 'e':
end = stpcpy(end - 1, "er");
break;
@@ -644,7 +644,7 @@ suffix_word(char* dst, const char* src, char flag)
}
break;
case 'Z':
switch(end[-1]) {
switch (end[-1]) {
case 'e':
end = stpcpy(end - 1, "ers");
break;
@@ -660,7 +660,7 @@ suffix_word(char* dst, const char* src, char flag)
}
break;
case 'S':
switch(end[-1]) {
switch (end[-1]) {
case 's':
case 'x':
case 'z':
@@ -679,7 +679,7 @@ suffix_word(char* dst, const char* src, char flag)
}
break;
case 'P':
switch(end[-1]) {
switch (end[-1]) {
case 'y':
if (!strchr("aeiou", end[-2])) {
end = stpcpy(end - 1, "iness");