LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-12-2010, 10:01 PM   #1
lesca
Member
 
Registered: Sep 2010
Posts: 58

Rep: Reputation: 0
Smile what does prefix "tc" and "cf" in "termios.h" mean?


Hello everyone

I am reading the manual of termios, but I can't figure out what does prefix "tc" and "cf" stand for, say tcgetattr(), and cfgetispeed().

All functions in this manual have those prefixs. I even read the header file, termios.h and google for their meanings, but I find no clue.

And... by the way, I find "TCXONC" in the header file. What is that?

Any tips are appreciated.

Thanks
 
Old 11-13-2010, 04:45 AM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Bookworm (Fluxbox WM)
Posts: 1,391
Blog Entries: 54

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
The 'tc' probably stands for terminal (line) control (or communications). The 'cf' refers to the cflags structure that those particular functions modify.

The TCXONC is used to start and stop the output flow.

Last edited by neonsignal; 11-13-2010 at 05:01 AM.
 
1 members found this post helpful.
Old 11-14-2010, 10:38 PM   #3
lesca
Member
 
Registered: Sep 2010
Posts: 58

Original Poster
Rep: Reputation: 0
Ok, I see...

But what is cflag? Does the 'c' mean 'constant' or 'C language'?

Thanks!!
 
Old 11-14-2010, 10:41 PM   #4
MrCode
Member
 
Registered: Aug 2009
Location: Oregon, USA
Distribution: Arch
Posts: 864
Blog Entries: 31

Rep: Reputation: 148Reputation: 148
Homework question perhaps? Searching "cflags" on Google gave the Wikipedia article as the first result. Apparently it's a Makefile variable that holds compiler flag options.

EDIT: or perhaps the OP is thinking of something else...?

Last edited by MrCode; 11-14-2010 at 10:43 PM.
 
1 members found this post helpful.
Old 11-14-2010, 10:49 PM   #5
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Bookworm (Fluxbox WM)
Posts: 1,391
Blog Entries: 54

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
It is just 'control', as in terminal control flags.
 
1 members found this post helpful.
Old 11-16-2010, 07:22 PM   #6
lesca
Member
 
Registered: Sep 2010
Posts: 58

Original Poster
Rep: Reputation: 0
Ah~
It's not homework. I am learning linux programming by myself!

And thanks for all your answers!

EDIT: and unfortunately there is no teacher can answer my questions, they all use windows...

Last edited by lesca; 11-16-2010 at 07:27 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how can I "cat" or "grep" a file to ignore lines starting with "#" ??? callagga Linux - Newbie 7 08-16-2013 06:58 AM
net working eth0 eth1 wlan0 "no connection" "no LAN" "no wi-fi" Cayitano Linux - Newbie 5 12-09-2007 07:11 PM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM
"Xlib: extension "XFree86-DRI" missing on display ":0.0"." zaps Linux - Games 9 05-14-2007 03:07 PM
LXer: Displaying "MyComputer", "Trash", "Network Servers" Icons On A GNOME Desktop LXer Syndicated Linux News 0 04-02-2007 08:31 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration