#!/bin/sh
##############################################################################
-# Copyright (c) 2019 Free Software Foundation, Inc. #
+# Copyright 2019,2020 Thomas E. Dickey #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: MKuserdefs.sh,v 1.8 2019/03/17 00:46:17 tom Exp $
+# $Id: MKuserdefs.sh,v 1.10 2020/02/02 23:34:34 tom Exp $
AWK=${1-awk}; shift 1
OPT1=${1-0}; shift 1
cat <<EOF
+#define USERTABSIZE SIZEOF(user_names_data)
+
#if $OPT1
static void
next_string(const char *strings, unsigned *offset)
const char *strings)
{
if (*actual == 0) {
- *actual = typeCalloc(struct user_table_entry, CAPTABSIZE);
+ *actual = typeCalloc(struct user_table_entry, USERTABSIZE);
if (*actual != 0) {
unsigned n;
unsigned len = 0;
- for (n = 0; n < CAPTABSIZE; ++n) {
+ for (n = 0; n < USERTABSIZE; ++n) {
(*actual)[n].ute_name = strings + len;
(*actual)[n].ute_type = (int) source[n].ute_type;
(*actual)[n].ute_argc = source[n].ute_argc;