OSDN Git Service

* Added android.
authorAtsushi Konno <konn@users.sourceforge.jp>
Sun, 17 Apr 2011 16:21:44 +0000 (01:21 +0900)
committerAtsushi Konno <konn@users.sourceforge.jp>
Sun, 17 Apr 2011 16:21:44 +0000 (01:21 +0900)
  * Changed device_data for android.
    - all spec width is 240px
  * Changed chxj:if lang logic.

etc/device_data.xml
include/chxj_specified_device.h
src/chxj_img_conv_format.c
src/chxj_tag_util.c

index f30f9c8..95e8df1 100644 (file)
@@ -21612,7 +21612,7 @@ Mozilla/4.0 (compatible; MSIE 6.0; KYOCERA/AH-K3001V/1.4.1.67.000000/0.1) Opera
       <device_id>IS01</device_id>
       <device_name>au Android IS01</device_name>
       <html_spec_type>android</html_spec_type>
-      <width>960</width>
+      <width>240</width>
       <heigh>480</heigh>
       <gif>true</gif>
       <jpeg>true</jpeg><!-- recomended -->
@@ -21637,8 +21637,8 @@ Mozilla/4.0 (compatible; MSIE 6.0; KYOCERA/AH-K3001V/1.4.1.67.000000/0.1) Opera
       <device_id>IS03</device_id>
       <device_name>au Android IS03</device_name>
       <html_spec_type>android</html_spec_type>
-      <width>960</width>
-      <heigh>640</heigh>
+      <width>240</width>
+      <heigh>480</heigh>
       <gif>true</gif>
       <jpeg>true</jpeg><!-- recomended -->
       <png>true</png>
@@ -21662,7 +21662,7 @@ Mozilla/4.0 (compatible; MSIE 6.0; KYOCERA/AH-K3001V/1.4.1.67.000000/0.1) Opera
       <device_id>IS04</device_id>
       <device_name>au Android IS04</device_name>
       <html_spec_type>android</html_spec_type>
-      <width>854</width>
+      <width>240</width>
       <heigh>480</heigh>
       <gif>true</gif>
       <jpeg>true</jpeg><!-- recomended -->
@@ -21687,7 +21687,7 @@ Mozilla/4.0 (compatible; MSIE 6.0; KYOCERA/AH-K3001V/1.4.1.67.000000/0.1) Opera
       <device_id>IS05</device_id>
       <device_name>au Android IS05</device_name>
       <html_spec_type>android</html_spec_type>
-      <width>854</width>
+      <width>240</width>
       <heigh>480</heigh>
       <gif>true</gif>
       <jpeg>true</jpeg><!-- recomended -->
@@ -21697,8 +21697,8 @@ Mozilla/4.0 (compatible; MSIE 6.0; KYOCERA/AH-K3001V/1.4.1.67.000000/0.1) Opera
       <color>262144</color>
       <emoji_type></emoji_type>
 
-      <wp_width>854</wp_width>
-      <wp_heigh>480</wp_heigh>
+      <wp_width>960</wp_width>
+      <wp_heigh>854</wp_heigh>
       <cache>300000</cache>
       <dpi_width>96</dpi_width>
       <dpi_heigh>96</dpi_heigh>
@@ -21712,7 +21712,7 @@ Mozilla/4.0 (compatible; MSIE 6.0; KYOCERA/AH-K3001V/1.4.1.67.000000/0.1) Opera
       <device_id>IS06</device_id>
       <device_name>au Android IS06</device_name>
       <html_spec_type>android</html_spec_type>
-      <width>800</width>
+      <width>240</width>
       <heigh>480</heigh>
       <gif>true</gif>
       <jpeg>true</jpeg><!-- recomended -->
@@ -21744,7 +21744,7 @@ Mozilla/4.0 (compatible; MSIE 6.0; KYOCERA/AH-K3001V/1.4.1.67.000000/0.1) Opera
       <device_id>HT-03A</device_id>
       <device_name>docomo Android HT-03A</device_name>
       <html_spec_type>android</html_spec_type>
-      <width>320</width>
+      <width>240</width>
       <heigh>480</heigh>
       <gif>true</gif>
       <jpeg>true</jpeg><!-- recomended -->
@@ -21773,8 +21773,8 @@ Mozilla/4.0 (compatible; MSIE 6.0; KYOCERA/AH-K3001V/1.4.1.67.000000/0.1) Opera
       <device_id>SonyEricssonSO-01B</device_id>
       <device_name>docomo Android Xperia SO-01B</device_name>
       <html_spec_type>android</html_spec_type>
-      <width>480</width>
-      <heigh>854</heigh>
+      <width>240</width>
+      <heigh>480</heigh>
       <gif>true</gif>
       <jpeg>true</jpeg><!-- recomended -->
       <png>true</png>
@@ -21798,7 +21798,7 @@ Mozilla/4.0 (compatible; MSIE 6.0; KYOCERA/AH-K3001V/1.4.1.67.000000/0.1) Opera
       <device_id>SH-10B</device_id>
       <device_name>docomo Android LYNX SH-10B</device_name>
       <html_spec_type>android</html_spec_type>
-      <width>960</width>
+      <width>240</width>
       <heigh>480</heigh>
       <gif>true</gif>
       <jpeg>true</jpeg><!-- recomended -->
@@ -21823,8 +21823,8 @@ Mozilla/4.0 (compatible; MSIE 6.0; KYOCERA/AH-K3001V/1.4.1.67.000000/0.1) Opera
       <device_id>SC-02B</device_id>
       <device_name>docomo Android GALAXY S SC-02B</device_name>
       <html_spec_type>android</html_spec_type>
-      <width>480</width>
-      <heigh>800</heigh>
+      <width>240</width>
+      <heigh>480</heigh>
       <gif>true</gif>
       <jpeg>true</jpeg><!-- recomended -->
       <png>true</png>
@@ -21848,8 +21848,8 @@ Mozilla/4.0 (compatible; MSIE 6.0; KYOCERA/AH-K3001V/1.4.1.67.000000/0.1) Opera
       <device_id>SC-01C</device_id>
       <device_name>docomo Android GALAXY Tab SC-01C</device_name>
       <html_spec_type>android</html_spec_type>
-      <width>600</width>
-      <heigh>1024</heigh>
+      <width>240</width>
+      <heigh>480</heigh>
       <gif>true</gif>
       <jpeg>true</jpeg><!-- recomended -->
       <png>true</png>
@@ -21873,8 +21873,8 @@ Mozilla/4.0 (compatible; MSIE 6.0; KYOCERA/AH-K3001V/1.4.1.67.000000/0.1) Opera
       <device_id>SH-03C</device_id>
       <device_name>docomo Android LYNX 3D SH-03C</device_name>
       <html_spec_type>android</html_spec_type>
-      <width>480</width>
-      <heigh>800</heigh>
+      <width>240</width>
+      <heigh>480</heigh>
       <gif>true</gif>
       <jpeg>true</jpeg><!-- recomended -->
       <png>true</png>
@@ -21898,8 +21898,8 @@ Mozilla/4.0 (compatible; MSIE 6.0; KYOCERA/AH-K3001V/1.4.1.67.000000/0.1) Opera
       <device_id>T-01C</device_id>
       <device_name>docomo Android REGZA Phone T-01C</device_name>
       <html_spec_type>android</html_spec_type>
-      <width>480</width>
-      <heigh>854</heigh>
+      <width>240</width>
+      <heigh>480</heigh>
       <gif>true</gif>
       <jpeg>true</jpeg><!-- recomended -->
       <png>true</png>
@@ -21923,7 +21923,7 @@ Mozilla/4.0 (compatible; MSIE 6.0; KYOCERA/AH-K3001V/1.4.1.67.000000/0.1) Opera
       <device_id>L-04C</device_id>
       <device_name>docomo Android Optimus chat L-04C</device_name>
       <html_spec_type>android</html_spec_type>
-      <width>320</width>
+      <width>240</width>
       <heigh>480</heigh>
       <gif>true</gif>
       <jpeg>true</jpeg><!-- recomended -->
@@ -21949,8 +21949,8 @@ Mozilla/4.0 (compatible; MSIE 6.0; KYOCERA/AH-K3001V/1.4.1.67.000000/0.1) Opera
       <device_id>N-04C</device_id>
       <device_name>docomo Android MEDIAS N-04C</device_name>
       <html_spec_type>android</html_spec_type>
