- Restore io mode when returning from opening of synctex file
- Patch by David Tardon - Resolves: #613916
This commit is contained in:
parent
a30b1246bf
commit
ab2393f405
22
evince-2.31.5-synctex.patch
Normal file
22
evince-2.31.5-synctex.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
--- evince-2.31.5/cut-n-paste/synctex/synctex_parser.c 2010-06-27 16:49:01.000000000 +0200
|
||||||
|
+++ evince-2.31.5/cut-n-paste/synctex/synctex_parser.c 2010-07-16 12:00:49.000000000 +0200
|
||||||
|
@@ -2549,6 +2549,7 @@ int __synctex_open(const char * output,
|
||||||
|
char * quoteless = NULL;
|
||||||
|
const char * mode = synctex_io_modes[io_mode];
|
||||||
|
size_t size = 0;
|
||||||
|
+ synctex_io_mode_t orig_io_mode = io_mode;
|
||||||
|
/* now create the synctex file name */
|
||||||
|
size = strlen(output)+strlen(synctex_suffix)+strlen(synctex_suffix_gz)+1;
|
||||||
|
synctex_name = (char *)malloc(size);
|
||||||
|
@@ -2565,6 +2566,11 @@ return_on_error:
|
||||||
|
synctex_name = NULL;/* Don't forget to reinitialize. */
|
||||||
|
the_file = NULL; /* Here as well */
|
||||||
|
free(quoteless);
|
||||||
|
+ /* We _must_ restore the original mode. Otherwise, in
|
||||||
|
+ case it had been "r", later changed to "rb", the next
|
||||||
|
+ call might use "rb" and "w" and _create_ the file, if
|
||||||
|
+ the caller is not avare of the change! */
|
||||||
|
+ io_mode = orig_io_mode;
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
/* remove the last path extension if any */
|
10
evince.spec
10
evince.spec
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
Name: evince
|
Name: evince
|
||||||
Version: 2.31.5
|
Version: 2.31.5
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
Summary: Document viewer
|
Summary: Document viewer
|
||||||
|
|
||||||
License: GPLv2+ and GFDL
|
License: GPLv2+ and GFDL
|
||||||
@ -14,6 +14,8 @@ URL: http://projects.gnome.org/evince/
|
|||||||
Source0: http://download.gnome.org/sources/%{name}/2.31/%{name}-%{version}.tar.bz2
|
Source0: http://download.gnome.org/sources/%{name}/2.31/%{name}-%{version}.tar.bz2
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=562648
|
# https://bugzilla.redhat.com/show_bug.cgi?id=562648
|
||||||
Patch2: evince-t1font-mapping.patch
|
Patch2: evince-t1font-mapping.patch
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=613916
|
||||||
|
Patch3: evince-2.31.5-synctex.patch
|
||||||
|
|
||||||
BuildRequires: gtk3-devel
|
BuildRequires: gtk3-devel
|
||||||
BuildRequires: glib2-devel >= %{glib2_version}
|
BuildRequires: glib2-devel >= %{glib2_version}
|
||||||
@ -105,6 +107,7 @@ It adds an additional tab called "Document" to the file properties dialog.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch2 -p1 -b .t1font-map
|
%patch2 -p1 -b .t1font-map
|
||||||
|
%patch3 -p1 -b .synctex
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure \
|
%configure \
|
||||||
@ -236,6 +239,11 @@ glib-compile-schemas --allow-any-name %{_datadir}/glib-2.0/schemas ||:
|
|||||||
%{_libdir}/nautilus/extensions-2.0/libevince-properties-page.so
|
%{_libdir}/nautilus/extensions-2.0/libevince-properties-page.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jul 16 2010 Marek Kasik <mkasik@redhat.com> - 2.31.5-4
|
||||||
|
- Restore io mode when returning from opening of synctex file
|
||||||
|
- Patch by David Tardon
|
||||||
|
- Resolves: #613916
|
||||||
|
|
||||||
* Fri Jul 16 2010 Marek Kasik <mkasik@redhat.com> - 2.31.5-3
|
* Fri Jul 16 2010 Marek Kasik <mkasik@redhat.com> - 2.31.5-3
|
||||||
- Move %%doc files to evince-libs subpackage
|
- Move %%doc files to evince-libs subpackage
|
||||||
- see Subpackage Licensing in Packaging:LicensingGuidelines
|
- see Subpackage Licensing in Packaging:LicensingGuidelines
|
||||||
|
Loading…
Reference in New Issue
Block a user