SYSERRLST(5) File Formats Manual SYSERRLST(5)NAME
syserrlst - error message file format
DESCRIPTION mkerrlst(1), creates error message files in the format described below.
An ``error message file'' consists of a header, an array of structures specifying the offset and length of each message, and the array of
message strings separated by newlines.
The message strings are separated by newlines but the newline characters are not included in the size of the message. These newline char-
acters serve only to make the file editable or printable (after stripping off the header).
The file format is:
/*
* Definitions used by the 'mkerrlst' program which creates error message
* files.
*
* The format of the file created is:
*
* struct ERRLSTHDR ehdr;
* struct ERRLST emsg[num_of_messages];
* struct {
* char msg[] = "error message string";
* char lf = '0;
* } [num_of_messages];
*
* Note: the newlines are NOT included in the message lengths, the newlines
* are present to make it easy to 'cat' or 'vi' the file.
*/
struct ERRLSTHDR
{
short magic;
short maxmsgnum;
short maxmsglen;
short pad[5]; /* Reserved */
};
struct ERRLST
{
off_t offmsg;
short lenmsg;
};
#define ERRMAGIC 012345
SEE ALSO mkerrlst(1), syserrlst(3)BUGS
Format of the file isn't necessarily portable between machines.
HISTORY
This file format is new with 2.11BSD.
3rd Berkeley Distribution March 7, 1996 SYSERRLST(5)
Check Out this Related Man Page
SYSERRLST(3) Library Functions Manual SYSERRLST(3)NAME
syserrlst, __errlst - read system error messages from file
SYNOPSIS
char *
syserrlst(err)
int err;
char *
__errlst(err, path);
int err;
char *path;
DESCRIPTION Syserrlst(3) reads the error message string corresponding to err from the file /etc/syserrlst.
__errlst(3) reads the error message string corresponding to err from the file path. The file path must be in the format described in
syserrlst(5).
NULL is returned if err is out of bounds (negative or greater than the highest message number in /etc/syserrlst or path) or if the error
message file can not be opened. It is the responsibility of the caller (strerror(3)) to check for and properly handle the NULL return.
RETURN VALUE
NULL if an error was encountered in opening the error message file, if the error was out of bounds, or if the file did not start with the
correct magic number. Otherwise a char * is returned pointing to a static buffer containing the text of the error message.
ERRORS syserrlst(3) and __errlst(3) can return any of the errors for the open(2), lseek(2), or read(2) system calls.
SEE ALSO perror(3), strerror(3), syserrlst(5)HISTORY syserrlst(3), and __errlst(3) were created for 2.11BSD with the aim of saving 2kb of Data space in programs which called perror(3), or str-
error(3).
BUGS
The information is stored in a static buffer.
3rd Berkeley Distribution March 26, 1996 SYSERRLST(3)
Hey there - a bit of background on what I'm trying to accomplish, first off. I am trying to load the data from a pipe delimited file into a database. The loading tool that I use cannot handle embedded newline characters within a field, so I need to scrub them out.
Solutions that I have tried... (7 Replies)
Context:
I need to remove unwanted newlines from a data file listing books and associated data. Here is a sample listing ( line numbers included ):
1 360762| Skip-beat! 14 /| 9781421517544| nb | 2008.| Nakamura, Yoshiki.| NAKAMUR | Kyoko Mogami followed
2 her true love Sho to Tokyo to... (6 Replies)
What's the best way to find a string in a very long file without newlines in Unix? The standard utility I'm aware of for finding a string in a single file is grep, but for a long file without newlines, I think the output is just going to be the input. I suppose I could use sed to replace the... (5 Replies)
Hi all,
I'm working in a specific directory and I have file names which I'd like to rename but in a way in which I can specify the new filenames as @ARGV or user input at prompt.
Can someone shed some light on this?
Cheers :) (7 Replies)
Good morning,
I need some help with getting rid of newlines with the output from a MYSQL query and putting the information into the right format that I need.
Here is the script as it is today:
#!/usr/bin/perl
my $uda = system("/opt/incontrol/mysql/bin/mysql -u root -ppassword... (2 Replies)
I have this peice of code I was hoping someone could look at. I use valgrind ./a.out to test it and it comes up with errors but none that I can understand.
Maybe someone here could help me.
The code is here:
Neo - Pastbin Link Removed - Do Not Use Pastebin in these Forums (12 Replies)
I found a very short but very efficient program to handle big sequence file (>30GB), but could not understand it.
https://github.com/lh3/seqtk
Wrote to the author but no reply, probably because the program needs comprehensive knowledge of C.
Can any C expert "walk me thru" the two header files... (13 Replies)
Hi All -
I am in need of some help in formating the below file
Requirement -
1) replace newlines with space
2) replace '#~# ' with newline
-----------------------
sample inputfile a
I|abc|abc|aaa#~#
I|sddddd|tya|dfg
sfd
ssss#~#
I|tya1|tya2|dfg|sfd|aaa#~#... (5 Replies)
I have a file that look like this:
>Muestra-1
agctgcgagctgcgaccc
gggttatata
ggaagagacacacacaccccc
>Muestra-2
agctgcg
agctgcgacccgggttatataggaagagac
acacacaccccc
>Muestra-3
agctgcgagctgcgaccc
gggttatata
ggaagagacacacacaccccc
I use the following sed script to remove newlines from... (2 Replies)