[XForms] [patch] API pseudo changes

Angus Leeming angus.leeming at btopenworld.com
Tue May 18 09:58:44 EDT 2004


On Tuesday 18 May 2004 1:00 pm, Jean-Marc Lasgouttes wrote:
> Angus> While I'm at it, several functions that were declared using
> Angus> 'unsigned int' are now declared using 'unsigned'. Eg:
>
> Angus> -Window fl_get_mouse(FL_Coord *, FL_Coord *, unsigned int
> *); Angus> +Window fl_get_mouse(FL_Coord *, FL_Coord *, unsigned
> *);
>
> Angus> Again, they're equivalent, but I fail to see why the change
> was Angus> a good one. Shall I change them back?
>
> I think so.

I wrote a little script to do it everywhere. Not very elegant, but did 
the job.

Patch attached and committed.

Angus


#! /bin/sh

TMP=tmp

for dir in demos fd2ps fdesign gl image lib
do
DATA=`grep -n -r unsigned $dir | \
  sed 's/unsigned  *long//g
  s/unsigned  *int//g
  s/unsigned  *char//g
  s/unsigned  *short//g
  /unsigned/!d'`
  echo "$DATA" | while read LINE
  do
    FILE=`echo $LINE | cut -d':' -f1`
    LN=`echo $LINE | cut -d':' -f2`
    test "$FILE" != "" -a "$LN" != "" || continue

    sed "${LN} s/unsigned/unsigned int/g; s/\(unsigned int\) int/\1/" 
${FILE} > $TMP
    cmp -s $FILE $TMP && continue
    diff -u $FILE $TMP
    #mv -f $TMP $FILE
  done
done
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uint.diff.bz2
Type: application/x-bzip2
Size: 8774 bytes
Desc: not available
Url : attachments/20040518/02afbcb6/attachment-0010.bz2 


More information about the Xforms mailing list