pdf-devel
[Top][All Lists]
Advanced

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

Re: [pdf-devel] Type 4 functions


From: Johannes Tax
Subject: Re: [pdf-devel] Type 4 functions
Date: Sat, 9 Jan 2010 21:22:48 +0100
User-agent: Mutt/1.5.19 (2009-01-05)

On [Sat, 09.01.2010 16:18], address@hidden wrote:
> 
> 
>    Treating this correctly would require attaching a type to every element
>    on the stack, I think something like
> 
>    struct stack_element_t {
>      enum type { BOOL, INT, REAL } t;
>      double v;
>    } stack[NSTACK+2];
> 
>    and a set of suitable predicates/accessors would do the job, some
>    additional checks for numerical constants and return values would be
>    required too. I don't know if this is considered neccessary. As far as 
>    I can see the current approach works well for all valid type 4 functions.
>    However, it also treats obviously invalid type 4 functions as valid ones.
>    I don't think that fixing this requires too much effort.
> 
> I would go in that direction.  It is much better to clearly identify
> the type of the elements in the stack.  Error checking and management
> of invalid functions is as important as the management of correct
> functions.
> 
> I just created a flyspray task for this problem.  Would you like to
> fix it yourself?  In that case, please pick the task.
Ok, so I will pick this one and the type 4 unit tests.

> [...]
> As for the tests, please don't use system functions like mod_f
> directly, but create a pdf_fp_mod function for that purpose in
> pdf-fp.[ch] (see pdf-fp.h for examples like sqrt, sin, cos, etc).
Ok.

Regards,
Johannes

-- 
Johannes Tax
address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]