10-03-2005
precompile directive?
hey everyone. havent posted here in a longgggg time. hope to see some familiar faces!
heres my question, ive been doing basic programming in c++ again and want to use getch(). in *nix i have to use the curses library, and in windows conio.h
is there a way i can have the compiler determine what OS i am running?
so, if i am under some kind of linux itll use #include <curses> and if under windows itll use #include <conio.h>
thanks!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I set up a directive for the .htaccess file in one of my web directories. It works fine. Is there a way to force only users outside my internal home network to go through the password authorization? Or, put another way, any user in my network should not have to enter a password.
Is that possible? (2 Replies)
Discussion started by: dangral
2 Replies
2. Programming
Hi there,
I'm working on a c++ project and I need to use some libraries which are part of a framework. I installed it on my home directory, and alle the .hh are located in subdirs of my home.
I'd like to include the files I need just as if they where std c header, that is:
#include... (2 Replies)
Discussion started by: clalfa
2 Replies
3. Shell Programming and Scripting
Hi all,
I need to check the contents of my vpath directive in my file. Is it possible to check the contents of the vpath directive as we do for a variable like @echo '$vpath' .
Please let me know the above is correct or suggest me the correct one.
Thanks in advance.
-Jerry (6 Replies)
Discussion started by: jerryragland
6 Replies
4. Web Development
Hi,
Does the apache Allow from directive support regular expressions?
such as: Allow from ^web11blah\.blah\.blah\.yahoo\.com$
what i want to do:
allow access from hosts in the range web1160blah.blah.blah.yahoo.com to web1189blah.blah.blah.yahoo.com
notice the 1160 to 1189 range as part... (3 Replies)
Discussion started by: Yogesh Sawant
3 Replies
5. Programming
hi
I am getting the following warning while compilation of my C project.
/var/tmp/aaaa003z6: warning: 101: extra tokens (ignored) after directive
Can anyone help what this warning means and how to get rid of this.
Thanks (1 Reply)
Discussion started by: pratim09
1 Replies
6. Web Development
I am installing a .crl in my apache config. It looks like this:
<VirtualHost default>
DocumentRoot "web" ServerName example.com
SSLEngine on
SSLCertificateFile "cert.crt" SSLCertificateKeyFile "key.key" SSLCertificateChainFile "cert.ca-bundle"
SSLProtocol -all +SSLv3... (0 Replies)
Discussion started by: DocBrewer
0 Replies
7. UNIX for Dummies Questions & Answers
Hi all,
I am doing an assignment and there is something I am confused about.
The requirement is to set up the DNS and sendmail to two domains: lab1 and lab2, with hosts of mail.lab1 and mail.lab2 both acting as DNS server and email server, and send mail from root@lab1 to root@lab2. However, it... (4 Replies)
Discussion started by: tetelee
4 Replies
8. Shell Programming and Scripting
Hi,
Please check the below code...:wall:
if ; then
echo "/var/log/AAA/BBB/xxx_*.log /var/log/AAA/BBB/yyy_*.log {" >> /etc/logrotate.conf
echo " weekly" >> /etc/logrotate.conf
echo " rotate 10" >> /etc/logrotate.conf... (2 Replies)
Discussion started by: Dedeepthi
2 Replies
9. Ubuntu
HI guys.
when i configure Files in this way:
<Files ~ "\.png$"> deny from all </Files>
it works. but when defining in this way it doesn't work:
<Files /var/www/test/file.png> deny from all </Files>
directives are not inside Directory directive. Could someone help? (0 Replies)
Discussion started by: majid.merkava
0 Replies
10. Shell Programming and Scripting
$ cat tmp.sh
#!/tools/bin/bash
echo $BASH_VERSION
$ cat tmp.pl
#!/usr/local/bin/perl
use strict;
use warnings;
use DBI;
use CGI;
system("tmp.sh");$ tmp.sh
3.2.48(1)-release
The result is as expected.
$ tmp.pl
3.2.25(1)-releaseThe result is not as expected.
The shell directive in... (5 Replies)
Discussion started by: carloszhang
5 Replies
LEARN ABOUT BSD
resizeterm
resizeterm(3NCURSES) resizeterm(3NCURSES)
NAME
is_term_resized, resize_term, resizeterm - change the curses terminal size
SYNOPSIS
#include <curses.h>
bool is_term_resized(int lines, int columns);
int resize_term(int lines, int columns);
int resizeterm(int lines, int columns);
DESCRIPTION
This is an extension to the curses library. It provides callers with a hook into the ncurses data to resize windows, primarily for use by
programs running in an X Window terminal (e.g., xterm). The function resizeterm resizes the standard and current windows to the specified
dimensions, and adjusts other bookkeeping data used by the ncurses library that record the window dimensions.
Most of the work is done by the inner function resize_term. The outer function resizeterm adds bookkeeping for the SIGWINCH handler. When
resizing the windows, resize_term blank-fills the areas that are extended. The calling application should fill in these areas with appro-
priate data. The resize_term function attempts to resize all windows. However, due to the calling convention of pads, it is not possible
to resize these without additional interaction with the application.
A support function is_term_resized is provided so that applications can check if the resize_term function would modify the window struc-
tures. It returns TRUE if the windows would be modified, and FALSE otherwise.
RETURN VALUE
Except as notes, these function return the integer ERR upon failure and OK on success. They will fail if either of the dimensions are less
than or equal to zero, or if an error occurs while (re)allocating memory for the windows.
NOTES
While these functions are intended to be used to support a signal handler (i.e., for SIGWINCH), care should be taken to avoid invoking them
in a context where malloc or realloc may have been interrupted, since it uses those functions.
If ncurses is configured to supply its own SIGWINCH handler, the resizeterm function ungetch's a KEY_RESIZE which will be read on the next
call to getch. This is used to alert an application that the screen size has changed, and that it should repaint special features such as
pads that cannot be done automatically.
If the environment variables LINES or COLUMNS are set, this overrides the library's use of the window size obtained from the operating sys-
tem. Thus, even if a SIGWINCH is received, no screen size change may be recorded. In that case, no KEY_RESIZE is queued for the next call
to getch; an ERR will be returned instead.
SEE ALSO
curses_variables(3NCURSES), wresize(3NCURSES).
AUTHOR
Thomas Dickey (from an equivalent function written in 1988 for BSD curses).
resizeterm(3NCURSES)