EmbDev.net

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


von Kirkina A. (Company: no) (alya)


Rate this post
useful
not useful
1
#include <ncurses.h>
2
#include <locale.h>
3
#include <unistd.h>
4
#include <string.h>
5
6
int main()
7
{
8
  setlocale(LC_ALL, "");
9
  
10
    initscr();
11
    
12
     char str[]={"Hello world!"};
13
     for(int i=0; i<strlen(str); i++)
14
     {
15
         addch(str[i] | A_BLINK);
16
     }
17
     refresh();
18
     getch();
19
    
20
    endwin();              
21
    return 0;
22
}
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
von Svenska (Guest)


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

von Kirkina A. (Company: no) (alya)


Rate this post
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

von Svenska (Guest)


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

von Jemand (Guest)


Rate this post
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.

von Kirkina A. (Company: no) (alya)


Rate this post
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.

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.