Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
1daac8e1
Commit
1daac8e1
authored
Dec 05, 2005
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document return-value conventions used by this implementation, per
suggestion from Bruce.
parent
e8c81e17
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
4 deletions
+24
-4
src/port/snprintf.c
src/port/snprintf.c
+24
-4
No files found.
src/port/snprintf.c
View file @
1daac8e1
...
...
@@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $PostgreSQL: pgsql/src/port/snprintf.c,v 1.3
0 2005/12/05 02:39:38
tgl Exp $
* $PostgreSQL: pgsql/src/port/snprintf.c,v 1.3
1 2005/12/05 21:57:00
tgl Exp $
*/
#include "c.h"
...
...
@@ -51,9 +51,8 @@
* SNPRINTF, VSNPRINTF and friends
*
* These versions have been grabbed off the net. They have been
* cleaned up to compile properly and support for most of the Single
* Unix Specification has been added. Remaining unimplemented features
* are:
* cleaned up to compile properly and support for most of the Single Unix
* Specification has been added. Remaining unimplemented features are:
*
* 1. No locale support: the radix character is always '.' and the '
* (single quote) format flag is ignored.
...
...
@@ -65,6 +64,27 @@
* 4. No support for "long double" ("Lf" and related formats).
*
* 5. Space and '#' flags are not implemented.
*
*
* The result values of these functions are not the same across different
* platforms. This implementation is compatible with the Single Unix Spec:
*
* 1. -1 is returned only if processing is abandoned due to an invalid
* parameter, such as incorrect format string. (Although not required by
* the spec, this happens only when no characters have yet been transmitted
* to the destination.)
*
* 2. For snprintf and sprintf, 0 is returned if str == NULL or count == 0;
* no data has been stored.
*
* 3. Otherwise, the number of bytes actually transmitted to the destination
* is returned (excluding the trailing '\0' for snprintf and sprintf).
*
* For snprintf with nonzero count, the result cannot be more than count-1
* (a trailing '\0' is always stored); it is not possible to distinguish
* buffer overrun from exact fit. This is unlike some implementations that
* return the number of bytes that would have been needed for the complete
* result string.
*/
/**************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment