blinking text


 
Thread Tools Search this Thread
Top Forums Programming blinking text
# 1  
Old 11-18-2006
blinking text

hi every one
i got a problem in blinking text
i tried like this

main()
{
initscr();
move(5,10);
addstr("this is blink->");
addch('H' | A_BLINK);
refresh();
getch();
endwin();
}
an error came like this

[root@localhost 1]# cc r3.c
r3.c: In function ‘main':
r3.c:6: error: ‘A_BLINK' undeclared (first use in this function)
r3.c:6: error: (Each undeclared identifier is reported only once
r3.c:6: error: for each function it appears in.)

noway from this code
will u please show me the another best example.

thank you
# 2  
Old 11-18-2006
Code:
#include <ncurses.h>

main()
{
        initscr();
        move(5,10);
        addstr("this is blink->");
        addch('H' | A_BLINK);
        refresh();
        getch();
        endwin();
}

Don't forget , about that library Smilie
# 3  
Old 11-18-2006
thank you

ya. thank you for ur feedback
still got the problem showing in terminal


[root@localhost 1]# cc r3.c
/tmp/ccSkklIJ.o(.text+0x1d): In function `main':
r3.c: undefined reference to `initscr'
/tmp/ccSkklIJ.o(.text+0x22):r3.c: undefined reference to `stdscr'
/tmp/ccSkklIJ.o(.text+0x2f):r3.c: undefined reference to `wmove'
/tmp/ccSkklIJ.o(.text+0x37):r3.c: undefined reference to `stdscr'
/tmp/ccSkklIJ.o(.text+0x47):r3.c: undefined reference to `waddnstr'
/tmp/ccSkklIJ.o(.text+0x4f):r3.c: undefined reference to `stdscr'
/tmp/ccSkklIJ.o(.text+0x5d):r3.c: undefined reference to `waddch'
/tmp/ccSkklIJ.o(.text+0x65):r3.c: undefined reference to `stdscr'
/tmp/ccSkklIJ.o(.text+0x6e):r3.c: undefined reference to `wrefresh'
/tmp/ccSkklIJ.o(.text+0x76):r3.c: undefined reference to `stdscr'
/tmp/ccSkklIJ.o(.text+0x7f):r3.c: undefined reference to `wgetch'
/tmp/ccSkklIJ.o(.text+0x87):r3.c: undefined reference to `endwin'
collect2: ld returned 1 exit status

can u please tell me the another ex:
for this

thank you
# 4  
Old 11-18-2006
SImple dude , when compile , you forget to link ( ncurses library ).

Just compile like this :

Code:
cc r3.c -lncurses

# 5  
Old 11-18-2006
thak you

thank you very much
it is nice

my out is like

this is blink->H

can i ask u another doubt

H was not blinking
is it blink

by which way it will be.

once again thank you
# 6  
Old 11-18-2006
If you look closer to you shell , you'll see that H ( letter ) is in a white-black background .. It is not blinking altough ..( shell rulezz ..)

If you really want it to blink , you can write your own blink code ..

I'll write one , for something to blink ..

Code:

#include <ncurses.h>

main(void)
{

initscr();

        for(;;)
        {
                move(LINES/2,COLS/2);
                printf("The whole screen is blinking / flashing ");
                refresh();
                flash();
                sleep(1);
        }

}

cc <pr> lncurses , not really blinking , but flashing , maybe it helps .. Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Match text to lines in a file, iterate backwards until text or text substring matches, print to file

hi all, trying this using shell/bash with sed/awk/grep I have two files, one containing one column, the other containing multiple columns (comma delimited). file1.txt abc12345 def12345 ghi54321 ... file2.txt abc1,text1,texta abc,text2,textb def123,text3,textc gh,text4,textd... (6 Replies)
Discussion started by: shogun1970
6 Replies

2. UNIX for Beginners Questions & Answers

Useradd not creating users and just got blinking cursor

Suddenly useradd command is not working,no errors displayed and just got blinking cursor after hitting the command but not actually creating users as expected. Tried using the groupadd command but same results. The last thing that I did if I can remember is changing the default run level from 5... (2 Replies)
Discussion started by: norbie.lopez
2 Replies

3. Debian

Debian fresh install blinking cursor meaning?

Hello, I have downloaded and install debian in computer it is blinking cursor what this mean? (6 Replies)
Discussion started by: Riteshkakkar
6 Replies

4. Shell Programming and Scripting

awk to skip lines find text and add text based on number

I am trying to use awk skip each line with a ## or # and check each line after for STB= and if that value in greater than or = to 0.8, then at the end of line the text "STRAND BIAS" is written in else "GOOD". So in the file of 4 entries attached. awk tried: awk NR > "##"' "#" -F"STB="... (6 Replies)
Discussion started by: cmccabe
6 Replies

5. UNIX for Dummies Questions & Answers

Stop blinking text after process is complete

Trying to make some blinking text to designate a process taking place. Trying to figure out how when the process is complete how to end the blinking. I could clear out but then I lose any prior output which I don't want. echo "Archiving Files..." printf "\x1b (10 Replies)
Discussion started by: wyclef
10 Replies

6. UNIX for Dummies Questions & Answers

Dell monitor blinking with the Solaris

Hi I have experienced some problems with the new monitor on my Solaris WS (Solaris5.4). Old monitor (Sony ES200) died an we installed a new one (Dell Ultrascan P780) The system booted but the monitor statrted blinking at the rate about once in 5-7 seconds. This is espetially strange that the... (0 Replies)
Discussion started by: Andrey Malishev
0 Replies

7. Solaris

T5240 netmgmt port not blinking

I was trying to configure the netmgmt from the serial and set commitpending to true. However, the netmgmt port is not up and blinking. I tried to connect using my notebook directly to the netmgmt port and am not able to ping as well. Previouly i was doing the firmware upgrade using the webconsole.... (20 Replies)
Discussion started by: incredible
20 Replies

8. UNIX for Dummies Questions & Answers

gvim: avoid cursor blinking if window inactive

Hi, I'm a newbie here and don't know if this is the right forum for my question, but I searched for a forum for gvim and can't find one. My gvim shows always a blinking cursor, also if it is not the active xwindow. So I write very often in other xwindows, when editing with gvim. Is there a... (3 Replies)
Discussion started by: jeckle
3 Replies

9. UNIX for Dummies Questions & Answers

Blinking cursor

Cursor is blinking (slightly) while loading page in Firefox, or during scrolling a window. I tried some variants of linux (gnome permanently) and of course my solaris. May be an artifact of X-window? Cause in windows cursor is stable (i'm feeling more confident). PS: It makes me nervous. (0 Replies)
Discussion started by: Xcislav
0 Replies

10. Shell Programming and Scripting

how to make a line BLINKING in output and also how to increase font size in output

how to make a line BLINKING in output and also how to increase font size in output suppose in run a.sh script inside echo "hello world " i want that this should blink in the output and also the font size of hello world should be big .. could you please help me out in this (3 Replies)
Discussion started by: mail2sant
3 Replies
Login or Register to Ask a Question