drand48_r.3: SYNOPSIS: Use 'restrict' in prototypes

Glibc uses 'restrict' for some of the functions in this page:

=============================  drand48_r
stdlib/stdlib.h:501:
int drand48_r (struct drand48_data *restrict buffer,
                      double *restrict result) THROW nonnull ((1, 2));
=============================  erand48_r
stdlib/stdlib.h:503:
int erand48_r (unsigned short int xsubi[3],
                      struct drand48_data *restrict buffer,
                      double *restrict result) THROW nonnull ((1, 2));
=============================  lrand48_r
stdlib/stdlib.h:508:
int lrand48_r (struct drand48_data *restrict buffer,
                      long int *restrict result)
     THROW nonnull ((1, 2));
=============================  nrand48_r
stdlib/stdlib.h:511:
int nrand48_r (unsigned short int xsubi[3],
                      struct drand48_data *restrict buffer,
                      long int *restrict result)
     THROW nonnull ((1, 2));
=============================  mrand48_r
stdlib/stdlib.h:517:
int mrand48_r (struct drand48_data *restrict buffer,
                      long int *restrict result)
     THROW nonnull ((1, 2));
=============================  jrand48_r
stdlib/stdlib.h:520:
int jrand48_r (unsigned short int xsubi[3],
                      struct drand48_data *restrict buffer,
                      long int *restrict result)
     THROW nonnull ((1, 2));
=============================  srand48_r
stdlib/stdlib.h:526:
int srand48_r (long int seedval, struct drand48_data *buffer)
     THROW nonnull ((2));
=============================  seed48_r
stdlib/stdlib.h:529:
int seed48_r (unsigned short int seed16v[3],
                     struct drand48_data *buffer) THROW nonnull ((1, 2));
=============================  lcong48_r
stdlib/stdlib.h:532:
int lcong48_r (unsigned short int param[7],
                      struct drand48_data *buffer)
     THROW nonnull ((1, 2));

Let's use it here too.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Alejandro Colomar 2021-02-24 15:43:01 +01:00 committed by Michael Kerrisk
parent ad85578a68
commit f6ce9b1dbe
1 changed files with 14 additions and 8 deletions

View File

@ -33,21 +33,27 @@ srand48_r, seed48_r, lcong48_r
.nf
.B #include <stdlib.h>
.PP
.BI "int drand48_r(struct drand48_data *" buffer ", double *" result );
.BI "int drand48_r(struct drand48_data *restrict " buffer ,
.BI " double *restrict " result );
.BI "int erand48_r(unsigned short " xsubi [3] ","
.BI " struct drand48_data *"buffer ", double *" result ");"
.BI " struct drand48_data *restrict "buffer ,
.BI " double *restrict " result ");"
.PP
.BI "int lrand48_r(struct drand48_data *" buffer ", long *" result );
.BI "int lrand48_r(struct drand48_data *restrict " buffer ,
.BI " long *restrict " result );
.BI "int nrand48_r(unsigned short " xsubi[3] ","
.BI " struct drand48_data *"buffer ", long *" result ");"
.BI " struct drand48_data *restrict "buffer ,
.BI " long *restrict " result ");"
.PP
.BI "int mrand48_r(struct drand48_data *" buffer ",long *" result ");"
.BI "int mrand48_r(struct drand48_data *restrict " buffer ,
.BI " long *restrict " result ");"
.BI "int jrand48_r(unsigned short " xsubi[3] ","
.BI " struct drand48_data *" buffer ", long *" result ");"
.BI " struct drand48_data *restrict " buffer ,
.BI " long *restrict " result ");"
.PP
.BI "int srand48_r(long int " seedval ", struct drand48_data *" buffer ");"
.BI "int seed48_r(unsigned short " seed16v[3] ", struct drand48_data *" buffer ");"
.BI "int lcong48_r(unsigned short " param[7] ", struct drand48_data *" buffer ");"
.BI "int seed48_r(unsigned short " seed16v[3] ", struct drand48_data *" buffer );
.BI "int lcong48_r(unsigned short " param[7] ", struct drand48_data *" buffer );
.fi
.PP
.RS -4