08-01-2019
Ncurses status bar
Hi, all,
I'm writing a BBS telnet client, and am trying to implement a status bar into it, at the bottom of the screen.
I am using NCurses to accomplish this. So far, it appears to be working, that is, upon connecting to BBS, it
will display the status bar, and then quickly disappear.
Here is some code:
https://pastebin.com/raw/wM6hcQkk
The first function is executed before the second.
It works and everything, but only for a second or so.
Can anyone tell me what i'm doing wrong?
Thanks.
Last edited by ignatius; 08-01-2019 at 01:04 AM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I believe i have most of samba configured right but i get this error each time time try to run it. I was given suggestion that i touch the file, i did, but i still cannot rid myself of this error.
Any suggestions (2 Replies)
Discussion started by: macdonto
2 Replies
2. Programming
hello there,
i'm exploring the curses lib and i'm having some trouble with "defining a style". to clarify: i'm creating a menu driven app and i've been thinking what's the best way to use menus: make global vars (not my favourite), creating a function which designs the menu and returns the... (2 Replies)
Discussion started by: crashnburn
2 Replies
3. Red Hat
I have successfully installed RedHat 8.0 onto a Dell PowerEdge SC1425 today. This server has two SATA hard drives, and an IDE DVD-ROM drive.
Using the following kernel parameters, i successfully installed across both hard drives from CD:
ide0=0x1f0,0x3f6,14 vga=791 resolution=1024x768 expert... (5 Replies)
Discussion started by: fishsponge
5 Replies
4. Shell Programming and Scripting
How To Generate different different progress bar in shell script?
like we install some software it show us progress, like we install RPM that also show us progress.
Thanks,
Bash (2 Replies)
Discussion started by: learnbash
2 Replies
5. Shell Programming and Scripting
I am trying to get sed, tr or awk to search a file that contains records with fields delimited by the vertical bar | and replace the occurrences in the records where the vertical bar is preceded by a space " |" with a vertical bar.
Sample data record
zelli |||59 Stonewall Dr ||W Barnstable |MA... (2 Replies)
Discussion started by: clintrpeterson
2 Replies
6. Shell Programming and Scripting
After some googling, I came across this script to create a spinning cursor:
#!/bin/bash
# paste following in your script
declare -a Spinner
Spinner=(/ - \\ \| / - \\ \| )
Spinnerpos=0
update_spinner()
{
printf "\b"${Spinner}
(( Spinnerpos=(Spinnerpos +1)%8 ))
}
# testing... (2 Replies)
Discussion started by: mrwatkin
2 Replies
7. Programming
Help with ncurses Hi,
I need some help with ncurses.I'm supposed to write a program in C to display date and time and also to input the username and password using C.I chose ncurses for my task and here I am.
Code:
#include <stdio.h>
#include <termios.h>
#include... (1 Reply)
Discussion started by: rakesh_01
1 Replies
8. Programming
i have read in one of links, there its documented
but i am using following code
int main ()
{
char ch;
initscr();
printw("Enter a char :");
ch=getch();
printw("You Entered '%c' ",ch);
getch();
endwin();
return 0;
}
the code does... (2 Replies)
Discussion started by: MrUser
2 Replies
9. Ubuntu
Below the list of command to explain the status
michelangeli@hp:~$ lspci -nn | grep -i net
02:00.0 Ethernet controller : Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 03)
04:00.0 Network controller : Ralink corp. RT2790 Wireless 802.11n 1T/2R... (6 Replies)
Discussion started by: michelangeli
6 Replies
10. Programming
Dear Team
I am using DB2 v10 z/os database . Need expert guidance to figure out best way to track table activities ( Ex Delete, Insert,Update )
Scenario
We have a table which is critical and many developer/testing team access on daily basis . We had instance where some deleted... (1 Reply)
Discussion started by: Perlbaby
1 Replies
LEARN ABOUT DEBIAN
pastebinit
PASTEBINIT(1) [FIXME: manual] PASTEBINIT(1)
NAME
pastebinit - command-line pastebin client
SYNOPSIS
pastebinit [-abfhiljmrtup]
DESCRIPTION
This manual page documents briefly the pastebinit commands
pastebinit reads text and sends it to a "pastebin" on the internet, returning the URL to the user.
It allows the text to be passed through a pipe (|) or from a file passed as an argument.
OPTIONS
Optional arguments (not supported by all pastebins)
-a [author] (default: $USER)
-b [pastebin url] (default is distro-specific with a fallback to pastebin.com)
-f [format for syntax-highlighting] (default: text) (check pastebin's website for complete list, example: python)
-h Help screen
-i [filename] Use filename for input
-l List all the supported pastebins
-j [jabberid] (default: none)
-m [permatag] (default: none)
-r [parent post ID] (default: none)
-t [title of paste] (default: none)
-u [username] (default: none)
-p [password] (default: none)
CONFIGURATION FILE
If a .pastebinit.xml file is found in the user's home directory, pastebinit will use it for its configuration.
Here's an example file:
<pastebinit>
<pastebin>http://paste.ubuntu.com</pastebin>
<author>Stephane Graber</author>
<jabberid>stgraber@stgraber.org</jabberid>
<format>text</format>
</pastebinit>
AUTHORS
Pastebinit is currently written by Stephane Graber.
username, password, format, title, arguments and redirect support added by Daniel Bartlett.
Website: http://launchpad.net/pastebinit
E-mail: stgraber@ubuntu.com
COPYRIGHT
Copyright (C) 2007-2011 Stephane Graber
[FIXME: source] January 09, 2011 PASTEBINIT(1)