Sponsored Content
Full Discussion: Line-drawing character!
Top Forums Programming Line-drawing character! Post 16841 by zecoj on Thursday 7th of March 2002 10:23:07 AM
Old 03-07-2002
Network Line-drawing character!

Hi guys,
I'm trying to make my program to print out tables usings line-drawing character (alternate char. set) with Curses Library. However, it always prints out control characters (^@) instead of the correct ones.

code example:
mvwaddch(my_window, 23, 12, ACS_RTEE);

appreciate your help, i'm new here
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

delete a line based on first character of the line

Hi, I need to delete all lines in a file which starts with "|" character. Can some one assist me? Thanks (2 Replies)
Discussion started by: borncrazy
2 Replies

2. UNIX for Dummies Questions & Answers

Need to serach if a new line character exists on the last line in a file

I have a file in which I need to search if a new line character exists on the last line in the file. Please let me know how can I achieve it using Unix commands? (10 Replies)
Discussion started by: sunilbm78
10 Replies

3. Shell Programming and Scripting

Awk not working due to missing new line character at last line of file

Hi, My awk program is failing. I figured out using command od -c filename that the last line of the file doesnt end with a new line character. Mine is an automated process because of this data is missing. How do i handle this? I want to append new line character at the end of last... (2 Replies)
Discussion started by: pinnacle
2 Replies

4. HP-UX

How to remove new line character and append new line character in a file?

Hi Experts, I have data coming in 4 columns and there are new line characters \n in between the data. I need to remove the new line characters in the middle of the row and keep the \n character at the end of the line. File is comma (,) seperated. Eg: ID,Client ,SNo,Rank 37,Airtel \n... (8 Replies)
Discussion started by: sasikari
8 Replies

5. Solaris

Line too long error Replace string with new line line character

I get a file which has all its content in a single row. The file contains xml data containing 3000 records, but all in a single row, making it difficult for Unix to Process the file. I decided to insert a new line character at all occurrences of a particular string in this file (say replacing... (4 Replies)
Discussion started by: ducati
4 Replies

6. UNIX for Dummies Questions & Answers

Need help removing last character of every line if certain character

I need help removing the last character of every line if it is a certain character. For example I need to get rid of a % character if it is in the last position. Input: aaa% %bbb ccc d%dd% Output should be: aaa %bbb ccc d%dd I tried this but it gets rid of all of the % characters.... (5 Replies)
Discussion started by: raptor25
5 Replies

7. Shell Programming and Scripting

awk new line issue, saying string can't contain new line character

Hi , I am doing some enhancements in an existing shell script. There it used the awk command in a function as below : float_expr() { IFS=" " command eval 'awk " BEGIN { result = $* print result exit(result == 0) }"' } It calls the function float_expr to evaluate two values ,... (1 Reply)
Discussion started by: mady135
1 Replies

8. Shell Programming and Scripting

Sed: delete on each line before a character and after a character

Hi there, A total sed noob here. Is there a way using sed to delete everything before a character AND after another character on each line in a file? The deletion should also delete the indicating characters(here: an opening and a closing parenthesis). The original file would look like... (3 Replies)
Discussion started by: bnbsd
3 Replies

9. Shell Programming and Scripting

Read character by character in line in which space is also included

Hi friend, I have one file , and i want to read that file character by character. I need this script in ksh. while using read option with -n1 am getting error. while read -n1 c read has bad option And if i am using below script, then if in a line has space like this ( Pallvi mahajan)... (10 Replies)
Discussion started by: pallvi_mahajan
10 Replies

10. Shell Programming and Scripting

Count specific character of a file in each line and delete this character in a specific position

I will appreciate if you help me here in this script in Solaris Enviroment. Scenario: i have 2 files : 1) /tmp/TRANSACTIONS_DAILY_20180730.txt: 201807300000000004 201807300000000005 201807300000000006 201807300000000007 201807300000000008 2)... (10 Replies)
Discussion started by: teokon90
10 Replies
curs_addch(3)						     Library Functions Manual						     curs_addch(3)

NAME
curs_addch, addch, waddch, mvaddch, mvwaddch, echochar, wechochar - Add a character (with attributes) to a Curses window and advance the cursor SYNOPSIS
#include <curses.h> int addch( const chtype ch ); int waddch( WINDOW *win, const chtype ch ); int mvaddch( int y, int x, const chtype ch ); int mvwaddch( WINDOW *win, int y, int x, const chtype ch ); int echochar( const chtype ch ); int wechochar( WINDOW *win, const chtype ch ); LIBRARY
Curses Library (libcurses) STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: addch, waddch, mvaddch, mvwaddch, echochar, wechochar: XCURSES4.2 Refer to the standards(5) reference page for more information about industry standards and associated tags. DESCRIPTION
The addch, waddch, mvaddch, and mvwaddch routines put the character ch into the window at the current cursor position of the window and advance the position of the window cursor. Their function is similar to that of the putchar function. At the right margin, an automatic newline is performed. At the bottom of the scrolling region, if scrollok is enabled, the scrolling region is scrolled up one line. If ch is a tab, newline, or backspace, these functions move the cursor appropriately within the window. A newline also performs clrtoeol before moving. Tabs are considered to be at every eighth column. If ch is another control character, it is drawn in the ^X notation. Calling winch after adding a control character does not return the con- trol character, but instead returns the representation of the control character. Video attributes can be combined with a character in a parameter through an inclusive OR operation. This operation also sets these attributes. (The intent here is to allow text, including attributes, to be copied from one place to another by using inch and addch. See the discussion on standout, predefined video attribute constants, in the curs_attr(3) reference page.) The echochar and wechochar routines are functionally equivalent to a call to addch followed by a call to refresh, or a call to waddch fol- lowed by a call to wrefresh. The knowledge that only a single character is being output is taken into consideration and, for non-control characters, a considerable performance gain may be realized by using these routines instead of their equivalents. Line Graphics The following variables may be used with routines of the addch family to add line-drawing characters to the screen. When variables are defined for the terminal, the A_ALTCHARSET bit is turned on (see curs_attr(3)). Otherwise, the default character specified in the following list is stored in the variable. The names chosen for variables are consistent with the VT100 nomenclature. ------------------------------------------------- Name Default Glyph Description ------------------------------------------------- ACS_ULCORNER + upper left-hand corner ACS_LLCORNER + lower left-hand corner ACS_URCORNER + upper right-hand corner ACS_LRCORNER + lower right-hand corner ACS_RTEE + right tee ACS_LTEE + left tee ACS_BTEE + bottom tee ACS_TTEE + top tee ACS_HLINE - horizontal line ACS_VLINE | vertical line ACS_PLUS + plus ACS_S1 - scan line 1 ACS_S9 _ scan line 9 ACS_DIAMOND + diamond ACS_CKBOARD : checker board (stipple) ACS_DEGREE ' degree symbol ACS_PLMINUS # plus/minus ACS_BULLET o bullet ACS_LARROW < arrow pointing left ACS_RARROW > arrow pointing right ACS_DARROW v arrow pointing down ACS_UARROW ^ arrow pointing up ACS_BOARD # board of squares ACS_LANTERN # lantern symbol ACS_BLOCK # solid square block ------------------------------------------------- NOTES
The header file <curses.h> automatically includes the header file <stdio.h>. Note that addch, mvaddch, mvwaddch, and echochar may be macros. RETURN VALUES
All routines return the integer ERR upon failure and OK upon successful completion. SEE ALSO
Functions: curses(3), curs_attr(3), curs_clear(3), curs_inch(3), curs_outopts(3), curs_refresh(3), putc(3) Others: standards(5) curs_addch(3)
All times are GMT -4. The time now is 05:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy