merge with master
[apps/home/mobileprint.git] / mobileprint / previewgen / lib / paper_size.c
index 3a81490..414331c 100644 (file)
@@ -44,7 +44,7 @@ struct paper_size_pts paper_sizes[] = {
 
 void switch_size_pts_coords(struct size_pts *s)
 {
-       PTS_RET_IF(s == NULL, "Invalid argument");
+       PGEN_RET_IF(s == NULL, "Invalid argument");
        double val;
        val = s->x;
        s->x = s->y;
@@ -53,7 +53,7 @@ void switch_size_pts_coords(struct size_pts *s)
 
 void switch_size_px_coords(struct size_px *s)
 {
-       PTS_RET_IF(s == NULL, "Invalid argument");
+       PGEN_RET_IF(s == NULL, "Invalid argument");
        int val;
        val = s->x;
        s->x = s->y;
@@ -62,7 +62,7 @@ void switch_size_px_coords(struct size_px *s)
 
 void add_size_pts(const struct size_pts *from, struct size_pts *to)
 {
-       PTS_RET_IF(from == NULL || to == NULL, "Invalid argument");
+       PGEN_RET_IF(from == NULL || to == NULL, "Invalid argument");
        to->x += from->x;
        to->y += from->y;
 }
@@ -70,7 +70,7 @@ void add_size_pts(const struct size_pts *from, struct size_pts *to)
 
 void neg_size_pts(struct size_pts *s)
 {
-       PTS_RET_IF(s == NULL, "Invalid argument");
+       PGEN_RET_IF(s == NULL, "Invalid argument");
        s->x = -s->x;
        s->y = -s->y;
 }
@@ -87,7 +87,7 @@ int get_paper_size_pts(const char *name, struct paper_size_pts *s)
        int i;
        struct paper_size_pts *cur_s;
 
-       PTS_RETV_IF(name == NULL || s == NULL, -1, "Invalid argument");
+       PGEN_RETV_IF(name == NULL || s == NULL, -1, "Invalid argument");
 
        for (i = 0; paper_sizes[i].name != NULL; ++i) {
                cur_s = &(paper_sizes[i]);
@@ -119,7 +119,7 @@ int pts_size2px(const struct size_pts *s_pts,
        double ratio_x;
        double ratio_y;
 
-       PTS_RETV_IF(s_pts == NULL || border_s_px == NULL || px == NULL, -1 , "Invalid argument");
+       PGEN_RETV_IF(s_pts == NULL || border_s_px == NULL || px == NULL, -1 , "Invalid argument");
 
        ratio_x = border_s_px->x / s_pts->x;
        ratio_y = border_s_px->y / s_pts->y;
@@ -135,7 +135,7 @@ int pts_size2px(const struct size_pts *s_pts,
        px->x = ratio_x * s_pts->x;
        px->y = ratio_y * s_pts->y;
 
-       PTS_DEBUG("px->x px->y :(%d, %d)",px->x, px->y);
+       PGEN_DEBUG("px->x px->y :(%d, %d)",px->x, px->y);
        PGEN_TRACE_END;
        return 0;
 }