diff options
author | Taco Hoekwater <taco@elvenkind.com> | 2007-01-02 13:17:22 +0000 |
---|---|---|
committer | Taco Hoekwater <taco@elvenkind.com> | 2007-01-02 13:17:22 +0000 |
commit | 5fc1b46d4e320f0c9d5d42991d1755b454fa634f (patch) | |
tree | cc72b8fa8707e1bd1f8c1dfad96c4135b5a49447 /Build/source/utils/pdfopen | |
parent | f31230c2fb7facf74ecb2150691a0171d2d7cd5f (diff) |
version 0.51, use strrchr() instead of rindex()
git-svn-id: svn://tug.org/texlive/trunk@3098 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/pdfopen')
-rw-r--r-- | Build/source/utils/pdfopen/README | 9 | ||||
-rw-r--r-- | Build/source/utils/pdfopen/pdfopen.c | 6 |
2 files changed, 9 insertions, 6 deletions
diff --git a/Build/source/utils/pdfopen/README b/Build/source/utils/pdfopen/README index 0e3e13b1dc2..3072326118c 100644 --- a/Build/source/utils/pdfopen/README +++ b/Build/source/utils/pdfopen/README @@ -1,7 +1,7 @@ --------------------------------------------------------- -Pdfopen 0.5 - Send open/close commands to Acrobat Reader --------------------------------------------------------- +--------------------------------------------------------- +Pdfopen 0.51 - Send open/close commands to Acrobat Reader +--------------------------------------------------------- This is a Linux (X11) implementation of Fabrice Popineau's pdfclose/ pdfopen commands to control the Acrobat Reader. @@ -19,6 +19,9 @@ building under X11R5, handles pathnames on the command-line, and fixes a bug where pdfopen did not exit correctly after (automatically) starting acroread. +Version 0.51 uses the strrchr() function instead of rindex() +to allow compilation on non-BSD derived unix platforms. + The command lines do not behave precisely the same as under Windows, because the Linux Reader behaves somewhat different: it is not scriptable, but it is possible to 'fake' keypresses. diff --git a/Build/source/utils/pdfopen/pdfopen.c b/Build/source/utils/pdfopen/pdfopen.c index f4eba4b3cfb..26ea994419b 100644 --- a/Build/source/utils/pdfopen/pdfopen.c +++ b/Build/source/utils/pdfopen/pdfopen.c @@ -11,7 +11,7 @@ extern int sendx_control_token(char *,char *); extern int sendx_alt_token(char *,char *); void usage (void) { - puts ("pdfopen 0.5: you are mistaking me for an actual program.\n"); + puts ("pdfopen 0.51: you are mistaking me for an actual program.\n"); puts(" pdfopen [--file filename.pdf]"); puts ("\nusing no arguments tells the Reader to 'go back'.\n"); } @@ -41,8 +41,8 @@ int main (int argc, char **argv){ } strcpy(filename,argv[2]); strcpy(basefile,filename); - if (rindex(basefile,'/')) - basefile = rindex(basefile,'/')+1; + if (strrchr(basefile,'/')) + basefile = strrchr(basefile,'/')+1; winname = malloc(strlen(argv[2])+1+strlen(READERWINPREFIX)); if (winname == NULL ) { |