-      <width>480</width>
-      <heigh>854</heigh>
+      <width>240</width>
+      <heigh>480</heigh>
       <gif>true</gif>
       <jpeg>true</jpeg><!-- recomended -->
       <png>true</png>
@@ -21974,8 +21974,8 @@ Mozilla/4.0 (compatible; MSIE 6.0; KYOCERA/AH-K3001V/1.4.1.67.000000/0.1) Opera
       <device_id>SonyEricssonSO-01C</device_id>
       <device_name>docomo Android Xperia arc SO-01C</device_name>
       <html_spec_type>android</html_spec_type>
-      <width>480</width>
-      <heigh>854</heigh>
+      <width>240</width>
+      <heigh>480</heigh>
       <gif>true</gif>
       <jpeg>true</jpeg><!-- recomended -->
       <png>true</png>
@@ -21999,8 +21999,8 @@ Mozilla/4.0 (compatible; MSIE 6.0; KYOCERA/AH-K3001V/1.4.1.67.000000/0.1) Opera
       <device_id>L-06C</device_id>
       <device_name>docomo Android Optimus Pad L-06C</device_name>
       <html_spec_type>android</html_spec_type>
-      <width>1280</width>
-      <heigh>768</heigh>
+      <width>240</width>
+      <heigh>480</heigh>
       <gif>true</gif>
       <jpeg>true</jpeg><!-- recomended -->
       <png>true</png>
@@ -22032,7 +22032,7 @@ Mozilla/4.0 (compatible; MSIE 6.0; KYOCERA/AH-K3001V/1.4.1.67.000000/0.1) Opera
       <html_spec_type>android_s</html_spec_type>
       -->
       <html_spec_type>android</html_spec_type>
-      <width>800</width>
+      <width>240</width>
       <heigh>480</heigh>
       <gif>true</gif>
       <jpeg>true</jpeg><!-- recomended -->
@@ -22060,7 +22060,7 @@ Mozilla/4.0 (compatible; MSIE 6.0; KYOCERA/AH-K3001V/1.4.1.67.000000/0.1) Opera
       <html_spec_type>android_s</html_spec_type>
       -->
       <html_spec_type>android</html_spec_type>
-      <width>800</width>
+      <width>240</width>
       <heigh>480</heigh>
       <gif>true</gif>
       <jpeg>true</jpeg><!-- recomended -->
@@ -22088,7 +22088,7 @@ Mozilla/4.0 (compatible; MSIE 6.0; KYOCERA/AH-K3001V/1.4.1.67.000000/0.1) Opera
       <html_spec_type>android_s</html_spec_type>
       -->
       <html_spec_type>android</html_spec_type>
-      <width>800</width>
+      <width>240</width>
       <heigh>480</heigh>
       <gif>true</gif>
       <jpeg>true</jpeg><!-- recomended -->
@@ -22116,7 +22116,7 @@ Mozilla/4.0 (compatible; MSIE 6.0; KYOCERA/AH-K3001V/1.4.1.67.000000/0.1) Opera
       <html_spec_type>android_s</html_spec_type>
       -->
       <html_spec_type>android</html_spec_type>
-      <width>800</width>
+      <width>240</width>
       <heigh>480</heigh>
       <gif>true</gif>
       <jpeg>true</jpeg><!-- recomended -->
@@ -22144,7 +22144,7 @@ Mozilla/4.0 (compatible; MSIE 6.0; KYOCERA/AH-K3001V/1.4.1.67.000000/0.1) Opera
       <html_spec_type>android_s</html_spec_type>
       -->
       <html_spec_type>android</html_spec_type>
-      <width>800</width>
+      <width>240</width>
       <heigh>480</heigh>
       <gif>true</gif>
       <jpeg>true</jpeg><!-- recomended -->
@@ -22169,7 +22169,7 @@ Mozilla/4.0 (compatible; MSIE 6.0; KYOCERA/AH-K3001V/1.4.1.67.000000/0.1) Opera
       <device_id>EDK</device_id>
       <device_name>Android SDK EDK(Sony Ericsson Mobile)</device_name>
       <html_spec_type>android</html_spec_type>
-      <width>800</width>
+      <width>240</width>
       <heigh>480</heigh>
       <gif>true</gif>
       <jpeg>true</jpeg><!-- recomended -->
@@ -22190,7 +22190,7 @@ Mozilla/4.0 (compatible; MSIE 6.0; KYOCERA/AH-K3001V/1.4.1.67.000000/0.1) Opera
       <device_id>google.sdk</device_id>
       <device_name>Android SDK Sharp</device_name>
       <html_spec_type>android</html_spec_type>
-      <width>800</width>
+      <width>240</width>
       <heigh>480</heigh>
       <gif>true</gif>
       <jpeg>true</jpeg><!-- recomended -->
index abd2f55..05c7c84 100755 (executable)
@@ -43,7 +43,13 @@ typedef enum {
 #define CHXJ_PIC_OK                (0x01)
 #define CHXJ_PIC_NG                (0x00)
 
-#define IS_IPHONE(X) (((X) == CHXJ_SPEC_iPhone2) || ((X) == CHXJ_SPEC_iPhone3) || ((X) == CHXJ_SPEC_iPhone4))
+#define IS_IPHONE(X) (((X)->html_spec_type == CHXJ_SPEC_iPhone2) \
+                     || ((X)->html_spec_type == CHXJ_SPEC_iPhone3) \
+                     || ((X)->html_spec_type == CHXJ_SPEC_iPhone4))
+#define IS_ANDROID(X) (  ((X)->html_spec_type == CHXJ_SPEC_softbank_android) \
+                      || ((X)->html_spec_type == CHXJ_SPEC_au_android)  \
+                      || ((X)->html_spec_type == CHXJ_SPEC_docomo_android) \
+                      || ((X)->html_spec_type == CHXJ_SPEC_android))
 
 #include "mod_chxj.h"
 #include "chxj_cookie.h"
index 5a49322..93f62c0 100644 (file)
@@ -668,7 +668,7 @@ s_create_cache_file(request_rec          *r,
     int done_fixup_size = 0;
     int ww = spec->width;
     int hh = spec->heigh;
-    if (IS_IPHONE(spec->html_spec_type)) {
+    if (IS_IPHONE(spec) || IS_ANDROID(spec)) {
       ww = (int)((double)ww * (double)1.5);
       hh = (int)((double)hh * (double)1.5);
     }
@@ -1114,7 +1114,7 @@ s_create_blob_data(request_rec          *r,
     int done_fixup_size = 0;
     int ww = spec->width;
     int hh = spec->heigh;
-    if (IS_IPHONE(spec->html_spec_type)) {
+    if (IS_IPHONE(spec) || IS_ANDROID(spec)) {
       ww = (int)((double)ww * (double)1.5);
       hh = (int)((double)hh * (double)1.5);
     }
@@ -1288,11 +1288,11 @@ s_fixup_size(MagickWand           *magick_wand,
   c_width = spec->width;
   c_heigh = spec->heigh;
 
-  if (IS_IPHONE(spec->html_spec_type)) {
+  if (IS_IPHONE(spec) || IS_ANDROID(spec)) {
     c_width = (int)((double)c_width * (double)1.5);
     c_heigh = (int)((double)c_heigh * (double)1.5);
-    DBG(r,"REQ[%X] detect iphone width=[%d]", TO_ADDR(r),c_width);
-    DBG(r,"REQ[%X] detect iphone heigh=[%d]", TO_ADDR(r),c_heigh);
+    DBG(r,"REQ[%X] detect iphone/android width=[%d]", TO_ADDR(r),c_width);
+    DBG(r,"REQ[%X] detect iphone/android heigh=[%d]", TO_ADDR(r),c_heigh);
   }
 
   switch(mode) {
index d0f73ad..60980df 100644 (file)
@@ -529,8 +529,6 @@ chxj_chxjif_is_mine(device_table *spec, Doc *doc, Node *tag)
         case CHXJ_SPEC_Chtml_3_0:
         case CHXJ_SPEC_Chtml_4_0:
         case CHXJ_SPEC_Chtml_5_0:
-        case CHXJ_SPEC_Chtml_6_0:
-        case CHXJ_SPEC_Chtml_7_0:
           return 1;
         default:
           break;