rh

Check-in [9802a7a9b5]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Get rid of deprecated sys_nerr/sys_errlist
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:9802a7a9b5dcc1ae86996d250baab13c2c0cbcc0b953d53d4a27f07a7bbc288c
User & Date: ajv-899-334-8894@vsta.org 2010-04-22 03:02:46
Context
2010-04-22
03:03
Add access to allocated blocks, so I can find files with allocation holes check-in: 6827c7f100 user: ajv-899-334-8894@vsta.org tags: master, trunk
03:02
Get rid of deprecated sys_nerr/sys_errlist check-in: 9802a7a9b5 user: ajv-899-334-8894@vsta.org tags: master, trunk
2009-11-23
04:04
Tighten up code. Treat embedded spaces in filenames as a graphic char; don't map it into '?'. check-in: 8e4aa40c5f user: ajv-899-334-8894@vsta.org tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to errmsg.c.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
..
67
68
69
70
71
72
73
74
75
76

77
78
79
80
81
82
83
84
85
86
 *
 * Global Functions: error, warning
 *
 * Static Functions: percent_m, errmsg
 */

#if !defined(lint)
static char rcsid[] = "$Id: errmsg.c,v 1.2 1994/01/26 16:18:48 rick Exp $";
#endif

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>

................................................................................


    (void) fprintf(stderr, "%s: ", Program_name);
    
    if ((m_ptr = percent_m(format)) != NULL) {
	(void) strncpy(new_format, format, m_ptr - format);
	nfp = new_format + (m_ptr - format);
	if (save_errno < sys_nerr) {
	    for (p = sys_errlist[save_errno]; *p != '\0'; *nfp++ = *p++) {
		;	/* empty loop */

	    }
	}
	else {
	    (void) sprintf(nfp, "Unknown error : %d", save_errno);
	    nfp += strlen(nfp);
	}
	(void) strcpy(nfp, m_ptr + 2);
	format = new_format;
    }
    







|







 







|
|
|
>

<
|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
..
67
68
69
70
71
72
73
74
75
76
77
78

79
80
81
82
83
84
85
86
 *
 * Global Functions: error, warning
 *
 * Static Functions: percent_m, errmsg
 */

#if !defined(lint)
static char rcsid[] = "$Id: errmsg.c,v 1.1 2008/12/27 00:56:03 vandys Exp vandys $";
#endif

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>

................................................................................


    (void) fprintf(stderr, "%s: ", Program_name);
    
    if ((m_ptr = percent_m(format)) != NULL) {
	(void) strncpy(new_format, format, m_ptr - format);
	nfp = new_format + (m_ptr - format);
	p = strerror(save_errno);
	if (p) {
	    while (*p) {
		*nfp++ = *p++;
	    }

	} else {
	    (void) sprintf(nfp, "Unknown error : %d", save_errno);
	    nfp += strlen(nfp);
	}
	(void) strcpy(nfp, m_ptr + 2);
	format = new_format;
    }