Search Results

Search found 68 results on 3 pages for 'ncurses'.

Page 1/3 | 1 2 3  | Next Page >

  • 100% CPU Runaway Processes (NCurses?)

    - by BCable
    This is a problem I've had for years, but just haven't posted anywhere about it until now. I'm running GRML, a Debian squeeze based Linux distro, and occasionally certain processes will runaway and cause 100% CPU usage. The only way I can usually know is when my thermal meter on my statusbar will turn yellow. Sometimes I run fullscreen applications when it happens, though, so I sometimes don't catch it, leaving my computer wasting away at my CPU. The processes that I can think of off the top of my head are these: abook, aumix, hnb, wyrd. They are all NCurses based console applications, and there are others that are also NCurses based. Is there a bug in NCurses somewhere that I need patched or something? This also happened on the same distro with the same applications on a different laptop with the same configurations. Any ideas? Thanks!

    Read the article

  • Getting 256 colors out of ruby-ncurses

    - by push.cx
    I've got 256 colors working great in my terminal (test scripts here), but it stops working when I use ncurses (via Ruby-ncurses). Printing the escape sequences given on that page works fine, but when I initialize ncurses 'puts' stops working and I can't output the colors with any of the various ncurses color changing/string output functions I've found. What gives?

    Read the article

  • Linux ncurses outliner options

    - by geek
    I'm looking for a replacement for hnb, which served me well but seems to be abandoned. Please do not suggest text-editor based approaches like emacs org mode or vim outliner. I want a stand-alone tool, preferably written in Python, with ncurses interface (so it could run on Linux with no X server).

    Read the article

  • NCurses-Like System for Windows

    - by cam
    Are there any C++ libraries similar to Ncurses, but for Windows? It seems there are no ports of Ncurses and I need a really good display system like it. Any suggestions? Cross-platform is a plus.

    Read the article

  • ncurses - resizing glitch

    - by ryyst
    I'm writing an ncurses program and am trying to make it respond correctly to terminal resizing. While I can read the terminal dimensions correctly in my program, ncurses doesn't seem to deal with new dimensions correctly. Here's a (somewhat lengthy) sample program: #include <ncurses.h> #include <string.h> #include <signal.h> #include <sys/ioctl.h> void handle_winch(int sig){ struct winsize w; ioctl(0, TIOCGWINSZ, &w); COLS = w.ws_col; LINES = w.ws_row; wresize(stdscr, LINES, COLS); clear(); mvprintw(0, 0, "COLS = %d, LINES = %d", COLS, LINES); for (int i = 0; i < COLS; i++) mvaddch(1, i, '*'); refresh(); } int main(int argc, char *argv[]){ initscr(); struct sigaction sa; memset(&sa, 0, sizeof(struct sigaction)); sa.sa_handler = handle_winch; sigaction(SIGWINCH, &sa, NULL); while(getch() != 27) {} endwin(); return 0; } If you run it, you can see that the terminal dimensions are correctly retrieved. But the second line, which is supposed to draw *-characters across the screen, doesn't work. Try resizing the window horizontally to make it larger, the line of *s will not get larger. What's the problem here? I'm aware that one can temporarily leave curses mode, but I'd prefer a cleaner solution. Thanks!

    Read the article

  • Cannot do a ncurses overwrite(curscr, savewin) correctly because I ripoffline() before

    - by Costi
    I have a C/ncurses program that I'm debugging/maintaining. This program does ripoffline twice: first, to put a title bar and the second time to put a menu bar on the top of the page. I need to dropdown some menus so I save the screen before I drop down the menus. In the InitMenu function, I have the following code: savewin = newwin (0, 0, 0, 0); overwrite (curscr, savewin); wrefresh(savewin) The problem is that savewin is being copied WITH the menu and the ripped off lines, but it gets drawn on the screen BELOW the rippedoff lines. This duplicates the ripped off lines on the screen. Only realizing where the problem was took me a while. Now, I have no idea how to fix it. Ideally, I would like to copy curscr to savewin without the ripped off lines. Any ideas?

    Read the article

  • ncurses - expect: sleep executes at wrong time

    - by rahul
    I have some ncurses apps that I need to automate to test repeatedly. I am placing the "sleep" command between "send" commands. However, what i see is that all the sleep's are executed in the beginning before the screen loads. expect concatenates the sends (I see that at the screen bottom during sleep) then issues them together. I have tried sending all keys with "send -s" or "send -h". That marginally helps. I've replaced "-f" on line 1 with "-b" - again a tiny difference. Why isn't "sleep" pausing at the right time. Incidentally, my programs have a getc() loop, so i can't use "expect" command. I tried that too. #!/usr/bin/expect -f spawn ruby testsplit.rb #expect set send_human {3 3 5 5 7} set send_slow {10 1} exp_send -s -- "--" exec sleep 3 send -s "+" send -s "=" sleep 1 send -h -- "-" send -h -- "-" sleep 1 send -h -- "v" interact

    Read the article

  • redrawing on ncurses

    - by John C
    I'm trying to redraw the content of a simple loop. So far it prints out to the stdscr 100 lines, and then by using scrl to scroll n lines I get n blank rows. What I want is to keep with the sequence. However, I'm not sure how to redraw the stdscr with the n extra lines. Any ideas will be appreciate it! #include <ncurses.h> int main(void) { initscr(); int maxy,maxx,y; getmaxyx(stdscr,maxy,maxx); scrollok(stdscr,TRUE); for(y=0;y<=100;y++) mvprintw(y,0,"This is some text written to line %d.",y); refresh(); getch(); scrl(5); refresh(); getch(); endwin(); return(0); }

    Read the article

  • Linker warnings when using stdscr (ncurses)

    - by flarn2006
    Okay, so I'm getting these warnings whenever I try to use stdscr in pdcurses: LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library LINK : warning LNK4049: locally defined symbol "_stdscr" imported LINK : warning LNK4049: locally defined symbol "_SP" imported How do I fix this? They're just warnings, but when I run my program, it crashes, so they probably have something to do with it. Especially considering the fact that the line it crashes at is the one that uses stdscr...

    Read the article

  • [C++ / NCURSES] Can't convert from 'int' to 'int *'

    - by flarn2006
    So I have these lines of code: int maxY, maxX; getmaxyx(stdscr, &maxY, &maxX); It gives me the following error: error C2440: '=' : cannot convert from 'int' to 'int *' Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast twice for each time I use it. I'm not even using the = operator! The curses.h file is included. What am I doing wrong?

    Read the article

  • NCurses, scrolling of multiline items, "current item" pointer and "selected items"

    - by mjf
    I am looking for hints/ideas for the best (most effective) way on how to scroll multi-line items as well as emphasizing of the "current item" and "selected items" such as: 1 FOO ITEM 1 Foo sub-item 2 Foo sub-item 3 Foo sub-item 2 BAR ITEM 1 Bar sub-item 3 BAZ ITEM 1 Baz sub-item 2 Baz sub-item 4 RAB ITEM 5 ZZZ ITEM 1 Zzz sub-item 2 Zzz sub-item 3 Zzz sub-item 4 Zzz sub-item using NCurses (some combination of windows, sub-windows, pads, copywin? Uff! In fact, the lines could exceed the stdscr's width so that possibility to scroll left/right would be also nice - pads?)... The whole items (including the sub-items) are supposed to be emphasized as full-width window/pad areas. The "current item" (including it's set of lines) should be emphasized (i.e. using A_BOLD), selected set of items of choice (including the set of lines for each the selected item) should be emphasized in another way (i.e. using A_REVERSE). What would you choose to cope with it the most effective NCurses way? (The less redrawals/refreshes the better and terminal is supposed to have the ability to change it's size - such as XTerm running under "floating window" management.) Thank you for your ideas (or perhaps some piece of code where something similar is already solved - I was not able to find anything helpful on the Internet. I mean I am not going to copy/paste foreign code but programming NCurses properly is still somehow difficult to me). P.S.: Would you suggest to "smooth-scroll" +1/-1 screen line or rather "jump-scroll" +lines/-lines of the items? (I personally prefer the latter one.) Sincerely, -- mjf

    Read the article

  • What is happening to NCurses and OS X 10.6?

    - by John Velman
    Apparently libncurses...dylib is broken OS X 10.6.3 relative to Mutt, and perhaps other applications, that use ncurses, although it works in 10.6 (as I can attest) and reportedly it works in 10.6.2. Does anyone know if this is a bug or a feature in the view of Apple? If a feature, is there a workaround for people who want to upgrade 10.6..., but also want to use, for example, Mutt? Thanks

    Read the article

  • psybnc on nas: ncurses problem

    - by holms
    Trying to get compile psybnc on NAS. ipkg is default package manager in here. I've installed ncurses already, it's in /opt/lib (libncurses.so) [\w] # ls /opt/lib | grep ncurses libncurses.so libncurses.so.5 libncurses.so.5.7 libncursesw.so libncursesw.so.5 libncursesw.so.5.7 [\w] # file libncurses.so.5.7 libncurses.so.5.7: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, stripped I added this path to /etc/profile [\w] # echo $PATH /bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin:/opt/lib So trying to make menuconfig gives me this error [\w] # make menuconfig Initializing Menu-Configuration [*] Running Conversion Tool for older psyBNC Data. Using existent configuration File. [*] Running Autoconfig. System: Linux Socket Libs: Internal. Environment: Internal. Time-Headers: in time.h and sys/time.h Byte order: Big Endian. IPv6-Support: Yes, general support. But no interface configured. async-DNS-Support: Yes. SSL-Support: No openssl found. Get openssl at www.openssl.org Creating Makefile [*] Creating Menu, please wait. This needs the ncurses library. If it is not available, menuconf wont work. If you are using curses, use make menuconfig-curses instead. make: *** [menuconfig] Error 1 Same goes for make menuconfig-curses [\w] # make menuconfig-curses Initializing Menu-Configuration using Curses [*] Running Conversion Tool for older psyBNC Data. Using existent configuration File. [*] Running Autoconfig. System: Linux Socket Libs: Internal. Environment: Internal. Time-Headers: in time.h and sys/time.h Byte order: Big Endian. IPv6-Support: Yes, general support. But no interface configured. async-DNS-Support: Yes. SSL-Support: No openssl found. Get openssl at www.openssl.org Creating Makefile [*] Creating Menu, please wait. This needs the curses library. If it is not available, menuconf wont work. make: *** [menuconfig-curses] Error 1 Psybnc compiled ok, just wanna work with menuconfig instead of configuration file.

    Read the article

  • Compiling NETGEAR WNR2000v3 firmware under 12.04.1 LTS

    - by Madmanguruman
    I'm trying to compile the GPL NETGEAR firmware for the WNR2000v3 router using Ubuntu 12.04.1 LTS. I've downloaded and extracted the source, installed everything I think I need, yet there are two build dependencies that I cannot resolve: > make menuconfig .... Build dependency: Please install ncurses. (Missing libncurses.so or ncurses.h) Build dependency: Please install zlib. (Missing libz.so or zlib.h) I've tried apt-getting all of the following packages: libncurses5 libncurses5:i386 libncurses5-dev zlib1g zlib1g-dev zlib1g-dbg The missing libs seem 'real': the target .so files aren't in /usr/lib, although the .h files are in /usr/include. EDIT: some Googling told me of broken or missing symlinks. I found the following: /lib/i386-linux-gnu/libncurses.so.5 -> libncurses.so.5.9 /lib/i386-linux-gnu/libncurses.so.5.9 /lib/i386-linux-gnu/libncursesw.so.5 -> libncursesw.so.5.9 /lib/i386-linux-gnu/libncursesw.so.5.9 /lib/i386-linux-gnu/libz.so.1 -> libz.so.1.2.3.4 /lib/i386-linux-gnu/libz.so.1.2.3.4 so I tried to symlink these to /usr/lib: /usr/lib/libncurses.so -> /lib/i386-linux-gnu/libncurses.so.5 /usr/lib/libz.so -> /lib/i386-linux-gnu/libz.so.1 but the project still complains about missing libncurses and zlib. EDIT: I was able to get the dependencies to work under 8.04. Need to cross-reference things now. Does anyone have some tips on how to debug this sort of issue?

    Read the article

  • Am I using the getch() function from the ncurses library incorrectly?

    - by user1692446
    I am writing a Pacman game in c++ using the ncurses library, but I am not able to move the Pacman properly. I have used getch() to move it it up, down, left and right, but it only moves right and does not move anywhere else when I press any other key. This is a code snippet for moving up. I have written similar code with some conditions altered accordingly for moving left, right and down. int ch = getch(); if (ch == KEY_RIGHT) { int i,row,column; //getting position of cursor by getyx function for (i=column; i<=last_column; i+=2) { //time interval of 1 sec mvprintw(row,b,"<"); //print < in given (b,row) coordinates //time interval of 1 sec mvprintw(row,(b+1),"O"); //print "O" next to "<" int h = getch(); //to give the option for pressing another key if (h != KEY_RIGHT) //break current loop if another key is pressed { break; } } } if (condition) { //code to move left } Am I using getch() wrong, or is there something else I have to do?

    Read the article

  • BitchX - Segmentation fault

    - by alexus
    Last login: Tue Mar 16 15:29:57 on ttys002 mbp:~ alexus$ sudo port install bitchx Password: --- Computing dependencies for bitchx --- Fetching ncursesw --- Attempting to fetch ncurses-5.7.tar.gz from http://distfiles.macports.org/ncurses --- Verifying checksum(s) for ncursesw --- Extracting ncursesw --- Configuring ncursesw --- Building ncursesw --- Staging ncursesw into destroot --- Installing ncursesw @5.7_0+darwin_10 --- Activating ncursesw @5.7_0+darwin_10 --- Cleaning ncursesw --- Fetching ncurses --- Verifying checksum(s) for ncurses --- Extracting ncurses --- Configuring ncurses --- Building ncurses --- Staging ncurses into destroot --- Installing ncurses @5.7_0+darwin_10 --- Activating ncurses @5.7_0+darwin_10 --- Cleaning ncurses --- Fetching bitchx --- Attempting to fetch ircii-pana-1.1-final.tar.gz from http://voxel.dl.sourceforge.net/bitchx --- Verifying checksum(s) for bitchx --- Extracting bitchx --- Applying patches to bitchx --- Configuring bitchx --- Building bitchx --- Staging bitchx into destroot --- Installing bitchx @1.1_1+darwin --- Activating bitchx @1.1_1+darwin --- Cleaning bitchx mbp:~ alexus$ BitchX BitchX - Based on EPIC Software Labs epic ircII (1998). Version (BitchX-1.1-final) -- Date (20040326). Process [30864] Segmentation fault mbp:~ alexus$ any ideas why is it doing "Segmentation fault" and how to troubleshoot it?

    Read the article

  • Error during configuring kerberos5 using macports

    - by ario
    While trying to install libmemcached via MacPorts, I hit the following issue: libmemcached @0.40 +universal ---> Computing dependencies for libmemcached ---> Dependencies to be installed: cyrus-sasl2 kerberos5 ---> Configuring kerberos5 Error: org.macports.configure for port kerberos5 returned: configure failure: command execution failed Error: Failed to install kerberos5 It tells me to look in the log for details. Here's the last bit of the log file: :info:configure checking for setupterm in -lcurses... no :info:configure checking for setupterm in -lncurses... no :info:configure checking for tgetent... no :info:configure configure: error: Could not find tgetent; are you missing a curses/ncurses library? :info:configure configure: error: /bin/sh './configure' failed for appl/telnet :info:configure Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_kerberos5/kerberos5/work/krb5-1.7.2/src" && ./configure --prefix=/opt/local --disable-dependency-tracking --mandir=/opt/local/share/man :info:configure Exit code: 1 :error:configure org.macports.configure for port kerberos5 returned: configure failure: command execution failed :debug:configure Error code: NONE :debug:configure Backtrace: configure failure: command execution failed while executing "$procedure $targetname" :info:configure Warning: targets not executed for kerberos5: org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.install :error:configure Failed to install kerberos5 :debug:configure Registry error: kerberos5 not registered as installed & active. invoked from within "registry_active ${subport}" invoked from within "$workername eval registry_active \${subport}" :notice:configure Please see the log file for port kerberos5 for details: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_kerberos5/kerberos5/main.log It seems to say it's missing ncurses. Looks like it's there though, since if I run port installed I see these: ncurses @5.7_0 ncurses @5.9_1 (active) ncursesw @5.7_0 Any ideas on how to get around this error?

    Read the article

  • 256 colors, foreground and background

    - by push.cx
    This is a tale of two scripts and is related to a previous question. The two scripts are at http://gist.github.com/50692. The ansi.rb script displays all 256 colors on all 256 background colors. The ncurses.rb script displays all 256 foreground colors but the background displays the basic 16 and then seems to cycle through various attributes like blinking and reverse video. So what gives? Is this the bug in ncurses that it uses a signed integer for color pairs? (ie 'tput colors' says 256 but 'tput pairs' says 32767 instead 65536) It seems like if that were the case the first half of the colors pairs would display properly but the second half would repeat or get into the attributes as the int wraps.

    Read the article

  • Interactive command to let user change directory in bash

    - by Rich
    I am looking for a CURSES-based way (bash, c, doesn't really matter) of letting a user choose a folder or even a file in roughly the same way that they would do using Midnight Commander. I envisage using up/down for moving the cursor, esc to cancel, and enter to select the item under the cursor. If the item is a file, then return the full path to that file, if the item is a folder, change into that folder. Does anyone know of one that exists? If not, how would I go about writing one? I'm mainly a Java programmer, so I could use JavaCurses, but it feels a bit like overkill.

    Read the article

  • How to install Python 2.7 w/ unix libs on cygwin

    - by JIStone
    I have been trying for about a week to get this to work. Obviously getting Python 2.6 is easy - just install the cygwin package with setup.exe. Installing the windows version of Python2.7 was also easy, but I could not access the Unix Modules. So I've been trying to install Python from source, but it seems every time I fix one make error there is another waiting just behind it. Getting rather fed up with the whole thing & thinking someone else must have either done this or figured out it is impossible. I feel installing Linux would have been the easier route . . .

    Read the article

  • (C++) If statement not effective

    - by Galileo
    void spriteput(int x,int y, int stype) { char sprite1[5]="OOOO"; char sprite2[5]="OOOO"; char sprite3[5]="OOOO"; char sprite4[5]="OOOO"; if (stype == 1) { char sprite1[5] = " OO "; char sprite2[5] = "OOOO"; char sprite3[5] = "OOOO"; char sprite4[5] = " OO "; mvprintw(2,y,"%s \n",sprite1); } mvprintw(x+1,y,"%s \n",sprite2); mvprintw(x+2,y,"%s \n",sprite3); mvprintw(x+3,y,"%s \n",sprite4); } If I'm correct that block of code should print out on a NCURSES screen OO OOOO OOOO OO Instead however, it prints out the default text (the first char statements). Can anyone tell me why this is? The "printw" statement inside the If-block prints out the proper text, so it's being assigned correctly. Thank you in advance.

    Read the article

  • realloc - converting int to char

    - by Mike
    I'm converting an array of integers into a char by iterating through the whole array, and then I'm adding the resulting string to ncurses's method new_item. For some reason I'm doing something wrong the way I reallocate memory, thus I get the the first column as: -4 Choice 1 0 Choice 1 4 Choice 2 1 Choice 1 4 Choice 3 - Instead of - 2 Choice 1 4 Choice 4 3 Choice 1 4 Exit 4 Choice 1 - #include <stdio.h> #include <stdlib.h> #include <curses.h> #include <menu.h> #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) #define CTRLD 4 char *choices[] = { "Choice 1", "Choice 2", "Choice 3", "Choice 4", "Exit", }; int table[5]={0,1,2,3,4}; int main() { ITEM **my_items; int c; MENU *my_menu; int n_choices, i; ITEM *cur_item; initscr(); cbreak(); noecho(); keypad(stdscr, TRUE); n_choices = ARRAY_SIZE(choices); my_items = (ITEM **)calloc(n_choices + 1, sizeof(ITEM *)); // right here char *convert = NULL; for(i = 0; i < n_choices; ++i){ convert = (char *) realloc (convert, sizeof(char) * 4); sprintf(convert, "%i", table[i]); my_items[i] = new_item(convert, choices[i]); } my_items[n_choices] = (ITEM *)NULL; my_menu = new_menu((ITEM **)my_items); mvprintw(LINES - 2, 0, "F1 to Exit"); post_menu(my_menu); refresh(); while((c = getch()) != KEY_F(1)) { switch(c) { case KEY_DOWN: menu_driver(my_menu, REQ_DOWN_ITEM); break; case KEY_UP: menu_driver(my_menu, REQ_UP_ITEM); break; } } free(convert); unpost_menu(my_menu); free_item(my_items[0]); free_item(my_items[1]); free_item(my_items[2]); free_item(my_items[3]); free_item(my_items[4]); free_menu(my_menu); endwin(); }

    Read the article

  • calling calloc - memory leak valgrind

    - by Mike
    The following code is an example from the NCURSES menu library. I'm not sure what could be wrong with the code, but valgrind reports some problems. Any ideas... ==4803== 1,049 (72 direct, 977 indirect) bytes in 1 blocks are definitely lost in loss record 25 of 36 ==4803== at 0x4C24477: calloc (vg_replace_malloc.c:418) ==4803== by 0x400E93: main (in /home/gerardoj/a.out) ==4803== ==4803== LEAK SUMMARY: ==4803== definitely lost: 72 bytes in 1 blocks ==4803== indirectly lost: 977 bytes in 10 blocks ==4803== possibly lost: 0 bytes in 0 blocks ==4803== still reachable: 64,942 bytes in 262 blocks Source code: #include <curses.h> #include <menu.h> #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) #define CTRLD 4 char *choices[] = { "Choice 1", "Choice 2", "Choice 3", "Choice 4", "Choice 5", "Choice 6", "Choice 7", "Exit", } ; int main() { ITEM **my_items; int c; MENU *my_menu; int n_choices, i; ITEM *cur_item; /* Initialize curses */ initscr(); cbreak(); noecho(); keypad(stdscr, TRUE); /* Initialize items */ n_choices = ARRAY_SIZE(choices); my_items = (ITEM **)calloc(n_choices + 1, sizeof(ITEM *)); for (i = 0; i < n_choices; ++i) { my_items[i] = new_item(choices[i], choices[i]); } my_items[n_choices] = (ITEM *)NULL; my_menu = new_menu((ITEM **)my_items); /* Make the menu multi valued */ menu_opts_off(my_menu, O_ONEVALUE); mvprintw(LINES - 3, 0, "Use <SPACE> to select or unselect an item."); mvprintw(LINES - 2, 0, "<ENTER> to see presently selected items(F1 to Exit)"); post_menu(my_menu); refresh(); while ((c = getch()) != KEY_F(1)) { switch (c) { case KEY_DOWN: menu_driver(my_menu, REQ_DOWN_ITEM); break; case KEY_UP: menu_driver(my_menu, REQ_UP_ITEM); break; case ' ': menu_driver(my_menu, REQ_TOGGLE_ITEM); break; case 10: { char temp[200]; ITEM **items; items = menu_items(my_menu); temp[0] = '\0'; for (i = 0; i < item_count(my_menu); ++i) if(item_value(items[i]) == TRUE) { strcat(temp, item_name(items[i])); strcat(temp, " "); } move(20, 0); clrtoeol(); mvprintw(20, 0, temp); refresh(); } break; } } free_item(my_items[0]); free_item(my_items[1]); free_menu(my_menu); endwin(); }

    Read the article

1 2 3  | Next Page >