fixed indenting
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Thu, 5 Jun 2008 19:59:18 +0000 (19:59 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Thu, 5 Jun 2008 19:59:18 +0000 (19:59 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1401 a5681a0c-68f1-0310-ab6d-d61299d08faa

src/rrd.h
src/rrd_error.c
src/rrd_format.h
src/rrd_gfx.c
src/rrd_info.c
src/rrd_open.c
src/rrd_update.c

index 5f4145b..376d84f 100644 (file)
--- a/src/rrd.h
+++ b/src/rrd.h
@@ -231,8 +231,8 @@ extern    "C" {
 /* END parsetime.h */
 
     struct rrd_context {
-        char     lib_errstr[256];
-        char     rrd_error[4096];
+        char      lib_errstr[256];
+        char      rrd_error[4096];
     };
 
 /* returns the current per-thread rrd_context */
index e64e2df..e368ca7 100644 (file)
@@ -122,7 +122,7 @@ struct rrd_context *rrd_new_context(
     struct rrd_context *rrd_ctx =
         (struct rrd_context *) malloc(sizeof(struct rrd_context));
 
-    if (! rrd_ctx) {
+    if (!rrd_ctx) {
         return NULL;
     }
 
index 5828f90..5d86857 100644 (file)
@@ -384,7 +384,7 @@ typedef struct rrd_t {
     ds_def_t *ds_def;   /* list of data source definitions */
     rra_def_t *rra_def; /* list of round robin archive def */
     live_head_t *live_head; /* rrd v >= 3 last_up with us */
-    time_t *legacy_last_up; /* rrd v < 3 last_up time */
+    time_t   *legacy_last_up;   /* rrd v < 3 last_up time */
     pdp_prep_t *pdp_prep;   /* pdp data prep area */
     cdp_prep_t *cdp_prep;   /* cdp prep area */
     rra_ptr_t *rra_ptr; /* list of rra pointers */
index 30a372a..aa7b3ae 100644 (file)
@@ -139,7 +139,8 @@ static PangoLayout *gfx_prep_text(
     tab_array = pango_tab_array_new(tab_count, (gboolean) (1));
     for (i = 1; i <= tab_count; i++) {
         pango_tab_array_set_tab(tab_array,
-                                i, PANGO_TAB_LEFT, tabwidth * i - tab_shift+border);
+                                i, PANGO_TAB_LEFT,
+                                tabwidth * i - tab_shift + border);
     }
     cairo_new_path(cr);
     cairo_set_source_rgba(cr, color.red, color.green, color.blue,
@@ -155,7 +156,8 @@ static PangoLayout *gfx_prep_text(
     font_desc = pango_font_description_from_string(font);
     pango_font_description_set_size(font_desc, size * PANGO_SCALE);
     pango_layout_set_font_description(layout, font_desc);
-    pango_layout_set_markup(layout, text, -1);
+    if (im->with_markup)
+        pango_layout_set_markup(layout, text, -1);
     return layout;
 }
 
index 13d30a6..f53a752 100644 (file)
@@ -23,7 +23,7 @@ char     *sprintf_alloc(
     int       maxlen = 1024 + strlen(fmt);
     char     *str = NULL;
     va_list   argp;
-    str = malloc(sizeof(char) * (maxlen+1));
+    str = malloc(sizeof(char) * (maxlen + 1));
     if (str != NULL) {
         va_start(argp, fmt);
 #ifdef HAVE_VSNPRINTF
index e1685d2..c0e4835 100644 (file)
@@ -226,13 +226,13 @@ rrd_file_t *rrd_open(
             rrd_set_error("live_head_t malloc");
             goto out_close;
         }
-
 #if defined USE_MADVISE
         /* the live_head will be needed soonish, so hint accordingly */
-        madvise(data + PAGE_START(offset),
-                sizeof(time_t), MADV_WILLNEED);
-#endif        
-        __rrd_read(rrd->legacy_last_up,time_t,1);
+        madvise(data + PAGE_START(offset), sizeof(time_t), MADV_WILLNEED);
+#endif
+        __rrd_read(rrd->legacy_last_up, time_t,
+                   1);
+
         rrd->live_head->last_up = *rrd->legacy_last_up;
         rrd->live_head->last_up_usec = 0;
     } else {
@@ -528,8 +528,8 @@ void rrd_init(
 void rrd_free(
     rrd_t *rrd)
 {
-    if (rrd->legacy_last_up){ /* this gets set for version < 3 only */
-        free(rrd->live_head);  
+    if (rrd->legacy_last_up) {  /* this gets set for version < 3 only */
+        free(rrd->live_head);
     }
 }
 #else
index 66b4670..44dddf2 100644 (file)
@@ -832,7 +832,7 @@ static int process_arg(
     rrd->live_head->last_up = *current_time;
     rrd->live_head->last_up_usec = *current_time_usec;
 
-    if ( version < 3 ){
+    if (version < 3) {
         *rrd->legacy_last_up = rrd->live_head->last_up;
     }
     free(seasonal_coef);