SF.net SVN: geany:[2987] trunk/src/encodings.c

ntrel at users.sourceforge.net ntrel at xxxxx
Tue Sep 23 15:19:47 UTC 2008


Revision: 2987
          http://geany.svn.sourceforge.net/geany/?rev=2987&view=rev
Author:   ntrel
Date:     2008-09-23 15:19:46 +0000 (Tue, 23 Sep 2008)

Log Message:
-----------
Minor formatting edits.

Modified Paths:
--------------
    trunk/src/encodings.c

Modified: trunk/src/encodings.c
===================================================================
--- trunk/src/encodings.c	2008-09-23 14:46:42 UTC (rev 2986)
+++ trunk/src/encodings.c	2008-09-23 15:19:46 UTC (rev 2987)
@@ -256,7 +256,7 @@
 
 
 #ifdef HAVE_REGCOMP
-/* Regexp detection of file enconding declared in the file itself.
+/* Regexp detection of file encoding declared in the file itself.
  * Idea and parts of code taken from Bluefish, thanks.
  * regex_compile() is used to compile regular expressions on program init and keep it in memory
  * for faster access when opening a file. Pre-compiled regexps will be freed on program exit.
@@ -291,7 +291,7 @@
 	retval = regexec(preg, (tmp_buf != NULL) ? tmp_buf : buffer, 10, pmatch, 0);
 	if (retval == 0 && pmatch[0].rm_so != -1 && pmatch[1].rm_so != -1)
 	{
-		encoding = g_strndup(&buffer[pmatch[1].rm_so], pmatch[1].rm_eo-pmatch[1].rm_so);
+		encoding = g_strndup(&buffer[pmatch[1].rm_so], pmatch[1].rm_eo - pmatch[1].rm_so);
 		geany_debug("Detected encoding by regex search: %s", encoding);
 
 		setptr(encoding, g_utf8_strup(encoding, -1));


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