diff options
Diffstat (limited to 'Xprint/Oid.c')
-rw-r--r-- | Xprint/Oid.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/Xprint/Oid.c b/Xprint/Oid.c index 311d177d0..32be3efb1 100644 --- a/Xprint/Oid.c +++ b/Xprint/Oid.c @@ -30,7 +30,6 @@ not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from said copyright holders. */ -/* $XFree86: xc/programs/Xserver/Xprint/Oid.c,v 1.5tsi Exp $ */ #include "attributes.h" @@ -274,7 +273,7 @@ XpOidParse(const char* value_string, */ if(ptr_return != (const char**)NULL) *ptr_return = ptr+length; - return (XpOid)i; + return i; } /* @@ -751,7 +750,7 @@ XpOidLinkedListFirstOid(XpOidLinkedList* me) XpOid XpOidLinkedListNextOid(XpOidLinkedList* me) { - if(me->current ? (me->current = me->current->next) != 0 : xFalse) + if(me->current ? me->current = me->current->next : xFalse) return me->current->oid; else return xpoid_none; @@ -1652,6 +1651,8 @@ TrayMediumListValidate(XpOidTrayMediumList* me, const XpOidMediumSS* msss) { int i_mss, i_ds, i_itm; + XpOidMediumDiscreteSizeList* ds_list; + int tray_count; XpOid current_tray, current_medium; XpOidMediumDiscreteSizeList* unspecified_tray_ds; XpOidMediumDiscreteSizeList* tray_ds; @@ -1711,7 +1712,6 @@ TrayMediumListValidate(XpOidTrayMediumList* me, * list */ if(tray_ds == (XpOidMediumDiscreteSizeList*)NULL) - { if(unspecified_tray_ds == (XpOidMediumDiscreteSizeList*)NULL) { /* @@ -1722,10 +1722,7 @@ TrayMediumListValidate(XpOidTrayMediumList* me, continue; } else - { tray_ds = unspecified_tray_ds; - } - } /* * loop through the discrete sizes list, looking for a size that * matches the medium for the current input tray @@ -2107,13 +2104,15 @@ const char* XpOidNotifyString(XpOidNotify notify) { switch(notify) { - default: case XPOID_NOTIFY_UNSUPPORTED: return (const char*)NULL; + break; case XPOID_NOTIFY_NONE: return NOTIFY_NONE_STR; + break; case XPOID_NOTIFY_EMAIL: return NOTIFY_EMAIL_STR; + break; } } @@ -2238,7 +2237,7 @@ XpOidDocFmtNext(XpOidDocFmt* doc_fmt, const char* first_nonws_ptr; const char* format; const char* variant; - const char* version = 0; + const char* version; int format_len; int variant_len; int version_len; @@ -2551,12 +2550,10 @@ XpOidDocFmtListHasFmt(const XpOidDocFmtList* list, * variants must both be NULL or match */ if(fmt->variant == (char*)NULL) - { if(list->list[i].variant == (char*)NULL) return xTrue; else continue; - } if(list->list[i].variant == (char*)NULL) continue; if(strcmp(fmt->variant, list->list[i].variant) != 0) @@ -2565,12 +2562,10 @@ XpOidDocFmtListHasFmt(const XpOidDocFmtList* list, * versions must both be NULL or match */ if(fmt->version == (char*)NULL) - { if(list->list[i].version == (char*)NULL) return xTrue; else continue; - } if(list->list[i].version == (char*)NULL) continue; if(strcmp(fmt->version, list->list[i].version) == 0) |