Hylafax Mailing List Archives

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: typerules man page error: operators only for numbers



At 08:37 12/01/99 +0000, David Wooley wrote:
>As the result of an off list reply to my pointer to reading the typerules
>man page for the handling of (presumed) ISO 8859/1 text, I've become
>aware that the typerules man page is wrong.
>

Dear David,

Sorry for the delay in picking this up. I have read the typerules man
page several times now, and as is usual with man pages, the more times
it is read, the less I think I understand it.

You said:
>It says that x always matches anything, whereas the code only recognizes
>operators for types other than ascii and string, i.e. numeric types.
>Anything in the match field for string is actually taken literally,
>give or take any quoting of spaces (if it supports this), and is don't
>care for ascii.
>

Can I rephase and expand on the above? - I think you are saying :
  1. 'x' always matches anything; and can be thought of as a wildcard
     character. 
  2. numeric types can be matched with various operators =, >, >=, etc.
     When no operator is specified '=' is assumed.
  3. for string datatypes, anything in the match field is taken literally.

On the basis of the above, I have changed the source file and a patch is
attached below. I have also taken the liberty of correcting a spelling
error and improving the presentation.

Any comments before I submit it to Matthias?

Regards,
Phil.

# typerules-man.patch
# PK Watkinson 17-Feb-99
# apply from main source directory with 'patch -bp0 <typerules-man.patch'
*** man/typerules.4f.orig	Sat Feb 14 10:51:17 1998
--- man/typerules.4f	Wed Feb 17 09:56:58 1999
***************
*** 28,34 ****
  .if n .po 0
  .ds Fx \fIHyla\s-1FAX\s+1\fP
  .ds Ps P\s-2OST\s+2S\s-2CRIPT\s+2
! .TH TYPERULES 4F "May 12, 1993"
  .SH NAME
  typerules \- \*(Fx file type identification and conversion rules
  .SH DESCRIPTION
--- 28,34 ----
  .if n .po 0
  .ds Fx \fIHyla\s-1FAX\s+1\fP
  .ds Ps P\s-2OST\s+2S\s-2CRIPT\s+2
! .TH TYPERULES 5F "February 17, 1999"
  .SH NAME
  typerules \- \*(Fx file type identification and conversion rules
  .SH DESCRIPTION
***************
*** 106,116 ****
  .B match
  The value and operation to use in matching; the value used is
  based on the datatype field.
  If value is ``x'', then
  it is interpreted to mean 
  .IR "match anything" ;
! otherwise the
! following operators are supported (where
  .I data
  is the value extracted from the file and
  .I value
--- 106,125 ----
  .B match
  The value and operation to use in matching; the value used is
  based on the datatype field.
+ .PP
  If value is ``x'', then
  it is interpreted to mean 
  .IR "match anything" ;
! and can be thought of as a wildcard symbol.
! Otherwise if the datatype is numerical (byte, short
! or long) boolean operators can be used. When no operator
! is specifed, then 
! ``=''
! is assumed.
! For non\-numeric datatypes (string or ascii), anything
! in the value field is taken literally.
! .PP
! For numeric datatypes, the following operators are supported (where
  .I data
  is the value extracted from the file and
  .I value
***************
*** 163,169 ****
  %l	page length in mm
  %L	page length in pixels
  %s	page size by name
! %F	the directry where \*(Fx filter programs reside
  %<x>	the <x> character (e.g. ``%%'' results in ``%''
  .RE
  .sp .5
--- 172,178 ----
  %l	page length in mm
  %L	page length in pixels
  %s	page size by name
! %F	the directory where \*(Fx filter programs reside
  %<x>	the <x> character (e.g. ``%%'' results in ``%''
  .RE
  .sp .5
***************
*** 176,184 ****
  .sp .5
  .ta \w'offset    'u +\w'datatype    'u +\w'#Inventor V    'u +\w'result
 'u +\w'command        'u
  #offset	datatype	match	result	command
! 0	string	%!	ps		# \*(Ps
! 0	short	0x4d4d	tiff		# big-endian \s-1TIFF\s+1
! 0	short	0x4949	tiff		# little-endian \s-1TIFF\s+1
  .fi
  .PP
  These rules are used to process the
--- 185,193 ----
  .sp .5
  .ta \w'offset    'u +\w'datatype    'u +\w'#Inventor V    'u +\w'result
 'u +\w'command        'u
  #offset	datatype	match	result	command
! 0	string	%!	ps	# \*(Ps
! 0	short	0x4d4d	tiff	# big-endian \s-1TIFF\s+1
! 0	short	0x4949	tiff	# little-endian \s-1TIFF\s+1
  .fi
  .PP
  These rules are used to process the

 



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services