XForms: Whats Wrong 2?

From: Serge B Bromow (serge@omensys.com)
Date: Sat Feb 26 2000 - 16:05:48 EST

  • Next message: Serge B Bromow: "Re: XForms: platform requests"

    # To subscribers of the xforms list from Serge B Bromow <serge@omensys.com> :

    I apologize for disturbing you again but I have made the changes you
    recommended. The compiler reports the following.

    cur_main.c, line 25: error prototype mismatch: 0 args passed, 2 expected

    cur_main.c, line 25: void expressions may not be arguments: arg #3

    Since the prototype declarations are issued in forms.h maybe you could
    alter the attached code to indicate the error of my ways.

    --------------------------------------------------
    #include "forms.h"
    #include "cur.h"

    FD_cur *fd_cur;

    extern void cxb(int fd, void *data);

    long l = 0l;

    int main(int argc, char *argv[])
    {
    int fd;

    /* Open serial device for reading */
    if( (fd = open("/dev/srs011", 0)) == -1 ) {
     printf("can't open touch screen\n");
     exit(0);
     }

    fl_initialize(&argc, argv, 0, 0, 0);
    fd_cur = create_form_cur();

    /* LINE 25 */ fl_add_io_callback(fd, FL_READ, cxb(), &l);

    /* show the first form */
    fl_show_form(fd_cur->cur,FL_PLACE_CENTERFREE,FL_FULLBORDER,"cur");

    fl_do_forms();
    return 0;
    }

    void cxb(int fd, void *data)
    {
    char buf[128];

    /* Show Entry to Callback */
    printf("touched\n");

    /* Empty Queu */
    read(fd, buf, 128);
    }

    _________________________________________________
    To unsubscribe, send the message "unsubscribe" to
    xforms-request@bob.usuhs.mil or see
    http://bob.usuhs.mil/mailserv/xforms.html
    XForms Home Page: http://world.std.com/~xforms
    List Archive: http://bob.usuhs.mil/mailserv/list-archives/



    This archive was generated by hypermail 2b29 : Sat Feb 26 2000 - 16:05:27 EST