[PATCH xts] xts5: Switch from K&R to ANSI prototypes.

Aaron Plattner aplattner at nvidia.com
Fri Jun 10 10:29:37 PDT 2011


On Fri, Jun 03, 2011 at 06:31:39AM -0700, Cyril Brulebois wrote:
> Conversion performed through:
>   cproto -a -I include -I xts5/include/ xts5/src/lib/checkevent.c
> 
> (after which trailing spaces were removed.)
> 
> Suggested-by: Walter Harms <wharms at bfs.de>
> Signed-off-by: Cyril Brulebois <kibi at debian.org>
> ---
>  xts5/src/lib/checkevent.c |    8 +++-----
>  1 files changed, 3 insertions(+), 5 deletions(-)
> 
> One could try looping over all files, but some comments can be removed,
> and such transformations are proposed:
> -void foo()
> +void foo(void)
> 
> So I'm not doing the loopy job, sorry.
> 
> diff --git a/xts5/src/lib/checkevent.c b/xts5/src/lib/checkevent.c
> index 6335309..ac555e8 100644
> --- a/xts5/src/lib/checkevent.c
> +++ b/xts5/src/lib/checkevent.c
> @@ -250,9 +250,7 @@ int check_ext_event(XEvent*, XEvent*);
>   * On error (eg. no such event type) returns -1.
>   */
>  int
> -checkevent(good, ev)
> -XEvent *good;
> -XEvent *ev;
> +checkevent (XEvent *good, XEvent *ev)

Style in this module is no space between the name and the parenthesis.

>  {
>  int 	i;
>  int 	fail;
> @@ -665,8 +663,8 @@ char	tempstr[50];
>  }
>  
>  #ifdef INPUTEXTENSION
> -int check_ext_event(good,ev)
> -XEvent *good, *ev;
> +int
> +check_ext_event (XEvent *good, XEvent *ev)
>  {
>  int i;
>  int 	fail;
> -- 
> 1.7.5.3
> 


More information about the xorg-devel mailing list