Omake-commit: add utility function.
@@ -3,7 +3,7 @@ | ||
3 | 3 | // BathyScaphe |
4 | 4 | // |
5 | 5 | // Updated by Tsutomu Sawada on 10/03/07. |
6 | -// Copyright 2005-2014 BathyScaphe Project. All rights reserved. | |
6 | +// Copyright 2005-2015 BathyScaphe Project. All rights reserved. | |
7 | 7 | // encoding="UTF-8" |
8 | 8 | // |
9 | 9 |
@@ -81,6 +81,7 @@ | ||
81 | 81 | */ |
82 | 82 | extern bool is_2ch_sc(const char *host); |
83 | 83 | |
84 | +extern bool is_bbspink(const char *host); | |
84 | 85 | |
85 | 86 | |
86 | 87 |
@@ -3,7 +3,7 @@ | ||
3 | 3 | // BathyScaphe |
4 | 4 | // |
5 | 5 | // Updated by Tsutomu Sawada on 10/03/07. |
6 | -// Copyright 2005-2014 BathyScaphe Project. All rights reserved. | |
6 | +// Copyright 2005-2015 BathyScaphe Project. All rights reserved. | |
7 | 7 | // encoding="UTF-8" |
8 | 8 | // |
9 | 9 |
@@ -155,6 +155,17 @@ | ||
155 | 155 | return can_readcgi(host); |
156 | 156 | } |
157 | 157 | |
158 | +bool is_bbspink(const char *host) | |
159 | +{ | |
160 | + if (host == NULL) { | |
161 | + return false; | |
162 | + } | |
163 | + if (strstr(host, ".bbspink.com")) { | |
164 | + return !strstr(host, "www."); | |
165 | + } | |
166 | + return false; | |
167 | +} | |
168 | + | |
158 | 169 | bool is_2ch_except_pink(const char *host) |
159 | 170 | { |
160 | 171 | if (host == NULL) { |
@@ -1,4 +1,6 @@ | ||
1 | 1 | 2015-03-23 tsawada2 <tsawada2@users.sourceforge.jp> |
2 | + * frameworks/CocoMonar/framework/src/CMRHostTypes.m | |
3 | + is_bbspink() ユーティリティ関数を追加。 | |
2 | 4 | * application/subproj/reply/error/SG2chErrorHandler.m |
3 | 5 | 書き込み時に title タグまたは <!-- 2ch_X:... --> からエラー内容を決定できない場合に、クッキー確認である |
4 | 6 | 可能性を考慮できていなかった問題を修正。 |