Clean up and review of header files for conformance to standards

This commit is contained in:
Gregory Nutt
2015-06-12 18:07:47 -06:00
parent bbe54afd14
commit bf9e1943a4
33 changed files with 624 additions and 537 deletions
+3 -2
View File
@@ -51,8 +51,9 @@
* Function: asctime
*
* Description:
* asctime and asctime_r converts the time provided in a struct tm to a
* string representation. asctime is not re-entrant.
* asctime and asctime_r convert the time provided in a struct tm to a
* string representation. asctime is not re-entrant; asctime_r is re-
* entrant
*
* Parameters:
* tp - Pointer to the time to be converted.
+6 -5
View File
@@ -51,12 +51,12 @@
* definitions could be combined to save a little FLASH space.
*/
static const char g_wday_name[7][3] =
static const char * const g_wday_name[7] =
{
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
};
static const char g_mon_name[12][3] =
static const char * const g_mon_name[12] =
{
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
@@ -70,11 +70,12 @@ static const char g_mon_name[12][3] =
* Function: asctime_r
*
* Description:
* asctime and asctime_r converts the time provided in a struct tm to a
* string representation. asctime_r is re-entrant.
* asctime and asctime_r convert the time provided in a struct tm to a
* string representation. asctime is not re-entrant; asctime_r is re-
* entrant.
*
* Parameters:
* tp - Pointer to the time to be converted.
* tp - Pointer to the time to be converted.
* buf - A user provided buffer to receive the 26 character time string.
*
* Return Value:
+4 -4
View File
@@ -1,5 +1,5 @@
/****************************************************************************
* libc/time/lib_asctime.c
* libc/time/lib_ctime.c
*
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -51,9 +51,9 @@
* Function: ctime
*
* Description:
* ctime and ctime_r converts the time provided in seconds since the
* epoch to a string representation. asctime is not re-entrant. ctime is
* not re-entrant.
* ctime and ctime_r convert the time provided in seconds since the
* epoch to a string representation. ctime is not re-entrant; ctime_r is
* re-entrant.
*
* Parameters:
* timep - The current time represented as seconds since the epoch.
+3 -3
View File
@@ -55,13 +55,13 @@
* Function: ctime_r
*
* Description:
* ctime and ctime_r converts the time provided in seconds since the
* epoch to a string representation. asctime is not re-entrant. ctimer is
* ctime and ctime_r convert the time provided in seconds since the
* epoch to a string representation. ctime is not re-entrant; ctime_r is
* re-entrant.
*
* Parameters:
* timep - The current time represented as seconds since the epoch.
* buf - A user provided buffer to receive the 26 character time string.
* buf - A user provided buffer to receive the 26 character time string.
*
* Return Value:
* One success, the pointer to the 'buf' is returned; on failure, NULL is