LinuxQuestions.org
Help answer threads with 0 replies.
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 09-10-2005, 10:34 PM   #1
lowpro2k3
Member
 
Registered: Oct 2003
Location: Canada
Distribution: Slackware
Posts: 340

Rep: Reputation: 30
Question about C - 'restrict' in function declarations?


What is this 'restrict' thing I keep seeing in function declarations?

Examples:
Code:
FILE *fopen(const char *restrict pathname, const char *restrict type);
void setbuf(FILE *restrict fp, char *restrict buf);
I'm not sure if these are directly from the ISO C standard, I'm getting these from Advanced Programming in the UNIX Environment 2nd edition [ Stevens, Rago ]. I don't think I've ever seen these in C++, can someone explain this to me? Some man pages seem to describe functions like this, and others do not. Whats the story?
 
Old 09-11-2005, 12:50 AM   #2
addy86
Member
 
Registered: Nov 2004
Location: Germany
Distribution: Debian Testing
Posts: 332

Rep: Reputation: 31
I think the following site explains it: Restricted pointers in C
 
  


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
C++ function declarations and definitions... AM1SHFURN1TURE Programming 2 08-29-2005 06:57 PM
FIO declarations missing from bits/ioctls.h srdennis Programming 0 04-22-2004 05:07 AM
dhcpd.conf shared network declarations adamantium Linux - Networking 0 02-24-2004 02:24 PM
Forward declarations somnium Programming 3 09-16-2003 05:00 AM
global declarations Randall Programming 50 03-15-2003 01:24 PM

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

All times are GMT -5. The time now is 06:09 PM.

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