SF.net SVN: geany: [1697] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Thu Jul 12 18:07:49 UTC 2007


Revision: 1697
          http://svn.sourceforge.net/geany/?rev=1697&view=rev
Author:   eht16
Date:     2007-07-12 11:07:49 -0700 (Thu, 12 Jul 2007)

Log Message:
-----------
Add shebang-like detection for PHP files starting with "<?php".

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/filetypes.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2007-07-12 17:16:44 UTC (rev 1696)
+++ trunk/ChangeLog	2007-07-12 18:07:49 UTC (rev 1697)
@@ -3,6 +3,8 @@
  * src/document.c, src/editor.c:
    Use again the usual, previous way of line scrolling and use
    SCI_SETXCARETPOLICY for horizontal scrolling.
+ * src/filetypes.c:
+   Add shebang-like detection for PHP files starting with "<?php".
 
 
 2007-07-12  Nick Treleaven  <nick.treleaven at btinternet.com>

Modified: trunk/src/filetypes.c
===================================================================
--- trunk/src/filetypes.c	2007-07-12 17:16:44 UTC (rev 1696)
+++ trunk/src/filetypes.c	2007-07-12 18:07:49 UTC (rev 1697)
@@ -653,6 +653,10 @@
 
 			ft = filetypes[GEANY_FILETYPES_XML];
 	}
+	else if (strncmp(line, "<?php", 5) == 0)
+	{
+		ft = filetypes[GEANY_FILETYPES_PHP];
+	}
 
 	g_free(line);
 	return ft;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list