mirror of
git://git.sv.gnu.org/nano.git
synced 2025-01-02 23:54:26 +03:00
tweaks: rename two elements of history struct, away from abbreviations
This commit is contained in:
parent
6dd5a75d13
commit
9709dfd563
@ -341,11 +341,11 @@ typedef struct undostruct {
|
|||||||
#ifdef ENABLE_HISTORIES
|
#ifdef ENABLE_HISTORIES
|
||||||
typedef struct poshiststruct {
|
typedef struct poshiststruct {
|
||||||
char *filename;
|
char *filename;
|
||||||
/* The file. */
|
/* The full path plus name of the file. */
|
||||||
ssize_t lineno;
|
ssize_t linenumber;
|
||||||
/* Line number we left off on. */
|
/* The line where the cursor was when we closed the file. */
|
||||||
ssize_t xno;
|
ssize_t columnnumber;
|
||||||
/* The x position in the file we left off on. */
|
/* The column where the cursor was. */
|
||||||
struct poshiststruct *next;
|
struct poshiststruct *next;
|
||||||
/* The next item of position history. */
|
/* The next item of position history. */
|
||||||
} poshiststruct;
|
} poshiststruct;
|
||||||
|
@ -419,8 +419,8 @@ void load_poshistory(void)
|
|||||||
/* Create a new position record. */
|
/* Create a new position record. */
|
||||||
newrecord = nmalloc(sizeof(poshiststruct));
|
newrecord = nmalloc(sizeof(poshiststruct));
|
||||||
newrecord->filename = copy_of(line);
|
newrecord->filename = copy_of(line);
|
||||||
newrecord->lineno = atoi(lineptr);
|
newrecord->linenumber = atoi(lineptr);
|
||||||
newrecord->xno = atoi(xptr);
|
newrecord->columnnumber = atoi(xptr);
|
||||||
newrecord->next = NULL;
|
newrecord->next = NULL;
|
||||||
|
|
||||||
/* Add the record to the list. */
|
/* Add the record to the list. */
|
||||||
@ -474,7 +474,7 @@ void save_poshistory(void)
|
|||||||
* plus two spaces, plus the line feed, plus the null byte. */
|
* plus two spaces, plus the line feed, plus the null byte. */
|
||||||
path_and_place = nmalloc(strlen(posptr->filename) + 44);
|
path_and_place = nmalloc(strlen(posptr->filename) + 44);
|
||||||
sprintf(path_and_place, "%s %zd %zd\n",
|
sprintf(path_and_place, "%s %zd %zd\n",
|
||||||
posptr->filename, posptr->lineno, posptr->xno);
|
posptr->filename, posptr->linenumber, posptr->columnnumber);
|
||||||
length = strlen(path_and_place);
|
length = strlen(path_and_place);
|
||||||
|
|
||||||
/* Encode newlines in filenames as NULs. */
|
/* Encode newlines in filenames as NULs. */
|
||||||
@ -573,8 +573,8 @@ void update_poshistory(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Store the last cursor position. */
|
/* Store the last cursor position. */
|
||||||
theone->lineno = openfile->current->lineno;
|
theone->linenumber = openfile->current->lineno;
|
||||||
theone->xno = xplustabs() + 1;
|
theone->columnnumber = xplustabs() + 1;
|
||||||
theone->next = NULL;
|
theone->next = NULL;
|
||||||
|
|
||||||
free(fullpath);
|
free(fullpath);
|
||||||
@ -604,8 +604,8 @@ bool has_old_position(const char *file, ssize_t *line, ssize_t *column)
|
|||||||
if (posptr == NULL)
|
if (posptr == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
*line = posptr->lineno;
|
*line = posptr->linenumber;
|
||||||
*column = posptr->xno;
|
*column = posptr->columnnumber;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
#endif /* ENABLE_HISTORIES */
|
#endif /* ENABLE_HISTORIES */
|
||||||
|
Loading…
Reference in New Issue
Block a user