[gxml/serialization] Adding license and Autor data for parsing symbols tool
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml/serialization] Adding license and Autor data for parsing symbols tool
- Date: Tue, 1 Apr 2014 18:55:34 +0000 (UTC)
commit 08fbd4fea7e95d0e200408203825b87662a677ed
Author: Daniel Espinosa <esodan gmail com>
Date: Tue Apr 1 12:48:46 2014 -0600
Adding license and Autor data for parsing symbols tool
configure.ac | 2 +-
gxml/symbols.py | 36 +++++++++++++++++++++++++++++++-----
2 files changed, 32 insertions(+), 6 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 0fd0243..b36ef5e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -67,7 +67,7 @@ AC_PROG_CC
AM_PROG_CC_C_O
# Initialise libtools (handles library creation) with stuff from above
-LT_INIT([disable-static])
+LT_INIT()
PKG_PROG_PKG_CONFIG([0.21])
GLIB_GSETTINGS
diff --git a/gxml/symbols.py b/gxml/symbols.py
index d816e31..a836523 100755
--- a/gxml/symbols.py
+++ b/gxml/symbols.py
@@ -1,21 +1,47 @@
#!/usr/bin/python3
+# (C) 2014 Daniel Espinosa Ortiz
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# This programs parse an input file (like a header) to extract function names and
+# use them when create shared/static libraries in MinGW
+#
# You must specify the file to parse as command line argument
import fileinput
import re, os
-p = re.compile ('gxml_')
-f = open ("gxml.symbols", 'w')
-d = {'':''}
+# Configuration parameters
+# Change this acording with your proyect's function's prefix
+prefix = 'gxml_'
+# Change this the output file name
+filename = "gxml.symbols"
+# Add any symbols, prefixs or simple texts you want to skip from parsing
blacklist = ("error_quark", "gxml_last_error;", "gxml_warning")
+
+# Start parsing
+p = re.compile (prefix)
+f = open (filename, 'w')
+d = {'':''}
for line in fileinput.input():
bl = False
for b in blacklist:
if b in line:
bl = True
print ("found blacklist" + line)
- if ('gxml_' in line and not ('(gxml_' in line) and not bl):
+ if (prefix in line and not ('('+prefix in line) and not bl):
sp = line.split (" ")
for s in sp:
- if ('gxml_' in s):
+ if (prefix in s):
print("FOUND:" + s)
d[s] = s
ds = sorted (d)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]