Skip to content

Commit

Permalink
squash! Fix up curses addon.
Browse files Browse the repository at this point in the history
Apply minor fixes to make it build with the current code base.  This
commit can be squashed into the previous one; I broke it out into its
own commit for easy review.
  • Loading branch information
bnoordhuis committed Feb 9, 2017
1 parent d472347 commit a924d0c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions addons/Curses/source/IoCurses.c
Expand Up @@ -31,9 +31,11 @@ Curses end

#define DATA(self) ((IoCursesData *)IoObject_dataPointer(self))

static const char protoId[] = "Curses";

IoTag *IoCurses_newTag(void *state)
{
IoTag *tag = IoTag_newWithName_("Curses");
IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoCurses_free);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoCurses_rawClone);
Expand All @@ -46,7 +48,7 @@ IoCurses *IoCurses_proto(void *state)
IoObject_tag_(self, IoCurses_newTag(state));

IoObject_setDataPointer_(self, calloc(1, sizeof(IoCursesData)));
IoState_registerProtoWithFunc_(state, self, IoCurses_proto);
IoState_registerProtoWithId_(state, self, protoId);

{
IoMethodTable methodTable[] = {
Expand Down Expand Up @@ -119,7 +121,7 @@ IoCurses *IoCurses_rawClone(IoCurses *proto)

IoCurses *IoCurses_new(void *state)
{
IoObject *proto = IoState_protoWithInitFunction_(state, IoCurses_proto);
IoObject *proto = IoState_protoWithId_(state, protoId);
return IOCLONE(proto);
}

Expand Down Expand Up @@ -181,7 +183,6 @@ IoObject *IoCurses_end(IoCurses *self, IoObject *locals, IoMessage *m)
Ends curses mode. This should be called before standard io's read
and write methods are used. Returs self.
*/
printf("IoCurses_end\n");

//echo();
//nocbreak();
Expand Down

0 comments on commit a924d0c

Please sign in to comment.