[Namazu-cvs 1055] r273 - MMagic/trunk

cvsd @ vaj.namazu.org cvsd @ vaj.namazu.org
2006年 9月 19日 (火) 13:37:43 JST


Author: knok
Date: 2006-09-19 13:37:42 +0900 (Tue, 19 Sep 2006)
New Revision: 273

Modified:
   MMagic/trunk/ChangeLog
   MMagic/trunk/MMagic.pm
Log:
Added hex patch.


Modified: MMagic/trunk/ChangeLog
===================================================================
--- MMagic/trunk/ChangeLog	2006-07-01 08:11:09 UTC (rev 272)
+++ MMagic/trunk/ChangeLog	2006-09-19 04:37:42 UTC (rev 273)
@@ -1,3 +1,8 @@
+2006-09-19  NOKUBI Takatsugu  <knok @ daionet.gr.jp>
+
+	* MMagic.pm (readMagicLine): Added Hex representation support.
+	  (The patch made by Man Min Yan, thank you)
+
 2006-07-01  NOKUBI Takatsugu  <knok @ daionet.gr.jp>
 
 	* MMagic.pm (checktype_container): Added container check.
@@ -2,3 +7,3 @@
 	  (Powerd by CodeFest 2006 Akihabara
-	   https://members.fsij.org/trac/codefestakihabara2006)
+	   https://members.fsij.org/trac/codefestakihabara2006c)
 

Modified: MMagic/trunk/MMagic.pm
===================================================================
--- MMagic/trunk/MMagic.pm	2006-07-01 08:11:09 UTC (rev 272)
+++ MMagic/trunk/MMagic.pm	2006-09-19 04:37:42 UTC (rev 273)
@@ -1278,7 +1278,10 @@
 	$testval = $line;
 
 	# do octal/hex conversion
-	$testval =~ s/\\([x0-7][0-7]?[0-7]?)/chr(oct($1))/eg;
+	# manmin
+	$testval =~ s/\\(x[0-9a-fA-F][0-9a-fA-F])/chr(oct($1))/eg;
+	$testval =~ s/\\([0-7][0-7]?[0-7]?)/chr(oct($1))/eg;
+	# end manmin
 
 	# do single char escapes
 	$testval =~ s/\\(.)/$ESC{$1}||$1/eg;




Namazu-cvs メーリングリストの案内