Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Conflicts:
	src/gdk-pixbuf-hl.f90
  • Loading branch information
jtappin committed Dec 24, 2012
2 parents 227573e + 30a753e commit de4e7e0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
12 changes: 7 additions & 5 deletions src/cfwrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,11 @@ def translate_enums(errorsfile, enum_list):
parameters[0] = re.sub("(?<!')(,)(?!')", "", parameters[0])
parameters[0] = re.sub("(?m),$", "", parameters[0])

# Is it in hexadecimal ?
parameters[0] = re.sub("0x([0-9A-Fa-f]+)", "INT(z'\\1')", parameters[0])
# Is it a char ?
# Est-ce que ça marche ??????? (voir entiers)
parameters[0] = re.sub("('.?')", "iachar(\\1)", parameters[0])
# Is it in hexadecimal ?
parameters[0] = re.sub("0x([0-9A-Fa-f]+)", "INT(z'\\1')", parameters[0])
# Is it a bit field ?
# on ne sait pas comment sont codés les entiers !!!!!
# Utiliser les fonctions sur les bits ??????
Expand All @@ -168,7 +168,8 @@ def translate_enums(errorsfile, enum_list):
# complement
parameters[0] = re.sub("~(\w+)", "not(\\1)", parameters[0])
# logical or
parameters[0] = re.sub("([\w\(\)]+)\s*\|\s*([\w\(\)]+)", "ior(\\1 , \\2)", parameters[0])
# parameters[0] = re.sub("([\w\(\)]+)\s*\|\s*([\w\(\)]+)", "ior(\\1 , \\2)", parameters[0])
parameters[0] = re.sub("([\w\(\)]+)\s*\|\s*([\w\(\), \d]+)", "ior(\\1 , \\2)", parameters[0])

# Renamed flags (have the same name as a GTK+ function):
parameters[0] = re.sub("(?m)^\s*ATK_HYPERLINK_IS_INLINE", "ATK_HYPERLINK_IS_INLINE_F", parameters[0])
Expand Down Expand Up @@ -217,9 +218,10 @@ def translate_enums(errorsfile, enum_list):
"time_t":("integer(c_long)","c_long"), #typedef __time_t time_t;
"short":("integer(c_short)","c_short"),
"boolean":("logical(c_bool)","c_bool"),

# For gchar & guchar, see https://github.com/jerryd/gtk-fortran/issues/41#issuecomment-7337877
"gchar":("integer(kind=c_int8_t)","c_int8_t"), #("character(kind=c_char)","c_char"),
"guchar":("integer(kind=c_int8_t)","c_int8_t"), #("character(kind=c_char)","c_char"),
"gchar":("integer(kind=c_int8_t)","c_int8_t"), #("character(kind=c_char)","c_char"),
"guchar":("integer(kind=c_int8_t)","c_int8_t"), #("character(kind=c_char)","c_char"),
# "gboolean":("logical(c_bool)","c_bool"), typedef int gint; typedef gint gboolean;
"double": ("real(c_double)","c_double"),
"float":("real(c_float)","c_float"),
Expand Down
3 changes: 2 additions & 1 deletion src/gdk-pixbuf-hl.f90
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
! If not, see <http://www.gnu.org/licenses/>.
!
! Contributed by James Tappin
! Last modification: 07-19-2012
! Last modification: 12-13-2012

module gdk_pixbuf_hl

Expand Down Expand Up @@ -336,6 +336,7 @@ subroutine hl_gdk_pixbuf_get_pixels8(pixbuf, pixels)
& width=ncols, rowstride=rowstr)

allocate(pixels(nchans, ncols, nrows))

lpix = int(rowstr*(nrows-1) + ncols*nchans)

cpixels = gdk_pixbuf_get_pixels(pixbuf)
Expand Down

0 comments on commit de4e7e0

Please sign in to comment.