[Moscow.pm] Доки

Ivan B. Serezhkin ivan на serezhkin.com
Пт Ноя 28 07:02:51 PST 2008


Andrew Shitov wrote:
>> А так в доку заглянул, или коменты в коде почитал, - и сразу основные вещи
>>     
>
> А что лучше - комментарии или вики? (У меня есть ответ, хочется мнений :-)
>   
Комменты вестимо, ибо по ним можно доксигеном пройтись, вот интеловцы 
молодцы, что б я без комментов делал ?

При этом в микросовтовском стиле пишут, видимо чтоб кодна фоне комментов 
не казался куцым =)

/*******************************************************************************
 *
 * FUNCTION:    AcpiUtCopyIdString
 *
 * PARAMETERS:  Destination         - Where to copy the string
 *              Source              - Source string
 *              MaxLength           - Length of the destination buffer
 *
 * RETURN:      None
 *     
 * DESCRIPTION: Copies an ID string for the _HID, _CID, and _UID methods.
 *              Performs removal of a leading asterisk if present -- 
workaround
 *              for a known issue on a bunch of machines.
 *
 ******************************************************************************/

static void
AcpiUtCopyIdString (
    char                    *Destination,
    char                    *Source,
    ACPI_SIZE               MaxLength)
{
   
    /*
     * Workaround for ID strings that have a leading asterisk. This 
construct
     * is not allowed by the ACPI specification  (ID strings must be
     * alphanumeric), but enough existing machines have this embedded in 
their
     * ID strings that the following code is useful.
     */
    if (*Source == '*')
    {
        Source++;
    }
   
    /* Do the actual copy */
   
    ACPI_STRNCPY (Destination, Source, MaxLength);
}

-- 
Ivan B. Serezhkin
Spamooborona, Yandex. http://so.yandex.ru/



Подробная информация о списке рассылки Moscow-pm