Revision: 4192
http://skim-app.svn.sourceforge.net/skim-app/?rev=4192&view=rev
Author: hofman
Date: 2008-07-11 11:53:31 -0700 (Fri, 11 Jul 2008)
Log Message:
-----------
rearrange code
Modified Paths:
--------------
trunk/SKPDFSynchronizer.m
Modified: trunk/SKPDFSynchronizer.m
===================================================================
--- trunk/SKPDFSynchronizer.m 2008-07-11 18:51:45 UTC (rev 4191)
+++ trunk/SKPDFSynchronizer.m 2008-07-11 18:53:31 UTC (rev 4192)
@@ -603,8 +603,8 @@
- (BOOL)synctexFindLine:(int *)line file:(NSString **)file
forLocation:(NSPoint)point inRect:(NSRect)rect atPageIndex:(unsigned
int)pageIndex {
#ifdef SYNCTEX_FEATURE
if (synctex_edit_query(scanner, (int)pageIndex + 1, PDF_TO_SYNC(point.x),
PDF_TO_SYNC(point.y)) > 0) {
- synctex_node_t node;
- if (node = synctex_next_result(scanner)) {
+ synctex_node_t node = synctex_next_result(scanner);
+ if (node) {
*line = synctex_node_line(node);
*file =
SKTeXSourceFile(SKPathFromFileSystemRepresentation(synctex_scanner_get_name(scanner,
synctex_node_tag(node))), [[self fileName] stringByDeletingLastPathComponent]);
return YES;
@@ -617,8 +617,8 @@
- (BOOL)synctexFindPage:(unsigned int *)pageIndex location:(NSPoint *)point
forLine:(int)line inFile:(NSString *)file {
#ifdef SYNCTEX_FEATURE
if (synctex_display_query(scanner, [file fileSystemRepresentation], line,
0) > 0) {
- synctex_node_t node;
- if ((node = synctex_next_result(scanner))) {
+ synctex_node_t node = synctex_next_result(scanner);
+ if (node) {
unsigned int page = synctex_node_page(node);
*pageIndex = page > 0 ? page - 1 : page;
*point = NSMakePoint(SYNC_TO_PDF(synctex_node_h(node)),
SYNC_TO_PDF(synctex_node_v(node)));
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit