[haiku-commits] r34724 - haiku/trunk/src/apps/aboutsystem

  • From: ingo_weinhold@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 20 Dec 2009 17:10:17 +0100 (CET)

Author: bonefish
Date: 2009-12-20 17:10:17 +0100 (Sun, 20 Dec 2009)
New Revision: 34724
Changeset: http://dev.haiku-os.org/changeset/34724/haiku

Modified:
   haiku/trunk/src/apps/aboutsystem/AboutSystem.cpp
Log:
Cleanup.


Modified: haiku/trunk/src/apps/aboutsystem/AboutSystem.cpp
===================================================================
--- haiku/trunk/src/apps/aboutsystem/AboutSystem.cpp    2009-12-20 16:04:41 UTC 
(rev 34723)
+++ haiku/trunk/src/apps/aboutsystem/AboutSystem.cpp    2009-12-20 16:10:17 UTC 
(rev 34724)
@@ -7,6 +7,7 @@
  *             René Gollent
  */
 
+
 #include <ctype.h>
 #include <stdio.h>
 #include <sys/utsname.h>
@@ -56,9 +57,9 @@
 #define SCROLL_CREDITS_VIEW 'mviv'
 
 
-static const char *UptimeToString(char string[], size_t size);
-static const char *MemUsageToString(char string[], size_t size,
-       system_info *info);
+static const char* UptimeToString(char string[], size_t size);
+static const char* MemUsageToString(char string[], size_t size,
+       system_info* info);
 
 static const rgb_color kDarkGrey = { 100, 100, 100, 255 };
 static const rgb_color kHaikuGreen = { 42, 131, 36, 255 };
@@ -508,12 +509,12 @@
 
 
 void
-AboutView::MessageReceived(BMessage *msg)
+AboutView::MessageReceived(BMessage* msg)
 {
        switch (msg->what) {
                case SCROLL_CREDITS_VIEW:
                {
-                       BScrollBar *scrollBar = 
fCreditsView->ScrollBar(B_VERTICAL);
+                       BScrollBar* scrollBar = 
fCreditsView->ScrollBar(B_VERTICAL);
                        if (scrollBar == NULL)
                                break;
                        float max, min;
@@ -532,16 +533,16 @@
 
 
 void
-AboutView::AddCopyrightEntry(const char *name, const char *text,
-       const char *url)
+AboutView::AddCopyrightEntry(const char* name, const char* text,
+       const char* url)
 {
        AddCopyrightEntry(name, text, StringVector(), url);
 }
 
 
 void
-AboutView::AddCopyrightEntry(const char *name, const char *text,
-       const StringVector& licenses, const char *url)
+AboutView::AddCopyrightEntry(const char* name, const char* text,
+       const StringVector& licenses, const char* url)
 {
        BFont font(be_bold_font);
        //font.SetSize(be_bold_font->Size());
@@ -609,16 +610,16 @@
                return;
        if (fortunes.GetStat(&st) < B_OK)
                return;
-       char *buff = (char *)malloc((size_t)st.st_size + 1);
+       char* buff = (char*)malloc((size_t)st.st_size + 1);
        if (!buff)
                return;
        buff[(size_t)st.st_size] = '\0';
        BList haikuList;
        if (fortunes.Read(buff, (size_t)st.st_size) == (ssize_t)st.st_size) {
-               char *p = buff;
+               char* p = buff;
                while (p && *p) {
-                       char *e = strchr(p, '%');
-                       BString *s = new BString(p, e ? (e - p) : -1);
+                       char* e = strchr(p, '%');
+                       BString* s = new BString(p, e ? (e - p) : -1);
                        haikuList.AddItem(s);
                        p = e;
                        if (p && (*p == '%'))
@@ -630,7 +631,7 @@
        free(buff);
        if (haikuList.CountItems() < 1)
                return;
-       BString *s = (BString *)haikuList.ItemAt(rand() % 
haikuList.CountItems());
+       BString* s = (BString*)haikuList.ItemAt(rand() % 
haikuList.CountItems());
        BFont font(be_bold_font);
        font.SetSize(be_bold_font->Size());
        font.SetFace(B_BOLD_FACE | B_ITALIC_FACE);
@@ -639,7 +640,7 @@
        fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kDarkGrey);
        fCreditsView->Insert(s->String());
        fCreditsView->Insert("\n");
-       while ((s = (BString *)haikuList.RemoveItem((int32)0))) {
+       while ((s = (BString*)haikuList.RemoveItem((int32)0))) {
                delete s;
        }
 }
@@ -1423,8 +1424,8 @@
 //     #pragma mark -
 
 
-static const char *
-MemUsageToString(char string[], size_t size, system_info *info)
+static const char*
+MemUsageToString(char string[], size_t size, system_info* info)
 {
        snprintf(string, size, "%d MB total, %d MB used (%d%%)",
                        int(info->max_pages / 256.0f + 0.5f),
@@ -1435,7 +1436,7 @@
 }
 
 
-static const char *
+static const char*
 UptimeToString(char string[], size_t size)
 {
        int64 days, hours, minutes, seconds, remainder;
@@ -1452,7 +1453,7 @@
 
        seconds = remainder / 1000000;
 
-       char *str = string;
+       char* str = string;
        if (days) {
                str += snprintf(str, size, "%lld day%s",days, days > 1 ? "s" : 
"");
        }


Other related posts:

  • » [haiku-commits] r34724 - haiku/trunk/src/apps/aboutsystem - ingo_weinhold