i'm trying tutorial on glib uses giochannel. i'm using ubuntu 11.04 (natty narwhal) glib-2.30.2 (gtk+-3.2.3) , c code. the code here: http://library.developer.nokia.com/index.jsp?topic=/guid-e35887bb-7e58-438c-aa27-97b2cde7e069/guid-817c43e8-9169-4750-818b-b431d138d71a.html the program runs contents of source test file not copied destination file. i'm not receiving error or warning messages. program nothing. what's wrong here? works now, changed line: g_print("usage:<cp source> <destination>\n"); to: g_print("usage: %s <source> <destination>\n", argv[0]); then compiled using: gcc -wall $(pkg-config --cflags gio-2.0) -c io.c gcc -wall $(pkg-config --libs gio-20) -o io io.o run program using: ./io io.c new_io.c
i have simple python curses code creates subwindow. however, in process of running function window.subwin() fails message: here test case: import curses if __name__ == '__main__': curses.initscr() window = curses.newwin(15, 40, 7, 20) window.box() window.refresh() subwindow = window.subwin(5, 10, 2, 2) subwindow.box() subwindow.refresh() subwindow.getkey() curses.endwin() produces following output: traceback (most recent call last): file "c.py", line 12, in <module> subwindow = window.subwin(5, 10, 2, 2) _curses.error: curses function returned null is there way more descriptive message? the error happens when not possible create sub-window (illegal operation). can happen because asking paint sub-window outside of window. the method subwin receives absolute coordinates (with respect screen, not parent window). fail if subwin coordinates outside of window . reason fail: width or height overfl...
Comments
Post a Comment