EmbDev.net

Forum: ARM programming with GCC/GNU tools Ncurses does not display text that should be flashing


Author: Kirkina Alya (Company: no) (alya)
Posted on:

Rate this post
0 useful
not useful
#include <ncurses.h>
#include <locale.h>
#include <unistd.h>
#include <string.h>

int main()
{
  setlocale(LC_ALL, "");
  
    initscr();
    
     char str[]={"Hello world!"};
     for(int i=0; i<strlen(str); i++)
     {
         addch(str[i] | A_BLINK);
     }
     refresh();
     getch();
    
    endwin();              
    return 0;
}
After compiling and executing this code, I do not see any flashing text, 
just output a string.
Do you have the same thing?
I'm writing on armv7

: Edited by User
Author: Svenska (Guest)
Posted on:

Rate this post
0 useful
not useful
Does your terminal emulator support blinking?

Author: Kirkina Alya (Company: no) (alya)
Posted on:

Rate this post
0 useful
not useful
Svenska wrote:
> Does your terminal emulator support blinking?

I dont know. I'm using this 
https://4pda.ru/forum/index.php?showtopic=164972

Author: Svenska (Guest)
Posted on:

Rate this post
0 useful
not useful
Your text blinks on my computer (Linux, xterm), so the code works. Don't 
blame ncurses if your terminal is stupid. :-)

Author: Jemand (Guest)
Posted on:

Rate this post
0 useful
not useful
Only a few terminal emulators support blinking (some may just highlight 
it by other means); part of the reason is that it's very obnoxious. For 
remotely portable blinking you will need to periodically redraw the 
text.

Author: Kirkina Alya (Company: no) (alya)
Posted on:

Rate this post
0 useful
not useful
Jemand wrote:
> Only a few terminal emulators support blinking (some may just highlight
> it by other means); part of the reason is that it's very obnoxious. For
> remotely portable blinking you will need to periodically redraw the
> text.

This is a very necessary function, I already put arm xterm and now 
everything works. For the sake of such beauty you can and suffer.

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig