~ubuntu-branches/ubuntu/lucid/graphviz/lucid-security

« back to all changes in this revision

Viewing changes to tools/ast/strerror.c

  • Committer: Bazaar Package Importer
  • Author(s): Stephen M Moraco
  • Date: 2002-02-05 18:52:12 UTC
  • Revision ID: james.westby@ubuntu.com-20020205185212-8i04c70te00rc40y
Tags: upstream-1.7.16
ImportĀ upstreamĀ versionĀ 1.7.16

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "gvconfig.h"
 
2
#ifndef HAVE_STRERROR
 
3
#include <errno.h>
 
4
 
 
5
extern int sys_nerr;
 
6
extern char *sys_errlist[];
 
7
 
 
8
char *
 
9
strerror(int errorNumber)
 
10
{
 
11
        if ( errorNumber > 0 &&  errorNumber < sys_nerr )
 
12
        {
 
13
                return sys_errlist[errorNumber];
 
14
        }
 
15
        else
 
16
        {
 
17
                return "";
 
18
        }
 
19
}
 
20
#endif