Sponsored Content
Full Discussion: clear screen
Top Forums Programming clear screen Post 25486 by immanuelgangte on Wednesday 31st of July 2002 06:38:48 AM
Old 07-31-2002
Question clear screen

what is the syntax for clearing the screen in c ?
when i tried "Clrscr()" the CC complier does not reconise it.
please do tell me more about this.
thanking you

imma
 

10 More Discussions You Might Find Interesting

1. Programming

How to clear screen

I searched the post and someone said to clear the screen in C, use printf("\033[2J"); ?? However, this doesn't work...typo or no. What is an equivalent command to 'CLS' in DOS/'clear' in UNIX to clear the screen and go to top of screen?? Thank you. (2 Replies)
Discussion started by: giannicello
2 Replies

2. Programming

clear screen in g++

How do I clear screen in g++ I've included curses and tried compile with lcurses as per gcc but fails, I can clear by using system("clear") but would prefer to use the curses library if possible. (2 Replies)
Discussion started by: gefa
2 Replies

3. Shell Programming and Scripting

Clear screen in NAWK

Hello guys, I wonder if it is possible to clear out the screen in AWK. I'm printing out mail messages and I would like every message starting on the beginning of the screen. When I use FOR loop and printf("\n") it clears out the screen but my text is somewhere in the middle of the screen. ... (2 Replies)
Discussion started by: petoSVK
2 Replies

4. Programming

how to clear screen in GDB session

hi , Could any one tell me the command for clearing the screen in GDB session (1 Reply)
Discussion started by: useless79
1 Replies

5. UNIX for Dummies Questions & Answers

how to clear history

Hi... i have one doubt pls... 1)can we clear the command line history in UNIX for a paricular login(scadm/root)if so how?. 2) can we see the time at which command executed. history is showing like : 100 display 101 lock 102 exit (7 Replies)
Discussion started by: gincemathew
7 Replies

6. OS X (Apple)

Virtual screen accessed by Screen Sharing

Hi, I'm trying to create a virtual screen, (maybe xvfb? or any other virtual screen buffer) and be able to use Screen Sharing to connect to it. The setup is that I have a Mac Mini connected to the TV. But when my girlfriend is using Front Row, I can't use Screen Sharing at the same time from... (0 Replies)
Discussion started by: linge
0 Replies

7. Shell Programming and Scripting

Clear Screen Command for BASH shell

I am unable to use clear or cls command on bash shell. I have recently installed Cygwin and am using that for practicing unix commands. I see that I can use Ctrl + L to clear the screen. I created an alias in my .bashrc to do the same as alias cls='^L' This is how i defined other aliases ... (4 Replies)
Discussion started by: erora
4 Replies

8. Red Hat

command line tool to disable screen lock and/or screen saver

Hi, I have a simple question : how to disable screen lock and/or sreen saver with command line with RHEL5.4 ? (1 Reply)
Discussion started by: albator1932
1 Replies

9. UNIX for Dummies Questions & Answers

Accidentally made a screen within a screen - how to move it up one level?

I made a screen within a screen. Is there a way to move the inner screen up one level so that it is at the same level as the first screen running from the shell? (2 Replies)
Discussion started by: phpchick
2 Replies

10. Shell Programming and Scripting

Clear specific part of the screen

I want to clear specific part of the screen. Say for example , i am running a bash script for i in {1..100} do echo "Current Record = $i" done if i use a clear command over there , it will clear my screen however when i scroll up i would have the old records , is there anyway in unix to... (5 Replies)
Discussion started by: chidori
5 Replies
curs_scr_dump(3CURSES)					     Curses Library Functions					    curs_scr_dump(3CURSES)

NAME
curs_scr_dump, scr_dump, scr_restore, scr_init, scr_set - read or write a curses screen from or to a file SYNOPSIS
cc [ flag ... ] file ... -lcurses [ library ... ] #include <curses.h> int scr_dump(char *filename); int scr_restore(char *filename); int scr_init(char *filename); int scr_set(char *filename); DESCRIPTION
With the scr_dump() routine, the current contents of the virtual screen are written to the file filename. With the scr_restore() routine, the virtual screen is set to the contents of filename, which must have been written using scr_dump(). The next call to doupdate() restores the screen to the way it looked in the dump file. With the scr_init() routine, the contents of filename are read in and used to initialize the curses data structures about what the terminal currently has on its screen. If the data is determined to be valid, curses bases its next update of the screen on this information rather than clearing the screen and starting from scratch. scr_init() is used after initscr() or a system(3C) call to share the screen with another process which has done a scr_dump() after its endwin() call. The data is declared invalid if the time-stamp of the tty is old or the terminfo capabilities rmcup() and nrrmc() exist. The scr_set() routine is a combination of scr_restore() and scr_init(). It tells the program that the information in filename is what is currently on the screen, and also what the program wants on the screen. This can be thought of as a screen inheritance function. To read (write) a window from (to) a file, use the getwin() and putwin() routines (see curs_util(3CURSES)). RETURN VALUES
All routines return the integer ERR upon failure and OK upon success. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
curs_initscr(3CURSES), curs_refresh(3CURSES), curs_util(3CURSES), curses(3CURSES), system(3C), attributes(5) NOTES
The header <curses.h> automatically includes the headers <stdio.h> and <unctrl.h>. Note that scr_init(), scr_set(), and scr_restore() may be macros. SunOS 5.11 31 Dec 1996 curs_scr_dump(3CURSES)
All times are GMT -4. The time now is 06:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy