Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Side by Side Diff: nspr/lib/libc/src/plerror.c

Issue 2078763002: Delete bundled copy of NSS and replace with README. (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/nss@master
Patch Set: Delete bundled copy of NSS and replace with README. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « nspr/lib/libc/src/base64.c ('k') | nspr/lib/libc/src/plgetopt.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 /*
7 ** File:plerror.c
8 ** Description: Simple routine to print translate the calling thread's
9 ** error numbers and print them to "syserr".
10 */
11
12 #include "plerror.h"
13
14 #include "prprf.h"
15 #include "prerror.h"
16
17 PR_IMPLEMENT(void) PL_FPrintError(PRFileDesc *fd, const char *msg)
18 {
19 PRErrorCode error = PR_GetError();
20 PRInt32 oserror = PR_GetOSError();
21 const char *name = PR_ErrorToName(error);
22
23 if (NULL != msg) PR_fprintf(fd, "%s: ", msg);
24 if (NULL == name)
25 PR_fprintf(
26 fd, " (%d)OUT OF RANGE, oserror = %d\n", error, oserror) ;
27 else
28 PR_fprintf(
29 fd, "%s(%d), oserror = %d\n",
30 name, error, oserror);
31 } /* PL_FPrintError */
32
33 PR_IMPLEMENT(void) PL_PrintError(const char *msg)
34 {
35 static PRFileDesc *fd = NULL;
36 if (NULL == fd) fd = PR_GetSpecialFD(PR_StandardError);
37 PL_FPrintError(fd, msg);
38 } /* PL_PrintError */
39
40 /* plerror.c */
OLDNEW
« no previous file with comments | « nspr/lib/libc/src/base64.c ('k') | nspr/lib/libc/src/plgetopt.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698