nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nano-devel] nano and binary files


From: David Lawrence Ramsey
Subject: [Nano-devel] nano and binary files
Date: Mon, 18 Feb 2002 07:01:01 -0800 (PST)

There's one last hurdle keeping nano from being able to
fully edit binary files: it can't properly handle null
characters in files.  I've figured out a way around this:
treat fileptr->data as a character array (not a string) that
can have nulls anywhere, store the true length of
fileptr->data in an int fileptr->data_len, change
update_line() to display nulls as ^@, add functions to
utils.c that handle the data properly (strcpy ->
raw_strncpy(), etc., with dest or src == fileptr->data, and
n == fileptr->data_len), modify read_file() and read_line()
to calculate a line's true length and save it in
fileptr->data_len, etc.

This will of course require another major overhaul; I've
already done some preliminary work on it (which was before
the recent major overhaul; since there are too many code
changes now for me to deal with realistically, I'll have to
start on it again), but it'll be a while before it's
finished and working properly.  Any comments or ideas on
how it could be done better?  Is there any interest in
something like this?


_____________________________________________________________
Sluggy.Net: The Sluggy Freelance Community!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]