From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <1d5d51400806290432h58b60e4cm75936664c988d6a3@mail.gmail.com> Date: Sun, 29 Jun 2008 19:32:41 +0800 From: "Fernan Bolando" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@9fans.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_20092_13709882.1214739161344" Subject: [9fans] Updating an old port . Warning! long lines of code Topicbox-Message-UUID: cb33f94e-ead3-11e9-9d60-3106f5b1d025 ------=_Part_20092_13709882.1214739161344 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi all I am updating an old port from 2002. I was able to clean a few of the simple errors, but I need a bit of a hint on this one. compile errors **** /usr/fernan/tmp/scm/sys.c:628[sys.c:3613] initialization of incompatible pointers: sfptob IND FUNC(INT, IND STRUCT _7_) INT and IND FUNC(OLD, INT, LONG) INT /usr/fernan/tmp/scm/sys.c:629[sys.c:3614] initialization of incompatible pointers: sfptob IND FUNC(IND CONST CHAR, IND STRUCT _7_) INT and IND FUNC(OLD, IND CHAR, LONG) INT The following are the relevant structure and code typedef struct { char *name; SCM (*mark)P((SCM ptr)); int (*free)P((FILE *p)); int (*print)P((SCM exp, SCM port, int writing)); SCM (*equalp)P((SCM, SCM)); int (*fputc)P((int c, FILE *p)); /* int (*fputs)P((char *s, FILE *p)); */ /* sizet (*fwrite)P((char *s, sizet siz, sizet num, FILE *p)); */ int (*fputs)P((const char *s, FILE *p)); sizet (*fwrite)P((const void *s, sizet siz, sizet num, FILE *p)); int (*fflush)P((FILE *stream)); int (*fgetc)P((FILE *p)); int (*fclose)P((FILE *p)); int (*ungetc)P((int c, SCM p)); } ptobfuns; static ptobfuns sfptob = { "soft", markcdr, noop0, 0, 0, sfputc, sfputs, sfwrite, sfflush, sfgetc, sfclose}; -- http://www.fernski.com ------=_Part_20092_13709882.1214739161344 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline

Hi all

I am updating an old port from 2002. I was able to clean a few of the simple errors, but I need a bit of a hint on this one.

compile errors ****

/usr/fernan/tmp/scm/sys.c:628[sys.c:3613] initialization of incompatible pointers: sfptob
IND FUNC(INT, IND STRUCT _7_) INT and IND FUNC(OLD, INT, LONG) INT
/usr/fernan/tmp/scm/sys.c:629[sys.c:3614] initialization of incompatible pointers: sfptob
IND FUNC(IND CONST CHAR, IND STRUCT _7_) INT and IND FUNC(OLD, IND CHAR, LONG) INT


The following are the relevant structure and code

typedef struct {
  char *name;
  SCM (*mark)P((SCM ptr));
  int (*free)P((FILE *p));
  int (*print)P((SCM exp, SCM port, int writing));
  SCM (*equalp)P((SCM, SCM));
  int (*fputc)P((int c, FILE *p));
/* int (*fputs)P((char *s, FILE *p)); */
/* sizet (*fwrite)P((char *s, sizet siz, sizet num, FILE *p)); */
  int (*fputs)P((const char *s, FILE *p));
  sizet (*fwrite)P((const void *s, sizet siz, sizet num, FILE *p));
  int (*fflush)P((FILE *stream));
  int (*fgetc)P((FILE *p));
  int (*fclose)P((FILE *p));
  int (*ungetc)P((int c, SCM p));
} ptobfuns;


static ptobfuns sfptob = {
  "soft",
  markcdr,
  noop0,
  0,
  0,
  sfputc,
  sfputs,
  sfwrite,
  sfflush,
  sfgetc,
  sfclose};


--

