SF.net SVN: geany:[4684] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Sun Feb 21 13:30:31 UTC 2010


Revision: 4684
          http://geany.svn.sourceforge.net/geany/?rev=4684&view=rev
Author:   eht16
Date:     2010-02-21 13:30:31 +0000 (Sun, 21 Feb 2010)

Log Message:
-----------
Replace tabs by spaces.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/plugins/genapi.py

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2010-02-21 13:29:46 UTC (rev 4683)
+++ trunk/ChangeLog	2010-02-21 13:30:31 UTC (rev 4684)
@@ -5,6 +5,7 @@
    Replace tabs by spaces.
  * plugins/genapi.py:
    Minor fixes.
+   Replace tabs by spaces.
 
 
 2010-02-20 Dominic Hopf <dmaphy(at)googlemail(dot)com>

Modified: trunk/plugins/genapi.py
===================================================================
--- trunk/plugins/genapi.py	2010-02-21 13:29:46 UTC (rev 4683)
+++ trunk/plugins/genapi.py	2010-02-21 13:30:31 UTC (rev 4684)
@@ -26,30 +26,30 @@
 Creates macros for each plugin API function pointer, e.g.:
 
 #define plugin_add_toolbar_item \
-	geany_functions->p_plugin->plugin_add_toolbar_item
+    geany_functions->p_plugin->plugin_add_toolbar_item
 """
 
 
 import re, sys
 
 def get_function_names():
-	names = []
-	filep = open('../src/plugins.c')
-	while 1:
-		line = filep.readline()
-		if line == "":
-			break
-		match = re.match("^\t&([a-z][a-z0-9_]+)", line)
-		if match:
-			symbol = match.group(1)
-			if not symbol.endswith('_funcs'):
-				names.append(symbol)
-	filep.close()
-	return names
+    names = []
+    filep = open('../src/plugins.c')
+    while 1:
+        line = filep.readline()
+        if line == "":
+            break
+        match = re.match("^\t&([a-z][a-z0-9_]+)", line)
+        if match:
+            symbol = match.group(1)
+            if not symbol.endswith('_funcs'):
+                names.append(symbol)
+    filep.close()
+    return names
 
 def get_api_tuple(source):
-	match = re.match("^([a-z]+)_([a-z][a-z0-9_]+)$", source)
-	return 'p_' + match.group(1), match.group(2)
+    match = re.match("^([a-z]+)_([a-z][a-z0-9_]+)$", source)
+    return 'p_' + match.group(1), match.group(2)
 
 
 header = \
@@ -60,7 +60,7 @@
  *
  * E.g.:@code
  * #define plugin_add_toolbar_item \
- * 	geany_functions->p_plugin->plugin_add_toolbar_item @endcode
+ *  geany_functions->p_plugin->plugin_add_toolbar_item @endcode
  *
  * You need to declare the @ref geany_functions symbol yourself.
  *
@@ -73,22 +73,22 @@
 '''
 
 if __name__ == "__main__":
-	outfile = 'geanyfunctions.h'
+    outfile = 'geanyfunctions.h'
 
-	fnames = get_function_names()
-	if not fnames:
-		sys.exit("No function names read!")
+    fnames = get_function_names()
+    if not fnames:
+        sys.exit("No function names read!")
 
-	f = open(outfile, 'w')
-	print >> f, header % (outfile)
+    f = open(outfile, 'w')
+    print >> f, header % (outfile)
 
-	for fname in fnames:
-		ptr, name = get_api_tuple(fname)
-		# note: name no longer needed
-		print >> f, '#define %s \\\n\tgeany_functions->%s->%s' % (fname, ptr, fname)
+    for fname in fnames:
+        ptr, name = get_api_tuple(fname)
+        # note: name no longer needed
+        print >> f, '#define %s \\\n\tgeany_functions->%s->%s' % (fname, ptr, fname)
 
-	print >> f, '\n#endif'
-	f.close()
+    print >> f, '\n#endif'
+    f.close()
 
-	if not '-q' in sys.argv:
-		print 'Generated ' + outfile
+    if not '-q' in sys.argv:
+        print 'Generated ' + outfile


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