Clarify error/warning reporting in style(9)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Clarify error/warning reporting in style(9)

Michael McConville-2
Could also say "Use the err(3) and warn(3) family of functions." That's
what the err(3) man page intro refers to it as.

Index: share/man/man9/style.9
===================================================================
RCS file: /cvs/src/share/man/man9/style.9,v
retrieving revision 1.59
diff -u -p -r1.59 style.9
--- share/man/man9/style.9 23 Jan 2015 13:02:49 -0000 1.59
+++ share/man/man9/style.9 22 Sep 2015 02:36:46 -0000
@@ -522,10 +522,10 @@ Routines returning
 should not have their return values cast to any pointer type.
 .Pp
 Use
-.Xr err 3
-or
+.Xr err 3 ,
 .Xr warn 3 ,
-don't roll your own!
+or one of their variants.
+Don't roll your own!
 .Bd -literal -offset indent
 if ((four = malloc(sizeof(struct foo))) == NULL)
  err(1, NULL);

Reply | Threaded
Open this post in threaded view
|

Re: Clarify error/warning reporting in style(9)

Jason McIntyre-2
On Mon, Sep 21, 2015 at 10:40:29PM -0400, Michael McConville wrote:
> Could also say "Use the err(3) and warn(3) family of functions." That's
> what the err(3) man page intro refers to it as.
>

please some developer commit or reject this. thanks,
jmc

> Index: share/man/man9/style.9
> ===================================================================
> RCS file: /cvs/src/share/man/man9/style.9,v
> retrieving revision 1.59
> diff -u -p -r1.59 style.9
> --- share/man/man9/style.9 23 Jan 2015 13:02:49 -0000 1.59
> +++ share/man/man9/style.9 22 Sep 2015 02:36:46 -0000
> @@ -522,10 +522,10 @@ Routines returning
>  should not have their return values cast to any pointer type.
>  .Pp
>  Use
> -.Xr err 3
> -or
> +.Xr err 3 ,
>  .Xr warn 3 ,
> -don't roll your own!
> +or one of their variants.
> +Don't roll your own!
>  .Bd -literal -offset indent
>  if ((four = malloc(sizeof(struct foo))) == NULL)
>   err(1, NULL);
>

Reply | Threaded
Open this post in threaded view
|

Re: Clarify error/warning reporting in style(9)

Ted Unangst-6
Jason McIntyre wrote:
> On Mon, Sep 21, 2015 at 10:40:29PM -0400, Michael McConville wrote:
> > Could also say "Use the err(3) and warn(3) family of functions." That's
> > what the err(3) man page intro refers to it as.
> >
>
> please some developer commit or reject this. thanks,

i liked the wording above. done.

Reply | Threaded
Open this post in threaded view
|

Re: Clarify error/warning reporting in style(9)

Michael McConville-2
In reply to this post by Jason McIntyre-2
Jason McIntyre wrote:
> On Mon, Sep 21, 2015 at 10:40:29PM -0400, Michael McConville wrote:
> > Could also say "Use the err(3) and warn(3) family of functions." That's
> > what the err(3) man page intro refers to it as.
> >
>
> please some developer commit or reject this. thanks,
> jmc

Ingo gave an off-list ok for either one. He said he had a slight
preference for the "family" wording, which I now also do. Here it is:


Index: share/man/man9/style.9
===================================================================
RCS file: /cvs/src/share/man/man9/style.9,v
retrieving revision 1.59
diff -u -p -r1.59 style.9
--- share/man/man9/style.9 23 Jan 2015 13:02:49 -0000 1.59
+++ share/man/man9/style.9 23 Sep 2015 18:13:01 -0000
@@ -521,11 +521,12 @@ Routines returning
 .Li void *
 should not have their return values cast to any pointer type.
 .Pp
-Use
+Use the
 .Xr err 3
-or
-.Xr warn 3 ,
-don't roll your own!
+and
+.Xr warn 3
+family of functions.
+Don't roll your own!
 .Bd -literal -offset indent
 if ((four = malloc(sizeof(struct foo))) == NULL)
  err(1, NULL);