/*
+ * Copyright (C) 2005-2008 Atsushi Konno All rights reserved.
* Copyright (C) 2005 QSDN,Inc. All rights reserved.
- * Copyright (C) 2005 Atsushi Konno All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "mod_chxj.h"
-char*
+char *
chxj_img_conv(
- request_rec* r,
- device_table* spec,
- const char* s)
+ request_rec *r,
+ device_table *spec,
+ const char *s)
{
- char* dst;
-
- dst = apr_pstrdup(r->pool, s);
-
+ char *dst = apr_pstrdup(r->pool, s);
if (spec) {
switch (spec->color) {
case 2 : dst = apr_pstrcat(r->pool, dst,".10", NULL); break;
if (spec->available_jpeg)
return apr_pstrcat(r->pool, dst,".jpg", NULL);
- if (spec->available_png != 0)
+ if (spec->available_png)
return apr_pstrcat(r->pool, dst,".png", NULL);
- if (spec->available_gif != 0)
+ if (spec->available_gif)
return apr_pstrcat(r->pool, dst, ".gif", NULL);
- if (spec->available_bmp4 != 0 || spec->available_bmp2 != 0)
+ if (spec->available_bmp4 || spec->available_bmp2)
return apr_pstrcat(r->pool, dst, ".bmp", NULL);
}