Thread View: comp.unix.programmer
9 messages
9 total messages
Started by hao zhou
Tue, 30 Oct 1990 17:00
printing underlined text
Author: hao zhou
Date: Tue, 30 Oct 1990 17:00
Date: Tue, 30 Oct 1990 17:00
8 lines
635 bytes
635 bytes
Does anybody out there know if it's possible to print out underlined text using printf() in C? And how? Thanks ... Hao -- Internet:haozhou@acsu.buffalo.edu BITNET:haozhou%acsu.buffalo.edu@UBVM.BITNET UUCP: rutgers!ub!haozhou
Re: printing underlined text
Author: Russ Cage
Date: Tue, 30 Oct 1990 21:30
Date: Tue, 30 Oct 1990 21:30
18 lines
1184 bytes
1184 bytes
In article <43321@eerie.acsu.Buffalo.EDU> haozhou@acsu.buffalo.edu (hao zhou) writes: >Does anybody out there know if it's possible to print out underlined >text using printf() in C? And how? This really belongs in comp.lang.c, but... printf( "Underlined text\015__________ ____\n" ); ought to work on any ASCII system with printing terminals. To use underlining on CRTs or other fancy equipment you have to get hardware-specific (or use termcap). Followups to comp.lang.c. -- Russ Cage Ford Powertrain Engineering Development Department Work: itivax.iti.org!cfctech!fmeed1!cage (CHATTY MAIL NOT ANSWERED HERE) Home: russ@m-net.ann-arbor.mi.us (All non-business mail) Member: HASA, "S" division.
pause(2) vs. sigpause(3)
Author: Blair P. Houghton
Date: Wed, 31 Oct 1990 01:22
Date: Wed, 31 Oct 1990 01:22
13 lines
763 bytes
763 bytes
Is there a difference between `pause()' and `sigpause(0)'? I can't see one. Why obsoleted a perfectly simple system call with a library function? (BTW, neither of them is ANSI C; I don't know which might be in POSIX). --Blair "Golly. Another one. But then, nobody ever answered my first..."
Re: pause(2) vs. sigpause(3)
Author: Paul John Falstad
Date: Wed, 31 Oct 1990 03:42
Date: Wed, 31 Oct 1990 03:42
17 lines
1084 bytes
1084 bytes
In article <717@inews.intel.com> bhoughto@cmdnfs.intel.com (Blair P. Houghton) writes: >Is there a difference between `pause()' and `sigpause(0)'? > >I can't see one. Neither can I. They're the other way around on my system, though (SunOS). pause(3) and sigpause(2). >Why obsoleted a perfectly simple system call with a >library function? What? -- Paul Falstad, pfalstad@phoenix.princeton.edu PLink:HYPNOS GEnie:P.FALSTAD I would bring back hanging, and go into rope. I would cut off the more disreputable parts of the body and use the space for playing fields.
Re: pause(2) vs. sigpause(3)
Author: Dan Bernstein
Date: Wed, 31 Oct 1990 04:58
Date: Wed, 31 Oct 1990 04:58
14 lines
973 bytes
973 bytes
In article <717@inews.intel.com> bhoughto@cmdnfs.intel.com (Blair P. Houghton) writes: > Why obsoleted a perfectly simple system call with a > library function? Here it's pause(3) and sigpause(2). What machine are you using? > (BTW, neither of them is ANSI C; I don't know which might > be in POSIX). POSIX imitated the BSD signal facilities, with some helpful additions. It made sigpause() into sigsuspend(). The difference is that the argument is a ``sigset_t'' manipulated by macros. ---Dan
Re: pause(2) vs. sigpause(3)
Author: Blair P. Houghton
Date: Wed, 31 Oct 1990 15:59
Date: Wed, 31 Oct 1990 15:59
29 lines
1624 bytes
1624 bytes
In article <27817:Oct3104:58:4990@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: >In article <717@inews.intel.com> bhoughto@cmdnfs.intel.com (Blair P. Houghton) writes: >> Why obsoleted a perfectly simple system call with a >> library function? > >Here it's pause(3) and sigpause(2). What machine are you using? A Dyslexia 1990 running Ungodlix -DDEBUG9... I.e., it was a typo. So was 'obsoleted', for you more confused readers out there... >> (BTW, neither of them is ANSI C; I don't know which might >> be in POSIX). > >POSIX imitated the BSD signal facilities, with some helpful additions. >It made sigpause() into sigsuspend(). The difference is that the >argument is a ``sigset_t'' manipulated by macros. I've looked a little harder and tried a few more (seemingly pathological) situations, and it seems `pause()' waits for whatever signals are currently unblocked, and `sigpause(0)' unblocks everything (only for the duration of the wait) and then waits. (sigpause(n) would use n as a signal mask). --Blair "The wonders of skience." -Popeye the Sailor Man
Re: pause(2) vs. sigpause(3)
Author: John Cowan
Date: Wed, 31 Oct 1990 16:08
Date: Wed, 31 Oct 1990 16:08
17 lines
1063 bytes
1063 bytes
In article <717@inews.intel.com> bhoughto@cmdnfs.intel.com (Blair P. Houghton) writes: >Is there a difference between `pause()' and `sigpause(0)'? > >I can't see one. > >Why obsoleted a perfectly simple system call with a >library function? As others have pointed out, pause(3) is the library routine and sigpause(2) is the system call. Pause used to be pause(2) on V7, but now is a compatibility library routine calling sigpause(2). Similar things have happened with exit(3), formerly exit(2) but now calling _exit(2); alarm(3); signal(3); and so on. -- cowan@marob.masa.com (aka ...!hombre!marob!cowan) e'osai ko sarji la lojban
Re: pause(3) vs. sigpause(2)
Author: Chris Torek
Date: Thu, 01 Nov 1990 00:07
Date: Thu, 01 Nov 1990 00:07
17 lines
1275 bytes
1275 bytes
In article <722@inews.intel.com> bhoughto@cmdnfs.intel.com (Blair P. Houghton) writes: >... it seems `pause()' waits for >whatever signals are currently unblocked, and `sigpause(0)' >unblocks everything (only for the duration of the wait) and >then waits. (sigpause(n) would use n as a signal mask). Correct. As the manual page states, sigpause(mask) atomically sets the signal mask to `mask' and waits for a signal, then restores the signal mask to whatever it was before. pause() is effectively equivalent to sigpause(sigblock((sigmask_t)0)). (Use sigblock(0L) in old systems, or sigblock(0) if you do not care about 2.10BSD.) -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 405 2750) Domain: chris@cs.umd.edu Path: uunet!mimsy!chris
Re: pause(3) vs. sigpause(2)
Author: Chris Torek
Date: Thu, 01 Nov 1990 07:47
Date: Thu, 01 Nov 1990 07:47
8 lines
876 bytes
876 bytes
In article <27338@mimsy.umd.edu> I wrote: >pause() is effectively equivalent to sigpause(sigblock((sigmask_t)0)). Oops, that should be `sigset_t', not `sigmask_t'. (Of course, many systems have neither, which is why I suggested 0L or plain 0 as well.) -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 405 2750) Domain: chris@cs.umd.edu Path: uunet!mimsy!chris
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads