Re: Initial Header for Islamic Date functions



On Sat, Dec 02, 2000 at 02:42:39PM -0200, Ali Abdin wrote:
> Here is an initial header file for the Islamic Date functions.
> 
> I would appreciate it if people read it and provide feedback (especially for
> the FIXME's!)

Well, I'm not too much into glib anymore, but I spotted two bugs ;-)

> typedef enum
> {
>   G_ISLAMIC_DATE_BAD_MONTH    = 0,
>   G_ISLAMIC_DATE_MUHARRAM     = 1,
>   G_ISLAMIC_DATE_SAFAR	      = 2,
>   G_ISLAMIC_DATE_RABI1	      = 3,
>   G_ISLAMIC_DATE_RABI2	      = 4,
>   G_ISLAMIC_DATE_JUMADA1      = 5,
>   G_ISLAMIC_DATE_JUMADA2      = 6,
>   G_ISLAMIC_DATE_RAJAB	      = 7,
>   G_ISLAMIC_DATE_SHAABAN      = 8,
>   G_ISLAMIC_DATE_RAMADAN      = 9,
>   G_ISLAMIC_DATE_SHAWAL	      = 10,
>   G_ISLAMIC_DATE_DHU-AL-QHADA = 11,
                      ^^^^^^^^^
This doesn't work. It will be interpreted by the preprocessor as:

  G_ISLAMIC_DATE_DHU - AL - QHADA = 11,

Which doesn't make sense because it's not an lvalue. I suggest renaming
it into G_ISLAMIC_DATE_DHU_AL_QHADA.

>   G_ISLAMIC_DATE_DHU-AL-Hijja = 12
                      ^^^^^^^^^
Same over here. And I'd suggest to print the Hijja part also in all
capitals, just to be consistent with the other months.

> } GIslamicDateMonth;


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2783635  Fax: +31-15-2781843  Email: J A K Mouw its tudelft nl
WWW: http://www-ict.its.tudelft.nl/~erik/




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