/*ÆüËܸìÆ°»ì³èÍÑ (ÂǤġäÂǤäÆ,ÂǤÁ etc) */
+/* JVERB_AND: ²¥¤ë,½³¤ë > ²¥¤ê,½³¤ë */
+/* JVERB_TO: ²¥¤ë,½³¤ë > ²¥¤Ã¤Æ½³¤ë */
+/* JVERB_OR: ²¥¤ë,½³¤ë > ²¥¤Ã¤¿¤ê½³¤Ã¤¿¤ê */
+
+static const struct jverb_table_t {
+ const char* from;
+ const char* to[3];
+} jverb_table[] = {
+ { "¤¹¤ë", {"¤·", "¤·¤Æ", "¤·¤¿"}},
+ { "¤¤¤ë", {"¤¤¤Æ", "¤¤¤Æ", "¤¤¤¿"}},
+
+ { "¤¨¤ë", {"¤¨", "¤¨¤Æ", "¤¨¤¿"}},
+ { "¤±¤ë", {"¤±", "¤±¤Æ", "¤±¤¿"}},
+ { "¤²¤ë", {"¤²", "¤¨¤Æ", "¤²¤¿"}},
+ { "¤»¤ë", {"¤»", "¤»¤Æ", "¤»¤¿"}},
+ { "¤¼¤ë", {"¤¼", "¤¼¤Æ", "¤¼¤¿"}},
+ { "¤Æ¤ë", {"¤Æ", "¤Æ¤Ã¤Æ", "¤Æ¤Ã¤¿"}},
+ { "¤Ç¤ë", {"¤Ç", "¤Ç¤Æ", "¤Ç¤¿"}},
+ { "¤Í¤ë", {"¤Í", "¤Í¤Æ", "¤Í¤¿"}},
+ { "¤Ø¤ë", {"¤Ø", "¤Ø¤Æ", "¤Ø¤¿"}},
+ { "¤Ù¤ë", {"¤Ù", "¤Ù¤Æ", "¤Ù¤¿"}},
+ { "¤á¤ë", {"¤á", "¤á¤Æ", "¤á¤¿"}},
+ { "¤ì¤ë", {"¤ì", "¤ì¤Æ", "¤ì¤¿"}},
+
+ { "¤¦", {"¤¤", "¤Ã¤Æ", "¤Ã¤¿"}},
+ { "¤¯", {"¤", "¤¤¤Æ", "¤¤¤¿"}},
+ { "¤°", {"¤®", "¤¤¤Ç", "¤¤¤À"}},
+ { "¤¹", {"¤·", "¤·¤Æ", "¤·¤¿"}},
+ { "¤º", {"¤¸", "¤¸¤Æ", "¤¸¤¿"}},
+ { "¤Ä", {"¤Á", "¤Ã¤Æ", "¤Ã¤¿"}},
+ { "¤Å", {"¤Â", "¤Ã¤Æ", "¤Ã¤¿"}},
+ { "¤Ì", {"¤Ë", "¤Í¤Æ", "¤Í¤¿"}},
+ { "¤Õ", {"¤Ò", "¤Ø¤Æ", "¤Ø¤¿"}},
+ { "¤Ö", {"¤Ó", "¤ó¤Ç", "¤ó¤À"}},
+ { "¤à", {"¤ß", "¤ó¤Ç", "¤ó¤À"}},
+ { "¤ë", {"¤ê", "¤Ã¤Æ", "¤Ã¤¿"}},
+ { NULL, {"¤½¤·¤Æ", "¤³¤È¤Ë¤è¤ê", "¤³¤È¤ä"}},
+};
+
+void jverb(const char *in , char *out , int flag)
+{
+ const struct jverb_table_t * p;
+ int in_len = strlen(in);
+
+ strcpy(out, in);
+
+ for (p = jverb_table; p->from; p++) {
+ int from_len = strlen(p->from);
+ if (strncmp(&in[in_len-from_len], p->from, from_len) == 0) {
+ strcpy(&out[in_len - from_len], p->to[flag - 1]);
+ break;
+ }
+ }
-#define CMPTAIL(y) strncmp(&in[l-(int)strlen(y)],y,strlen(y))
-
-/* ²¥¤ë,½³¤ë¡ä²¥¤ê,½³¤ë */
-void jverb1( const char *in , char *out){
-int l=strlen(in);
-strcpy(out,in);
-
-if( CMPTAIL("¤¹¤ë")==0) sprintf(&out[l-4],"¤·");else
-if( CMPTAIL("¤¤¤ë")==0) sprintf(&out[l-4],"¤¤¤Æ");else
-
-if( CMPTAIL("¤¨¤ë")==0) sprintf(&out[l-4],"¤¨");else
-if( CMPTAIL("¤±¤ë")==0) sprintf(&out[l-4],"¤±");else
-if( CMPTAIL("¤²¤ë")==0) sprintf(&out[l-4],"¤²");else
-if( CMPTAIL("¤»¤ë")==0) sprintf(&out[l-4],"¤»");else
-if( CMPTAIL("¤¼¤ë")==0) sprintf(&out[l-4],"¤¼");else
-if( CMPTAIL("¤Æ¤ë")==0) sprintf(&out[l-4],"¤Æ");else
-if( CMPTAIL("¤Ç¤ë")==0) sprintf(&out[l-4],"¤Ç");else
-if( CMPTAIL("¤Í¤ë")==0) sprintf(&out[l-4],"¤Í");else
-if( CMPTAIL("¤Ø¤ë")==0) sprintf(&out[l-4],"¤Ø");else
-if( CMPTAIL("¤Ù¤ë")==0) sprintf(&out[l-4],"¤Ù");else
-if( CMPTAIL("¤á¤ë")==0) sprintf(&out[l-4],"¤á");else
-if( CMPTAIL("¤ì¤ë")==0) sprintf(&out[l-4],"¤ì");else
-
-if( CMPTAIL("¤¦")==0) sprintf(&out[l-2],"¤¤");else
-if( CMPTAIL("¤¯")==0) sprintf(&out[l-2],"¤");else
-if( CMPTAIL("¤°")==0) sprintf(&out[l-2],"¤®");else
-if( CMPTAIL("¤¹")==0) sprintf(&out[l-2],"¤·");else
-if( CMPTAIL("¤º")==0) sprintf(&out[l-2],"¤¸");else
-if( CMPTAIL("¤Ä")==0) sprintf(&out[l-2],"¤Á");else
-if( CMPTAIL("¤Å")==0) sprintf(&out[l-2],"¤Â");else
-if( CMPTAIL("¤Ì")==0) sprintf(&out[l-2],"¤Ë");else
-if( CMPTAIL("¤Õ")==0) sprintf(&out[l-2],"¤Ò");else
-if( CMPTAIL("¤Ö")==0) sprintf(&out[l-2],"¤Ó");else
-if( CMPTAIL("¤à")==0) sprintf(&out[l-2],"¤ß");else
-if( CMPTAIL("¤ë")==0) sprintf(&out[l-2],"¤ê");else
-
- sprintf(&out[l],"¤½¤·¤Æ");}
-
-/* ²¥¤ë,½³¤ë> ²¥¤Ã¤Æ½³¤ë */
-void jverb2( const char *in , char *out){
-int l=strlen(in);
-strcpy(out,in);
-
-if( CMPTAIL("¤¹¤ë")==0) sprintf(&out[l-4],"¤·¤Æ");else
-if( CMPTAIL("¤¤¤ë")==0) sprintf(&out[l-4],"¤¤¤Æ");else
-
-if( CMPTAIL("¤¨¤ë")==0) sprintf(&out[l-4],"¤¨¤Æ");else
-if( CMPTAIL("¤±¤ë")==0) sprintf(&out[l-4],"¤±¤Æ");else
-if( CMPTAIL("¤²¤ë")==0) sprintf(&out[l-4],"¤²¤Æ");else
-if( CMPTAIL("¤»¤ë")==0) sprintf(&out[l-4],"¤»¤Æ");else
-if( CMPTAIL("¤¼¤ë")==0) sprintf(&out[l-4],"¤¼¤Æ");else
-if( CMPTAIL("¤Æ¤ë")==0) sprintf(&out[l-4],"¤Æ¤Ã¤Æ");else
-if( CMPTAIL("¤Ç¤ë")==0) sprintf(&out[l-4],"¤Ç¤Æ");else
-if( CMPTAIL("¤Í¤ë")==0) sprintf(&out[l-4],"¤Í¤Æ");else
-if( CMPTAIL("¤Ø¤ë")==0) sprintf(&out[l-4],"¤Ø¤Æ");else
-if( CMPTAIL("¤Ù¤ë")==0) sprintf(&out[l-4],"¤Ù¤Æ");else
-if( CMPTAIL("¤á¤ë")==0) sprintf(&out[l-4],"¤á¤Æ");else
-if( CMPTAIL("¤ì¤ë")==0) sprintf(&out[l-4],"¤ì¤Æ");else
-
-if( CMPTAIL("¤¦")==0) sprintf(&out[l-2],"¤Ã¤Æ");else
-if( CMPTAIL("¤¯")==0) sprintf(&out[l-2],"¤¤¤Æ");else
-if( CMPTAIL("¤°")==0) sprintf(&out[l-2],"¤¤¤Ç");else
-if( CMPTAIL("¤¹")==0) sprintf(&out[l-2],"¤·¤Æ");else
-if( CMPTAIL("¤º")==0) sprintf(&out[l-2],"¤¸¤Æ");else
-if( CMPTAIL("¤Ä")==0) sprintf(&out[l-2],"¤Ã¤Æ");else
-if( CMPTAIL("¤Å")==0) sprintf(&out[l-2],"¤Ã¤Æ");else
-if( CMPTAIL("¤Ì")==0) sprintf(&out[l-2],"¤Í¤Æ");else
-if( CMPTAIL("¤Õ")==0) sprintf(&out[l-2],"¤Ø¤Æ");else
-if( CMPTAIL("¤Ö")==0) sprintf(&out[l-2],"¤ó¤Ç");else
-if( CMPTAIL("¤à")==0) sprintf(&out[l-2],"¤ó¤Ç");else
-if( CMPTAIL("¤ë")==0) sprintf(&out[l-2],"¤Ã¤Æ");else
- sprintf(&out[l],"¤³¤È¤Ë¤è¤ê");}
-
-/* ²¥¤ë,½³¤ë > ²¥¤Ã¤¿¤ê½³¤Ã¤¿¤ê */
-void jverb3( const char *in , char *out){
-int l=strlen(in);
-strcpy(out,in);
-
-if( CMPTAIL("¤¹¤ë")==0) sprintf(&out[l-4],"¤·¤¿");else
-if( CMPTAIL("¤¤¤ë")==0) sprintf(&out[l-4],"¤¤¤¿");else
-
-if( CMPTAIL("¤¨¤ë")==0) sprintf(&out[l-4],"¤¨¤¿");else
-if( CMPTAIL("¤±¤ë")==0) sprintf(&out[l-4],"¤±¤¿");else
-if( CMPTAIL("¤²¤ë")==0) sprintf(&out[l-4],"¤²¤¿");else
-if( CMPTAIL("¤»¤ë")==0) sprintf(&out[l-4],"¤»¤¿");else
-if( CMPTAIL("¤¼¤ë")==0) sprintf(&out[l-4],"¤¼¤¿");else
-if( CMPTAIL("¤Æ¤ë")==0) sprintf(&out[l-4],"¤Æ¤Ã¤¿");else
-if( CMPTAIL("¤Ç¤ë")==0) sprintf(&out[l-4],"¤Ç¤¿");else
-if( CMPTAIL("¤Í¤ë")==0) sprintf(&out[l-4],"¤Í¤¿");else
-if( CMPTAIL("¤Ø¤ë")==0) sprintf(&out[l-4],"¤Ø¤¿");else
-if( CMPTAIL("¤Ù¤ë")==0) sprintf(&out[l-4],"¤Ù¤¿");else
-if( CMPTAIL("¤á¤ë")==0) sprintf(&out[l-4],"¤á¤¿");else
-if( CMPTAIL("¤ì¤ë")==0) sprintf(&out[l-4],"¤ì¤¿");else
-
-if( CMPTAIL("¤¦")==0) sprintf(&out[l-2],"¤Ã¤¿");else
-if( CMPTAIL("¤¯")==0) sprintf(&out[l-2],"¤¤¤¿");else
-if( CMPTAIL("¤°")==0) sprintf(&out[l-2],"¤¤¤À");else
-if( CMPTAIL("¤¹")==0) sprintf(&out[l-2],"¤·¤¿");else
-if( CMPTAIL("¤º")==0) sprintf(&out[l-2],"¤¸¤¿");else
-if( CMPTAIL("¤Ä")==0) sprintf(&out[l-2],"¤Ã¤¿");else
-if( CMPTAIL("¤Å")==0) sprintf(&out[l-2],"¤Ã¤¿");else
-if( CMPTAIL("¤Ì")==0) sprintf(&out[l-2],"¤Í¤¿");else
-if( CMPTAIL("¤Õ")==0) sprintf(&out[l-2],"¤Ø¤¿");else
-if( CMPTAIL("¤Ö")==0) sprintf(&out[l-2],"¤ó¤À");else
-if( CMPTAIL("¤à")==0) sprintf(&out[l-2],"¤ó¤À");else
-if( CMPTAIL("¤ë")==0) sprintf(&out[l-2],"¤Ã¤¿");else
- sprintf(&out[l],"¤³¤È¤ä");}
-
-
-void jverb( const char *in , char *out , int flag){
- switch (flag){
- case JVERB_AND:jverb1(in , out);break;
- case JVERB_TO :jverb2(in , out);break;
- case JVERB_OR :jverb3(in , out);break;
- }
+ if (p->from == NULL)
+ strcpy(&out[in_len], p->to[flag - 1]);
}