[poppler] [PATCH] pdfdetach: don't mention xpdfrc

Albert Astals Cid aacid at kde.org
Thu Aug 8 11:41:21 PDT 2013


Commited, thanks.

Cheers,
  Albert

El Dilluns, 5 d'agost de 2013, a les 01:08:10, Yury G. Kudryashov va escriure:
> From: "Yury G. Kudryashov" <urkud.urkud at gmail.com>
> 
> - drop -cfg command line argument; the old code passed its value to
>   GlobalParams constructor instead of data dir;
> - remove corresponding lines from pdfdetach.1;
> - fix '-enc' documentation in pdfdetach.1.
> ---
>  utils/pdfdetach.1  | 23 +++--------------------
>  utils/pdfdetach.cc |  5 +----
>  2 files changed, 4 insertions(+), 24 deletions(-)
> 
> diff --git a/utils/pdfdetach.1 b/utils/pdfdetach.1
> index c80dde7..2bba58b 100644
> --- a/utils/pdfdetach.1
> +++ b/utils/pdfdetach.1
> @@ -11,14 +11,6 @@ extractor (version 3.03)
>  .B Pdfdetach
>  lists or extracts embedded files (attachments) from a Portable
>  Document Format (PDF) file.
> -.SH CONFIGURATION FILE
> -Pdfdetach reads a configuration file at startup.  It first tries to
> -find the user's private config file, ~/.xpdfrc.  If that doesn't
> -exist, it looks for a system-wide config file, typically
> -/usr/local/etc/xpdfrc (but this location can be changed when pdfinfo
> -is built).  See the
> -.BR xpdfrc (5)
> -man page for details.
>  .SH OPTIONS
>  Some of the following options can be set with configuration file
>  commands.  These are listed in square brackets with the description of
> @@ -44,12 +36,8 @@ Set the file name used when saving an embedded file with
> the "\-save" switch, or the directory used by "\-saveall".
>  .TP
>  .BI \-enc " encoding-name"
> -Sets the encoding to use for text output (embedded file names).  The
> -.I encoding\-name
> -must be defined with the unicodeMap command (see
> -.BR xpdfrc (5)).
> -This defaults to "Latin1" (which is a built-in encoding).
> -.RB "[config file: " textEncoding ]
> +Sets the encoding to use for text output (embedded file names).
> +This defaults to "UTF-8".
>  .TP
>  .BI \-opw " password"
>  Specify the owner password for the PDF file.  Providing this will
> @@ -58,11 +46,6 @@ bypass all security restrictions.
>  .BI \-upw " password"
>  Specify the user password for the PDF file.
>  .TP
> -.BI \-cfg " config-file"
> -Read
> -.I config-file
> -in place of ~/.xpdfrc or the system-wide config file.
> -.TP
>  .B \-v
>  Print copyright and version information.
>  .TP
> @@ -100,4 +83,4 @@ Cog, LLC.
>  .BR pdftohtml (1),
>  .BR pdftoppm (1),
>  .BR pdftops (1),
> -.BR pdftotext (1)
> \ No newline at end of file
> +.BR pdftotext (1)
> diff --git a/utils/pdfdetach.cc b/utils/pdfdetach.cc
> index 3fbdfb7..3e19c37 100644
> --- a/utils/pdfdetach.cc
> +++ b/utils/pdfdetach.cc
> @@ -46,7 +46,6 @@ static char savePath[1024] = "";
>  static char textEncName[128] = "";
>  static char ownerPassword[33] = "\001";
>  static char userPassword[33] = "\001";
> -static char cfgFileName[256] = "";
>  static GBool printVersion = gFalse;
>  static GBool printHelp = gFalse;
> 
> @@ -65,8 +64,6 @@ static ArgDesc argDesc[] = {
>     "owner password (for encrypted files)"},
>    {"-upw",    argString,   userPassword,   sizeof(userPassword),
>     "user password (for encrypted files)"},
> -  {"-cfg",        argString,      cfgFileName,    sizeof(cfgFileName),
> -   "configuration file to use in place of .xpdfrc"},
>    {"-v",      argFlag,     &printVersion,  0,
>     "print copyright and version info"},
>    {"-h",      argFlag,     &printHelp,     0,
> @@ -121,7 +118,7 @@ int main(int argc, char *argv[]) {
>    fileName = new GooString(argv[1]);
> 
>    // read config file
> -  globalParams = new GlobalParams(cfgFileName);
> +  globalParams = new GlobalParams();
>    if (textEncName[0]) {
>      globalParams->setTextEncoding(textEncName);
>    }



More information about the poppler mailing list