From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: (qmail 25049 invoked from network); 25 Apr 2020 01:59:43 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with UTF8ESMTPZ; 25 Apr 2020 01:59:43 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id D793D9C923; Sat, 25 Apr 2020 11:59:40 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 8A0919C746; Sat, 25 Apr 2020 11:59:07 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="C6adhvF1"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 68BE69C746; Sat, 25 Apr 2020 11:59:04 +1000 (AEST) Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) by minnie.tuhs.org (Postfix) with ESMTPS id 042E69C733 for ; Sat, 25 Apr 2020 11:59:04 +1000 (AEST) Received: by mail-qv1-f50.google.com with SMTP id y19so5690950qvv.4 for ; Fri, 24 Apr 2020 18:59:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:message-id:date:to; bh=182u+CJ/DgReFTgFEARiSamgt/ssEIVI94e6WpL6b6c=; b=C6adhvF1cG8kA6XIO+nb2EAgpc+Ig2sL+FCjeYqY5tB4hXktw2/N6pK2GfUTVtxOxC e7L9BxnKDhqozpUDOyYX0SIkoG3nSEEEoeBKbu+Ejjb8FcvnXeFeYQMTsNaiU78Fo0QX jGJIV3Wak+3HwiN0StVJOPkj1KDiGvRxn/lcWl097dNO8u6uxFNQkjJZTdbpVHDlY+46 5JGFnrS/PeAxQngNj2ecWExMhSik2zWbqdVYsLd48eC2zVnzN3RcWv4r1I3D42X1TwQR Ooq5Fj2xIDkEO8EqnR0vBAaCE9JnKQkw4guPFydJLOSOdZV6AscX6/gPmnTniW0EwbG6 SBwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:message-id:date:to; bh=182u+CJ/DgReFTgFEARiSamgt/ssEIVI94e6WpL6b6c=; b=uB+JZd4PLDEhvDy/+WyN5u+7Ea3vEgmjvQ+relQYSLrSQYG55vhD9638y94W61kwz5 F6qAlDadiT9HHPGb+2c2TU3mg3Q5mQjTrN0jaxZcJ9BH05FP4bhExmCFsN9sZm+iq89E tbj+5V/HxRHDC8qfnV2uAgnJm8x9eBkOGWaFWI7n/pHzguqY7JH16IYOfjJkNjg3zTue qj9tELSReWtrdX8E8mRyd1/LZVdLqVMYlGyqboX0V+/WowD+UZet8usq4OymF64GE2+j OlmZna6D+jwgiSry43aegguXQjJ4Vh3rGV+tigOsdkYln24XvmvXgS7yLDog6YlamGWv 1kVA== X-Gm-Message-State: AGi0PuY+Mi1TvnA7ZEtkm8VfwKN8vvbmLJa08/uaZ8abH7gt2CbA0vKW Eaw9bHjduyOfAXaLi9FX7WOpWW+j X-Google-Smtp-Source: APiQypIrODRmdbMhraB+mbMr1tTOPJvVYkGy95WjaE5VuxaRzNsAT8UQPyVOAXtTi9Y/VODboKtAdg== X-Received: by 2002:a05:6214:18c9:: with SMTP id cy9mr12108687qvb.35.1587779942454; Fri, 24 Apr 2020 18:59:02 -0700 (PDT) Received: from ?IPv6:2600:8800:7c80:1584:859:e83c:7f2c:4667? ([2600:8800:7c80:1584:859:e83c:7f2c:4667]) by smtp.gmail.com with ESMTPSA id 70sm5034032qkh.67.2020.04.24.18.59.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Apr 2020 18:59:01 -0700 (PDT) From: Adam Thornton Content-Type: multipart/alternative; boundary="Apple-Mail=_DBFF48DE-B6D7-4895-8902-0DCEA10C0EFF" Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Message-Id: Date: Fri, 24 Apr 2020 18:59:00 -0700 To: The Eunuchs Hysterical Society X-Mailer: Apple Mail (2.3608.80.23.2.2) Subject: [TUHS] v7 K&R C X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" --Apple-Mail=_DBFF48DE-B6D7-4895-8902-0DCEA10C0EFF Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 The C in v7 is, canonically, the language described in K&R, right? I must be doing something dumb. I am getting Webb Miller=E2=80=99s =E2=80=9Cs=E2=80=9D editor built = there, and I am down to one function. /* chop_arg - chop a function's argument to a maximum length */ static chop_arg(fcn, arg, maxlen) int (*fcn)(); int maxlen; char *arg; { char save; save =3D arg[maxlen]; arg[maxlen] =3D '\0'; fcn(arg); arg[maxlen] =3D save; } This doesn=E2=80=99t like the function pointer. $ cc -c choparg.c choparg.c:11: Call of non-function So, uh, what is the obvious thing I am missing? How am I supposed to be = passing function pointers in the C compiler that comes with v7? Adam= --Apple-Mail=_DBFF48DE-B6D7-4895-8902-0DCEA10C0EFF Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 The = C in v7 is, canonically, the language described in K&R, right?

I must be doing = something dumb.

I am getting Webb Miller=E2=80=99s =E2=80=9Cs=E2=80=9D editor = built there, and I am down to one function.

/* chop_arg - chop a function's = argument to a maximum length */
static chop_arg(fcn, arg, = maxlen)
int (*fcn)();
int maxlen;
char = *arg;
{
    char save;

    save =3D= arg[maxlen];
    arg[maxlen] =3D '\0';
    = fcn(arg);
    arg[maxlen] =3D save;
}

This doesn=E2=80=99t like the function pointer.

$ cc -c choparg.c
choparg.c:11: Call = of non-function

So, uh, what is the obvious thing I am = missing?  How am I supposed to be passing function pointers in the = C compiler that comes with v7?

Adam
= --Apple-Mail=_DBFF48DE-B6D7-4895-8902-0DCEA10C0EFF--