Linux-Misc Digest #44, Volume #25 Tue, 4 Jul 00 21:13:04 EDT
Contents:
lilo and vga=... (Florian E.J. Fruth)
Re: Memory Leak in 2.2.x series? (Todd Knarr)
Re: Automated fdisk (Homer Jay)
Re: Netscape and RedHat 6.2 (Akira Yamanita)
Re: fetchmail: needs more features (Colin Smith)
Re: Linux Server Security (Colin Smith)
Re: Compare Win 2000 to Linux Red Hat 6.1 in temperature (Colin Smith)
Re: Why is my harddisk so slow? (Colin Smith)
Re: Automated fdisk (Akira Yamanita)
Re: Memory Leak in 2.2.x series? (Mark Hahn)
Re: Name Query "jabbering" (Akira Yamanita)
Re: Corel PhotoPaint & RH 6.2 problems (Mike Frisch)
Re: lilo and vga=... (Andrew Purugganan)
Re: Automated fdisk (Svend Olaf Mikkelsen)
Re: ANSI Colors in a C program under Linux... (Floyd Davidson)
Re: ANSI Colors in a C program under Linux... (Floyd Davidson)
Re: and the web was silent . . . . . (Jesse Drogin)
old "Imakefile" ("Bill")
----------------------------------------------------------------------------
From: Florian E.J. Fruth <fejf@gmx*/dev/null*.de>
Subject: lilo and vga=...
Date: Wed, 5 Jul 2000 01:06:36 +0200
Hello,
i installed the 2.4.0-test2 kernel with framebuffer support. know i want
to change the graphic mode (on booting).
i read the lilo-howto and help -> they say to add vga=ask to the
lilo.conf should ask me on bootup which vga-mode to use - but it doesn't!
so is there anybody u know what i've forgot or where to get a vga-mode-
list to try a vga=xxx perhaps ?
fejf
--
the backup of my harddisk only takes the half time it
did yesterday. i started to pipe it to /dev/null
------------------------------
From: Todd Knarr <[EMAIL PROTECTED]>
Subject: Re: Memory Leak in 2.2.x series?
Date: 4 Jul 2000 23:43:48 GMT
In comp.os.linux.misc <[EMAIL PROTECTED]> Jeff Shultz
<[EMAIL PROTECTED]> wrote:
> Okay, I boot the system up and it registers 70mb in use, split
> between 38092 for programs, 5740 for Buffer, and 29092 for Cache.
> Using KDE Task Manager and xosview to see this.
OK, quick explanation:
The 'buffers' number is the amount of memory being used to hold I/O
buffers, usually for the disks. This is what under DOS and Windows is
called the disk cache. The 'cached' number is memory that was used to
hold program text and which has not been needed for anything else yet.
When you exit a program, the executable pages are put into the cache
instead of being freed. If you run the program again while it's pages
are still in cache, they can be recovered and used without having to
load anything from disk again. This speeds things up quite a lot. If
a program needs pages for data or code, then the kernel will flush pages
from the page cache and I/O buffers from the buffer cache until it
has enough, but only when it has to.
If you look at the output of the free command, under the Mem: line is
another one with used and free memory numbers adjusted to account for
buffer and page cache. Those numbers give you a more accurate idea of
how much memory is really used and how much can be made available for
use.
And it's not unusual to be into your swap file even with plenty of free
memory. If you've got server process init code and such that hasn't been
used in a long time, the kernel will swap that code out in preference to
flushing disk buffers or the page cache.
--
Oops.
-- Shannon Foraker, Ashes of Victory
------------------------------
From: Homer Jay <[EMAIL PROTECTED]>
Subject: Re: Automated fdisk
Date: Tue, 04 Jul 2000 23:42:27 GMT
In article <8jtdg9$r9b$[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> I wish to create a linux kernel that will serve a single purpose:
> To automatically create a 2GB partition and format with vfat table so
> that I can later use to install Windows 98 onto this partition.
>
> I will be using Linux netboot to execute this kernel. This ultimately
> will be use to automate Windows 98 rollouts.
>
> Any ideas?
Is this a troll? To automatically mess with the partition map would
take a detailed understanding of disk geometry, which you obviously
do not possess. Unless, that is, every disk is _exactly_ the same.
If so, you could dd a good partition map and dd it back to every disk
using an init script on the bootdisk. Something tells me that's not
the case and that this is a _bad_ idea. Do it manually.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: Akira Yamanita <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.questions,comp.os.linux.redhat,comp.os.linux.x
Subject: Re: Netscape and RedHat 6.2
Date: Wed, 05 Jul 2000 00:00:48 GMT
Charles Leslie wrote:
>
> Wish that was the case, I have 384 Megs of Ram and about 512 Meg of swap
> space running on a PIII 700mhz.
Does this happen only on certain pages that you try to view? Can
you reproduce the problem by viewing the same page?
------------------------------
From: [EMAIL PROTECTED] (Colin Smith)
Crossposted-To: comp.os.linux.admin
Subject: Re: fetchmail: needs more features
Date: Tue, 4 Jul 2000 23:46:36 +0100
Reply-To: [EMAIL PROTECTED]
On Fri, 30 Jun 2000 17:33:24 GMT, jason varsoke <[EMAIL PROTECTED]> wrote:
> Does anyone know of a program like fetchmail that has a few more
>features. Specifically I need a fetchmail type program that will delete
>messages on the POP3 server that are N number of days old.
Why don't you POP them all, hand over to your local mail server for
delivery and then use your favourite mail client to delete the older
mails.
>
>-jason
--
UCE probe.
Don't send mail to [EMAIL PROTECTED] there's nobody home.
The address captures spammer addresses and /dev/nulls all their mail.
Regards, [EMAIL PROTECTED]
------------------------------
From: [EMAIL PROTECTED] (Colin Smith)
Subject: Re: Linux Server Security
Date: Wed, 5 Jul 2000 00:06:12 +0100
Reply-To: [EMAIL PROTECTED]
On Sat, 01 Jul 2000 08:30:06 GMT, Scippie <[EMAIL PROTECTED]> wrote:
>Hello,
>
>I have a cable-connection to the internet and I installed a computer with
>Redhat Linux 6.2 to make that internet work on more computers. I also share
>some directories and I have a telnet & ftp server running.
>I don't work on that computer, it stands there, alone in a place where even
>I almost never come. So I don't use it to surf or anything, just a server...
>
>Now my question is... can anyone that has my IP number hack the machine ?
>(please don't prove it, you probably already know my IP number), and what
>can he mess up ?
Basically, yes and a cracker who gets in as root can f**k up *everything*.
>
>I never log in on the computer locally, just sometimes (for a couple of
>minutes to manage the shares) via a telnet session.
Write down the the services that you want the server to provide. Disable
*everything* else. Configure the services you do want to respond only to
*your* network/IP range.
Comment the services out of inetd.conf, remove all the links to stuff
you don't use in the init.d directory. Check the man page for tcpd.
--
UCE probe.
Don't send mail to [EMAIL PROTECTED] there's nobody home.
The address captures spammer addresses and /dev/nulls all their mail.
Regards, [EMAIL PROTECTED]
------------------------------
From: [EMAIL PROTECTED] (Colin Smith)
Subject: Re: Compare Win 2000 to Linux Red Hat 6.1 in temperature
Date: Wed, 5 Jul 2000 00:15:32 +0100
Reply-To: [EMAIL PROTECTED]
On Sun, 2 Jul 2000 03:01:09 -0500, Heriberto Babilonia <[EMAIL PROTECTED]> wrote:
>Unless you are using FrameMaker or Corel Office for Linux I don't see the
>"real" use for this OS... at least for the time being. There are no "real"
>software packages for Linux, other than those two I mentioned, and to be
Well, troll. You're just extremely ignorant. Why not go and find out a little
more about what you're talking about before you vomit your nonsense over
every newsgroup you are subscribed to.
Rest of junk snipped, newsgroups trimmed and followup to advocacy.
--
UCE probe.
Don't send mail to [EMAIL PROTECTED] there's nobody home.
The address captures spammer addresses and /dev/nulls all their mail.
Regards, [EMAIL PROTECTED]
------------------------------
From: [EMAIL PROTECTED] (Colin Smith)
Subject: Re: Why is my harddisk so slow?
Date: Wed, 5 Jul 2000 00:32:16 +0100
Reply-To: [EMAIL PROTECTED]
On Sun, 02 Jul 2000 12:12:16 +0200, Cliff Pennock <[EMAIL PROTECTED]> wrote:
>I've posted this on other newsgroups before, but nobody seems to be able
>to answer my question so I'll try in this newsgroup too...
>
>Hardware: Celeron500, 128 Mb Samsung 15.3Gb UDMA mode4 HDD, SiS5513 IDE
> controller.
>Kernel : 2.2.16, patched with ide-2.2.16.20000630
>BIOS : Detects the harddisk as PIO4 and UDMA4
>hdparm : 3.9-1, params: -d1 -m16 -c1 -A1 (even tried -X66)
> (for some reason, after installing 3.9-1 my hdparm
> manpages were gone)
>
>Enabled SiS5513 support in the kernel, including CONFIG_IDEDMA_AUTO
>(yes, and even recompiled and installed the new kernel :) ).
>
>hdparm -t /dev/hda gives me on average 8Mb/s (slow!)
This is fairly normal for a 7.2krpm drive.
>hdparm -T /dev/hda gives me on average 17Mb/s (waaaaaaay to slow!)
>
Yup. Have you got some process grabbing all your memory? hdparm -T tests
the OS buffer. Sounds like your's is being used elsewhere.
--
UCE probe.
Don't send mail to [EMAIL PROTECTED] there's nobody home.
The address captures spammer addresses and /dev/nulls all their mail.
Regards, [EMAIL PROTECTED]
------------------------------
From: Akira Yamanita <[EMAIL PROTECTED]>
Subject: Re: Automated fdisk
Date: Wed, 05 Jul 2000 00:09:36 GMT
[EMAIL PROTECTED] wrote:
>
> I wish to create a linux kernel that will serve a single purpose:
> To automatically create a 2GB partition and format with vfat table so
> that I can later use to install Windows 98 onto this partition.
>
> I will be using Linux netboot to execute this kernel. This ultimately
> will be use to automate Windows 98 rollouts.
>
> Any ideas?
fdisk < save_keystroke_file
You can do the same thing with the DOS fdisk. DOS will probably
boot faster. Norton Ghost Pro is probably the best solution over-all.
------------------------------
From: Mark Hahn <[EMAIL PROTECTED]>
Subject: Re: Memory Leak in 2.2.x series?
Date: 4 Jul 2000 23:52:09 GMT
> The problem is that when I start and end programs (esp. Netscape) I
> never get back as much memory as they've used. I _never_ get back
precisely as designed, and as you want. free memory is WASTED memory,
and linux tries to keep almost all memory in use. in this case,
it's caching files that, say, netscape might have read. obviously,
if some other use arises, the kernel can easily scavenge this ram.
> used for buffer, the rest used for cache... and already be 5mb into
> my swap file.
a modest amount of swap use is also a good thing. programs (say, X)
always have some VM that they use infrequently, or even only on init.
flushing those pages to swap mean that ram is used more efficiently.
regards, mark hahn.
------------------------------
From: Akira Yamanita <[EMAIL PROTECTED]>
Subject: Re: Name Query "jabbering"
Date: Wed, 05 Jul 2000 00:17:36 GMT
Jim Huddle wrote:
>
> Caldera 2.3 installed on a Toshiba Satellite T2130CS and connected to
> a mixed Netware 4.x-5.x and NT 4.0 network. 10BaseT, unswitched, all
> around. Using a Linksys ECT2 pcmcia Ethernet card.
>
> After the Toshiba has been on the LAN for 5-10 minutes, any netbios
> name query will set it off performing the same query over and over.
> One of the Netware boxes and the PDC pick this up and we have a fine
> mess.
>
> When not spazzing out in this way, all IP and IPX communications work
> well. I usually end the storm by disconnecting the Toshiba from the
> LAN for a couple of seconds.
>
> Anyone got any ideas?
>
> Thanks.
>
> Jim
Do you have Linux with Samba on the Toshiba? I don't really see
how this relates to Linux. If it is relevant to this newsgroup,
post what version of Samba you're running, the client packages,
if you're running some front-end like LinNeighborhood, etc.
------------------------------
From: [EMAIL PROTECTED] (Mike Frisch)
Subject: Re: Corel PhotoPaint & RH 6.2 problems
Date: Wed, 05 Jul 2000 00:19:09 GMT
On Tue, 04 Jul 2000 20:49:28 GMT, Prozessor <[EMAIL PROTECTED]> wrote:
>I�ve tried it under KDE anf Gnome as well and no icons appeared.
Keep in mind this is a version 1.0 release. I didn't get icons either.
>But you have the possibility to make the menuentry or an icon on the
>desktop by yourself by calling the script /usr/bin/potopaint.
Definitely.
>Did anyone of you succeed in running PhotoPaint using a
>preassuresensitve graphicstablet?
I haven't been able to get PhotoPaint to work at all, so if you've gotten
that far, consider yourself lucky :-)
Mike.
------------------------------
From: [EMAIL PROTECTED] (Andrew Purugganan)
Subject: Re: lilo and vga=...
Date: 5 Jul 2000 00:11:40 GMT
Florian E.J. Fruth (fejf@gmx*/dev/null*.de) wrote:
[ Hello,
[ i installed the 2.4.0-test2 kernel with framebuffer support. know i want
[ to change the graphic mode (on booting).
[ i read the lilo-howto and help -> they say to add vga=ask to the
[ lilo.conf should ask me on bootup which vga-mode to use - but it doesn't!
[ so is there anybody u know what i've forgot or where to get a vga-mode-
[ list to try a vga=xxx perhaps ?
er, after adding the line, did you run the lilo command by any chance
--
jazz annandy AT dc DOT seflin DOT org
Registered linux user no. 164098
Doesn't it bother you, that we have to search for intelligent life
--- OUT THERE??
------------------------------
From: [EMAIL PROTECTED] (Svend Olaf Mikkelsen)
Subject: Re: Automated fdisk
Date: Wed, 05 Jul 2000 00:43:11 GMT
Homer Jay <[EMAIL PROTECTED]> wrote:
>In article <8jtdg9$r9b$[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] wrote:
>> I wish to create a linux kernel that will serve a single purpose:
>> To automatically create a 2GB partition and format with vfat table so
>> that I can later use to install Windows 98 onto this partition.
>>
>> I will be using Linux netboot to execute this kernel. This ultimately
>> will be use to automate Windows 98 rollouts.
>>
>> Any ideas?
>
>Is this a troll? To automatically mess with the partition map would
>take a detailed understanding of disk geometry, which you obviously
>do not possess. Unless, that is, every disk is _exactly_ the same.
>If so, you could dd a good partition map and dd it back to every disk
>using an init script on the bootdisk. Something tells me that's not
>the case and that this is a _bad_ idea. Do it manually.
Most disks have a 255 heads, 63 sectors translation. For making a
partition table and a formatted 2 GB FAT partition, the number of
cylinders does not matter.
Assuming the disks should not be tested for bad sectors, only the area
containing MBR, bootsector, 2 FAT copies, and root directory need to
be copied.
For a 2047 MB FAT16 partition that would be 1+62+1+256+256+32 = 608
sectors. The 62 sectors are slack. This would take less than a second,
compared to minutes using DOS format.
--
Svend Olaf
------------------------------
From: Floyd Davidson <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux,comp.lang.c
Subject: Re: ANSI Colors in a C program under Linux...
Date: 04 Jul 2000 16:02:03 -0800
Timo Nieminen <[EMAIL PROTECTED]> wrote:
>Floyd Davidson <[EMAIL PROTECTED]> wrote:
>>If you would like to see a demo program illustrating how to use
>>the terminfo data base (without invoking the entire ncurses package)
>>to determine terminal characteristics and terminal attributes
>>such as colors (and others such as cursor addressing etc.), just
>>say so and I'll email you such a program. It isn't terribly long,
>>but a bit more than commonly is posted to a newsgroup.
>
>Send me one, dunno if I'll use it, but wth, I';m p=isedd a newt, and knowledge
>is goiod.
>
>Timo
>
>Or post it here
Welll, it isn't all that long... here it is.
Floyd
/*
* A demonstration program to illustrate using the TERMINFO
* database without invoking the entire curses package for
* window management.
*
* The following specific functionalities are demonstrated:
*
* A) terminal initialization
* 1) accessing the TERMINFO database
* a) determining terminal characteristics
* b) determining terminal capabilities
* 2) closing a terminal
* a) normal program termination
* b) abnormal program termination
* B) sending TERMINFO defined escape sequences
* 1) char output function definition
* 2) string output function definition
* 3) sending non-parameterized sequences
* 4) sending parameterized sequences
* C) using TERMINFO specified capabilities
* 1) terminal colors
* 2) terminal attributes
* 3) cursor addressing
* 4) save and restore cursor position
* 5) cursor visibility
* 6) clear screen
* 7 clear line
*
*
* This module must be linked with the ncurses library to form an
* executable binary:
*
* cc foo.c -lncurses -o foo
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <term.h>
#include <string.h>
#include <signal.h>
/*
* define NC_ATTR as 1 to use terminfo defined color attributes
* define NC_ATTR as 0 to directly use ANSI X3.64 control sequences
*/
#define NC_ATTR 1
/* screen attribute routines */
void cursor_move(int, int); /* cursor positioning */
void clrscrn(void); /* clear the screen */
void ceol(void); /* clear to end of line */
void ceos(void); /* clear to end of screen */
void inverse(int); /* inverse video on/off */
void sc(void); /* save current cursor position */
void rc(void); /* restore saved cursor position */
void invisible(void); /* make cursor invisible */
void visible(void); /* make cursor visible */
void foreground(int, int); /* set foreground color */
void background(int, int); /* set background color */
void resetcolor(void); /* set default colors */
/* screen attributes */
#define RESET 0
#define BRIGHT 1
#define NOCHANGE 2
#define UNDERLINE 4
#define BLINK 5
#define INVERSE 7
/* screen colors */
#define BLACK 0
#define RED 1
#define GREEN 2
#define YELLOW 3
#define BLUE 4
#define PURPLE 5
#define CYAN 6
#define WHITE 7
#define INVISIBLE 8
#define ORIGINAL 9
char *colors[] = {
"black",
"red",
"green",
"yellow",
"blue",
"purple",
"cyan",
"white"
};
/* output routines for internal use */
void tisend(char *);
int outputc(int);
/* terminal setup and exit routines */
void terminal_init(void);
void terminal_close(int);
/*
* fun functions to do things to the screen
*/
void boxscreen(void); /* draw a screen border */
void print_title(void); /* print a screen title */
void print_data(void); /* print data to screen */
int rows, cols, color_flag;
char *progname;
char title[] = "Screen Attributes Demonstration Program";
char marks[] = " *** ";
int
main(int argc, char *argv[])
{
int count;
progname = argv[0];
/* set up terminfo, and flag if no terminal type is known */
terminal_init();
for(count = 0; count < 100; ++count) {
if (count % 5) {
print_data();
} else {
/* clean up everything each 5th time */
invisible();
clrscrn();
cursor_move(3, (cols/2) - (strlen(title)/2) - (strlen(marks)));
print_title();
cursor_move(rows - 3, 15);
printf("Type ^C to exit...");
boxscreen();
print_data();
}
fflush(stdout);
sleep(2);
}
clrscrn();
visible();
/* clear anything we have done to the terminal */
terminal_close(0);
return EXIT_SUCCESS;
}
/*
* clear the terminal screen and home the cursor
*/
void
clrscrn(void)
{
tisend(clear_screen);
}
/*
* clear to end of line
*/
void
ceol(void)
{
tisend(clr_eol);
}
/*
* clear to end of screen
*/
void
ceos(void)
{
tisend(clr_eos);
}
/*
* cursor positioning,
*
* home is 1,1
*/
void
cursor_move(int row, int col)
{
/* reject out of hand anything negative */
if (--row < 0 || --col < 0) {
return;
}
/* fold out of range values back into the screen */
row = row % rows;
col = col % cols;
/* move the cursor */
tisend(tparm(cursor_address, row, col));
}
/*
* restore the cursor location
*/
void
rc(void)
{
tisend(restore_cursor);
}
/*
* save the cursor location
*/
void
sc(void)
{
tisend(save_cursor);
}
/*
* turn STANDOUT mode on or off
*/
void
inverse(int state)
{
if (state) {
tisend(enter_standout_mode);
} else {
tisend(exit_standout_mode);
}
}
/*
* make cursor invisible
*/
void
invisible(void)
{
#if NC_ATTR
tisend(cursor_invisible);
#else
printf("%c[?25l", 0x1b);
#endif
}
/*
* make cursor visible
*/
void
visible(void)
{
#if NC_ATTR
tisend(cursor_normal);
#else
printf("%c[?25h", 0x1b);
#endif
}
/*
* set the foreground color and attributes
*/
void
foreground(int attr, int color)
{
if (!color_flag) {
return;
}
if (attr < 0 || attr > 7) {
return;
}
if (color < 0 || color > 7) {
return;
}
switch (attr) {
case RESET:
case BRIGHT:
case NOCHANGE:
case UNDERLINE:
case BLINK:
case INVERSE:
break;
default:
attr = RESET;
}
#if NC_ATTR
tisend(tparm(set_attributes, attr));
tisend(tparm(set_a_foreground, color));
#else
printf("%c[%dm", 0x1b, attr);
printf("%c[%dm", 0x1b, color+30);
#endif
}
/*
* set the background color and attributes
*/
void
background(int attr, int color)
{
if (!color_flag) {
return;
}
if (attr < 0 || attr > 7) {
return;
}
if (color < 0 || color > 9) {
return;
}
switch (attr) {
case RESET:
case BRIGHT:
case NOCHANGE:
case UNDERLINE:
case BLINK:
case INVERSE:
break;
default:
attr = RESET;
}
#if NC_ATTR
tisend(tparm(set_attributes, attr));
tisend(tparm(set_a_background, color));
#else
printf("%c[%dm", 0x1b, attr);
printf("%c[%dm", 0x1b, color+40);
#endif
}
/*
* reset color to default
*/
void
resetcolor(void)
{
#if NC_ATTR
tisend(orig_colors);
tisend(tparm(set_attributes, RESET));
#else
printf("%c[0m", 0x1b);
#endif
}
/*
* set up the terminal
*/
void
terminal_init(void)
{
char *term = getenv("TERM");
char *s;
int err_ret;
int i;
if ( !term || ! *term) {
fprintf(stderr,"%s: The TERM environment variable is not set.\n",
progname);
exit(4);
}
/* bsd would use err_ret = setterm(term); */
setupterm(term, 1, &err_ret);
switch (err_ret) {
case -1:
fprintf(stderr,"%s: Can't access terminfo database - ", progname);
fprintf(stderr,"check TERMINFO environment variable\n");
exit(3);
break;
case 0:
fprintf(stderr, "%s: Can't find entry for terminal %s\n",
progname, term);
exit(2);
break;
case 1:
break;
default:
fprintf(stderr, "%s: Unknown tgetent return code %d\n",
progname, err_ret);
exit(1);
}
s = getenv("COLUMNS");
if ( !s || ! *s) {
cols = tigetnum("cols");
} else {
cols = atoi(s);
if (!cols) {
cols = tigetnum("cols");
}
}
s = getenv("LINES");
if ( !s || ! *s) {
rows = tigetnum("lines");
} else {
rows = atoi(s);
if (!rows) {
rows = tigetnum("lines");
}
}
/* screen size is too small - arbitrary choice of size is used */
if (cols < 30 || rows < 12) {
fprintf(stderr, "Screen size [%dx%d] is too small.\n",
cols, rows);
exit(5);
}
if (0 > (color_flag = tigetnum("colors"))) {
color_flag = 0;
}
/* terminal init strings */
tisend(init_1string);
tisend(init_2string);
tisend(init_3string);
tisend(keypad_xmit);
tisend(enter_ca_mode);
#ifndef NSIG
#define NSIG SIGUSR2
#endif
/* reset the terminal on abnormal program termination */
for(i = 1; i < NSIG; ++i) {
signal(i, terminal_close);
}
}
/*
* close the terminal
*/
void
terminal_close(int flag)
{
resetcolor();
inverse(0);
cursor_move(rows, 1);
ceol();
tisend(keypad_local);
tisend(exit_ca_mode);
visible();
exit(EXIT_SUCCESS);
}
/*
* send a terminfo paramter string
*/
void
tisend(char *parm)
{
if ( (char *) -1 != parm ) {
tputs(parm, 1, outputc);
}
}
/*
* character output for tputs() only
*/
int
outputc(int c)
{
fputc(c, stdout);
return 1;
}
/*
* screen embellishment
*/
void
boxscreen(void)
{
int i;
unsigned int bsize;
#define BORDER "<>"
char border[3] = BORDER;
bsize = strlen(border);
background(BRIGHT, CYAN);
foreground(BRIGHT, BLACK);
/* top line */
for ( i = 1; i <= cols; i += bsize) {
cursor_move(1, i);
printf("%s", border);
}
/* both sides */
for ( i = 1; i < rows-0; ++i) {
cursor_move(i, 1);
printf("%s", border);
cursor_move(i, cols - bsize + 1);
printf("%s", border);
}
/* bottom line */
for ( i = 1; i <= cols; i += bsize) {
cursor_move(rows - 0, i);
printf("%s", border);
}
resetcolor();
}
/*
* print the screen title
*/
void print_title(void)
{
background(RESET, RED);
foreground(NOCHANGE, BLACK);
printf(marks);
foreground(UNDERLINE, WHITE);
printf(title);
/*
* note that clearing the UNDERLINE attribute by use of
* RESET, also clears everything else...
*/
foreground(RESET, BLACK);
background(NOCHANGE, RED);
printf(marks);
resetcolor();
}
/*
* print strings to the screen with changing
* colors and different attributes.
*/
void print_data(void)
{
int i, offset, maxcol, currow;
static int color = RED;
char buffer[128];
for(i = 0; i < 7; ++i) {
currow = (2 * i) + 6;
if (currow > (rows - 3)) {
break;
}
offset = (cols / 2) + (5 * i) - 35;
if (offset < 5) {
offset = 5;
}
maxcol = cols - offset - 5;
if (maxcol < 30) {
return;
}
cursor_move(currow, offset);
sprintf(buffer, "%10s: printed on row %2.2d, column %2.2d%s",
colors[color], currow, offset, " ");
buffer[maxcol] = 0;
resetcolor();
foreground(i + 1, color);
printf(" %d %s", i + 1, buffer);
resetcolor();
if (++color > WHITE) {
color = RED;
}
}
if (++color > WHITE) {
color = RED;
}
}
------------------------------
From: Floyd Davidson <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux,comp.lang.c
Subject: Re: ANSI Colors in a C program under Linux...
Date: 04 Jul 2000 15:57:16 -0800
[EMAIL PROTECTED] (William Wueppelmann) wrote:
>In our last episode (Tue, 04 Jul 2000 08:26:22 GMT),
>the artist formerly known as Richard Bos said:
>>Hendrix <[EMAIL PROTECTED]> wrote:
>>
>>> I think that a C program can be written with ANSI escape
>>> characters in order to colorize a screen, and I believe that this would
>>> be included in the ANSI Standard of the C language... It isn't graphics
>>> functions, it just uses the ANSI escape sequences to print...
>>
>>Nope. ANSI wrote more standard than just the one, you know. The ANSI C
>>standard is one; the ANSI escape characters are (I presume) from
>>another, and have nothing to do with ANSI C (now by preference called
>>ISO C, btw, since it was ISO that did the last standard, ANSI being one
>>member of ISO).
>>FWIW, my computer (an MS-DOS box) will not display ANSI escapes as
>>intended, even though I compile ANSI C all the time.
>
>More to the point, the C language itself doesn't have I/O functions, and
The Standard I/O functions are defined as part of the language.
That has been been true since the stdio functions were officially
incorporated into the language specification with the first
ANSI C Standard, a decade ago.
>the C standard libraries make no assumptions about what kind of output
>device (VTU, teletype, etc.) is used.
>
>Curses will provide you with the ability to use colour, if the display
>supports it.
--
Floyd L. Davidson [EMAIL PROTECTED]
Ukpeagvik (Barrow, Alaska)
------------------------------
From: Jesse Drogin <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.help,redhat.general,netscape.public.general
Subject: Re: and the web was silent . . . . .
Date: Tue, 04 Jul 2000 18:02:06 -0700
Magnus wrote:
> >
> >hum, what plug-in would that be?
> >-Jesse
>
> "Plugger" is a nice tool.
>
> -----------------
> Mvh Magnus Lundin
> -----------------
OK. So I now have Plugger 3.2 installed as the application to handle
all the audio types. I get sound for midi and mpeg formats. Still I
don't get any sound for wav files. I should add that my browser doesn't
complain, it simply doesn't generate any sound. Is it possible this is
a problem with my sound driver or audio chip? It is a bit confusing
because the desktop sounds for the Gnome desktop are wav files and they
play ok. I don't actually have a sound card, the sound is integrated
with my motherboard (Intel SE440BX for Pentium II processor)? Recall
that the sounds it does play are very quiet. I have to turn my speakers
up to full blast to hear them a normal level.
thanks, Jesse
------------------------------
From: "Bill" <[EMAIL PROTECTED]>
Subject: old "Imakefile"
Date: Tue, 4 Jul 2000 20:04:55 -0500
I have an old application that includes an "Imakefile" instead of the newer
"Makefile." GNU's "make" won't build it, and I was wondering how to build
it.
Thanks.
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list (and comp.os.linux.misc) via:
Internet: [EMAIL PROTECTED]
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Misc Digest
******************************