# Re: Compiling on OS/2

From: Franz Bakan (fbakan@gmx.net)
Date: Tue Jun 05 2001 - 15:47:43 PDT

- Next message: Franz Bakan: "Re: Compiling on OS/2"
  - Previous message: Franz Bakan: "size of xcam (was Re: Compiling on OS/2)"
  - In reply to: Henning Meier-Geinitz: "Re: Compiling on OS/2"
  - Next in thread: Henning Meier-Geinitz: "Re: Compiling on OS/2"
  - Reply: Henning Meier-Geinitz: "Re: Compiling on OS/2"
  - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

  Hi,

  On Tue, 5 Jun 2001 19:49:23 +0200, Henning Meier-Geinitz wrote:

  >I guess colons are
  >not allowed in OS/2 filenames? The usual name of a xcam file is
  >"pnm:0.rc".

  Yes that's the reason

  >
  >So maybe the filename can be changed to contain an allowed character
  >instead of ":".

  With this patch it works: ( diff -c )

  *** xcam.c.bak Tue May 29 01:19:46 2001
  --- xcam.c Wed Jun 6 00:42:42 2001
  ***************
  *** 215,220 ****
  --- 215,227 ----
  {
  int fd;
  + #if defined(HAVE_OS2_H)
  + char *colon;
  +
  + colon = strchr((filename+3),58);
  + colon[0] = '-';
  + #endif
  +
  fd = open (filename, O_WRONLY | O_CREAT | O_TRUNC, 0666);
  if (fd < 0)
  {
  ***************
  *** 237,242 ****
  --- 244,256 ----
  char buf[2*PATH_MAX];
  char *end;
  int fd;
  +
  + #if defined(HAVE_OS2_H)
  + char *colon;
  +
  + colon = strchr((filename+3),58);
  + colon[0] = '-';
  + #endif
  fd = open (filename, O_RDONLY);
  if (fd < 0)

  Perhaps you can implement this in a more elegant way
  and include in xcam.c

  Bye,
  Franz

      --
      Source code, list archive, and docs: http://www.mostang.com/sane/
      To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com

  - Next message: Franz Bakan: "Re: Compiling on OS/2"
  - Previous message: Franz Bakan: "size of xcam (was Re: Compiling on OS/2)"
  - In reply to: Henning Meier-Geinitz: "Re: Compiling on OS/2"
  - Next in thread: Henning Meier-Geinitz: "Re: Compiling on OS/2"
  - Reply: Henning Meier-Geinitz: "Re: Compiling on OS/2"
  - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

  This archive was generated by hypermail 2b29 : Tue Jun 05 2001 - 15:44:51 PDT