extern int good_atr_name(char const *s);
extern ATTR *atr_match(char const *string);
extern ATTR *atr_sub_branch(ATTR *branch);
-extern void atr_new_add(dbref thing, char const *RESTRICT atr,
- char const *RESTRICT s, dbref player, unsigned int flags,
+extern void atr_new_add(dbref thing, char const *restrict atr,
+ char const *restrict s, dbref player, unsigned int flags,
unsigned char derefs, boolexp wlock, boolexp rlock,
time_t modtime);
-extern atr_err atr_add(dbref thing, char const *RESTRICT atr,
- char const *RESTRICT s, dbref player, unsigned int flags);
+extern atr_err atr_add(dbref thing, char const *restrict atr,
+ char const *restrict s, dbref player, unsigned int flags);
extern atr_err atr_clr(dbref thing, char const *atr, dbref player);
extern atr_err wipe_atr(dbref thing, char const *atr, dbref player);
extern ATTR *atr_get(dbref thing, char const *atr);
char **abp, dbref *errobj);
extern int one_comm_match(dbref thing, dbref player, const char *atr,
const char *str);
-extern int do_set_atr(dbref thing, char const *RESTRICT atr,
- char const *RESTRICT s, dbref player, unsigned int flags);
+extern int do_set_atr(dbref thing, char const *restrict atr,
+ char const *restrict s, dbref player, unsigned int flags);
extern void do_atrlock(dbref player, char const *arg1, char const *arg2, char write_lock);
extern void do_atrchown(dbref player, char const *arg1, char const *arg2);
extern int string_to_atrflag(dbref player, char const *p, privbits *bits);
/* From strutil.c */
extern char *split_token(char **sp, char sep);
extern char *chopstr(const char *str, size_t lim);
-extern int string_prefix(const char *RESTRICT string,
- const char *RESTRICT prefix);
+extern int string_prefix(const char *restrict string,
+ const char *restrict prefix);
extern const char *string_match(const char *src, const char *sub);
extern char *strupper(const char *s);
extern char *strlower(const char *s);
((*(bp) - (buf) >= BUFFER_LEN - 1) ? \
1 : (*(*(bp))++ = (x), 0))
/* Like sprintf */
- extern int safe_format(char *buff, char **bp, const char *RESTRICT fmt, ...)
+ extern int safe_format(char *buff, char **bp, const char *restrict fmt, ...)
__attribute__ ((__format__(__printf__, 3, 4)));
/* Append an int to the end of a buffer */
extern int safe_integer(intmax_t i, char *buff, char **bp);
/* Append N copies of the character X to the end of a string */
extern int safe_fill(char x, size_t n, char *buff, char **bp);
/* Append an accented string */
- extern int safe_accent(const char *RESTRICT base,
- const char *RESTRICT tmplate, size_t len, char *buff,
+ extern int safe_accent(const char *restrict base,
+ const char *restrict tmplate, size_t len, char *buff,
char **bp);
- extern char *str_escaped_chr(const char *RESTRICT string, char escape_chr);
+ extern char *str_escaped_chr(const char *restrict string, char escape_chr);
extern char *mush_strncpy(char *restrict, const char *, size_t);
extern char *replace_string
- (const char *RESTRICT old, const char *RESTRICT newbit,
- const char *RESTRICT string) __attribute_malloc__;
+ (const char *restrict old, const char *restrict newbit,
+ const char *restrict string) __attribute_malloc__;
extern char *replace_string2(const char *old[2], const char *newbits[2],
- const char *RESTRICT string)
+ const char *restrict string)
__attribute_malloc__;
extern const char *standard_tokens[2]; /* ## and #@ */
extern char *trim_space_sep(char *str, char sep);
#include <openssl/ssl.h>
#endif
#include <stdint.h>
+#include <stdbool.h>
/* Connect Flags */
/** Default connection, nothing special */
* \param derefs the initial deref count to use for the attribute value.
*/
void
-atr_new_add(dbref thing, const char *RESTRICT atr, const char *RESTRICT s,
+atr_new_add(dbref thing, const char *restrict atr, const char *restrict s,
dbref player, uint32_t flags, uint8_t derefs, boolexp wlock,
boolexp rlock, time_t modtime)
{
*/
atr_err
-atr_add(dbref thing, const char *RESTRICT atr, const char *RESTRICT s,
+atr_add(dbref thing, const char *restrict atr, const char *restrict s,
dbref player, uint32_t flags)
{
ATTR *ptr, *root = NULL;
* \retval 1 success.
*/
int
-do_set_atr(dbref thing, const char *RESTRICT atr, const char *RESTRICT s,
+do_set_atr(dbref thing, const char *restrict atr, const char *restrict s,
dbref player, uint32_t flags)
{
ATTR *old;
static NVAL angle_to_rad(NVAL angle, const char *from);
static NVAL rad_to_angle(NVAL angle, const char *to);
-static double frac(double v, double *RESTRICT n, double *RESTRICT d,
+static double frac(double v, double *restrict n, double *RESTRICT d,
double error);
int format_long(intmax_t n, char *buff, char **bp, int maxlen, int base);
* \return -1.0 if (v < MIN || v > MAX || error < 0.0) | (v - n/d) / v | otherwise.
*/
static double
-frac(double v, double *RESTRICT n, double *RESTRICT d, double error)
+frac(double v, double *restrict n, double *RESTRICT d, double error)
{
/* Based on a routine found in netlib (http://www.netlib.org) by
** Fiddling: Pär Emanuelsson <pell@lysator.liu.se> */
static char *
-xstrtok(char *RESTRICT cp, const char *RESTRICT cs, char *RESTRICT dc)
+xstrtok(char *restrict cp, const char *restrict cs, char *restrict dc)
{
static char *bp = 0;
* \retval 0 string does not begin with prefix.
*/
int
-string_prefix(const char *RESTRICT string, const char *RESTRICT prefix)
+string_prefix(const char *restrict string, const char *restrict prefix)
{
if (!string || !prefix)
return 0;
* \retval 0 success.
*/
int
-safe_accent(const char *RESTRICT base, const char *RESTRICT tmplate, size_t len,
+safe_accent(const char *restrict base, const char *restrict tmplate, size_t len,
char *buff, char **bp)
{
/* base and tmplate must be the same length */
* \return number of characters left over, or 0 for success.
*/
int
-safe_format(char *buff, char **bp, const char *RESTRICT fmt, ...)
+safe_format(char *buff, char **bp, const char *restrict fmt, ...)
{
APPEND_ARGS;
#ifdef HAS_VSNPRINTF
* \return pointer to the start of the string
*/
char *
-copy_up_to(char *RESTRICT dest, const char *RESTRICT src, char c)
+copy_up_to(char *restrict dest, const char *restrict src, char c)
{
char *d;
d = dest;
}
char *
-str_escaped_chr(const char *RESTRICT string, char escape_chr)
+str_escaped_chr(const char *restrict string, char escape_chr)
{
const char *p;
char *result, *r;