http://www.fernski.com ------=_Part_20092_13709882.1214739161344-- From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed Message-id: <8AF20E9D-C7D6-4950-AB57-3D8F019B8937@mac.com> From: Pietro Gagliardi To: fernanbolando@mailc.net, Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> In-reply-to: <1d5d51400806290432h58b60e4cm75936664c988d6a3@mail.gmail.com> Date: Sun, 29 Jun 2008 07:38:03 -0400 References: <1d5d51400806290432h58b60e4cm75936664c988d6a3@mail.gmail.com> Subject: Re: [9fans] Updating an old port . Warning! long lines of code Topicbox-Message-UUID: cb3a1d7e-ead3-11e9-9d60-3106f5b1d025 On Jun 29, 2008, at 7:32 AM, Fernan Bolando wrote: > /* int (*fputs)P((char *s, FILE *p)); */ > /* sizet (*fwrite)P((char *s, sizet siz, sizet num, FILE *p)); */ Try uncommenting those two lines. From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <1d5d51400806290611l50f22200v204d7bf95e16cb77@mail.gmail.com> Date: Sun, 29 Jun 2008 21:11:42 +0800 From: "Fernan Bolando" To: "Pietro Gagliardi" In-Reply-To: <8AF20E9D-C7D6-4950-AB57-3D8F019B8937@mac.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_20270_21181768.1214745102330" References: <1d5d51400806290432h58b60e4cm75936664c988d6a3@mail.gmail.com> <8AF20E9D-C7D6-4950-AB57-3D8F019B8937@mac.com> Cc: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Subject: Re: [9fans] Updating an old port . Warning! long lines of code Topicbox-Message-UUID: cb40baa8-ead3-11e9-9d60-3106f5b1d025 ------=_Part_20270_21181768.1214745102330 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 6/29/08, Pietro Gagliardi wrote: > > On Jun 29, 2008, at 7:32 AM, Fernan Bolando wrote: > > /* int (*fputs)P((char *s, FILE *p)); */ >> /* sizet (*fwrite)P((char *s, sizet siz, sizet num, FILE *p)); */ >> > > Try uncommenting those two lines. > > thanks, but that didn't work. It's probably very simple. Maybe I just need to re-read the documentation. Or maybe I maybe I made a mistake during the uncomment. The good thing is I can now do this through 9vx intead of connecting to 9grid. very nice -- http://www.fernski.com ------=_Part_20270_21181768.1214745102330 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline

On 6/29/08, Pietro Gagliardi <pietro10@mac.com> wrote:
On Jun 29, 2008, at 7:32 AM, Fernan Bolando wrote:

/* int (*fputs)P((char *s, FILE *p)); */
/* sizet (*fwrite)P((char *s, sizet siz, sizet num, FILE *p)); */

Try uncommenting those two lines.


thanks, but that didn't work.

It's probably very simple. Maybe I just need to re-read the documentation. Or maybe I maybe I made a mistake during the uncomment.

The good thing is I can now do this through 9vx intead of connecting to 9grid. very nice


--
http://www.fernski.com ------=_Part_20270_21181768.1214745102330-- From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <8e22b4f51586172d72e55a8b895fead1@quanstro.net> To: fernanbolando@mailc.net, 9fans@9fans.net From: erik quanstrom Date: Sun, 29 Jun 2008 09:38:11 -0400 In-Reply-To: <1d5d51400806290432h58b60e4cm75936664c988d6a3@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] Updating an old port . Warning! long lines of code Topicbox-Message-UUID: cb472aa0-ead3-11e9-9d60-3106f5b1d025 > /usr/fernan/tmp/scm/sys.c:628[sys.c:3613] initialization of incompatible > pointers: sfptob > IND FUNC(INT, IND STRUCT _7_) INT and IND FUNC(OLD, INT, LONG) INT > /usr/fernan/tmp/scm/sys.c:629[sys.c:3614] initialization of incompatible > pointers: sfptob > IND FUNC(IND CONST CHAR, IND STRUCT _7_) INT and IND FUNC(OLD, IND CHAR, > LONG) INT in the first case, you're trying to assign pointers of these types: IND FUNC(INT, IND STRUCT _7_) INT IND FUNC(OLD, INT, LONG) INT these kenc's internal representation for int (*)(int, struct _7_*); int (*)(int, long); /* pre-ansi declaration */ so the problem here is that you're mixing a pointer to a structure with a long. similarly, IND FUNC(IND CONST CHAR, IND STRUCT _7_) INT IND FUNC(OLD, IND CHAR, LONG) INT is int (*)(const char*, struct _7_*); int (*)(char*, long); /* pre-ansi declaration */ struct _7_ must be FILE, and the two functions must be fputc fputs. (but you knew that.) so the solution would be to clean up the declaration of sfputc and sfputs. - erik