亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? journal.c

?? aee是一種易使用的文本編輯器。你可以不用說明書來使用它。它提供終端接口和本地的X-windows接口。它的特性包括即彈的菜單
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/* |	journal.c | |		This file contains the routines for handling the journal file |		for ae. | |	$Header: /home/hugh/sources/aee/RCS/journal.c,v 1.34 1998/11/08 23:30:37 hugh Exp $ *//* |	This file contains routines for performing journalling for aee and  |	xae.  Journalling is writing lines and information about them to a  |	file when the cursor moves away from them (if they have been changed  |	during the time the cursor was on the line). | |	The data structure ae_file_info contains the information about  |	locations in the file for where to find the information about the  |	current line, the information about the previous line, the info  |	about the next line, and the location of the actual text.  The  |	length of the line (which is important!) is contained in the 'text'  |	structure for the line.   | |	The format that the information is written into the file is as  |	follows: | |	+--+--+--+--+ |	|  |  |  |  |	previous line info location |	+--+--+--+--+ | |	+--+--+--+--+ |	|  |  |  |  |   next line info location |	+--+--+--+--+ | |	+--+--+--+--+ |	|  |  |  |  |	text location |	+--+--+--+--+ | |	+--+--+--+--+ |	|  |  |  |  |	text length (in bytes, including terminating NULL) |	+--+--+--+--+ | *//* |	Also in this file are routines for managing information about what  |	journal files have been written, and the relationship between the  |	journal file and the file being journalled.  This helps when  |	recovering from a disaster, and could be used to determine duplicate  |	edit sessions, or a failed previous session. | |	The name of the file is ~/.aeeinfo, and there is a lock file named  |	~/.aeeinfo.L.  The format of ~/.aeeinfo is as follows: | |	32 30 /home/hugh/sources/aee/journal.c /tmp/hugh/journal/journal.c.rv | |	where the first number is the length (decimal) if the full file name,  |	the second number is the length of the journal file name, followed by  |	the file name, and the name of the journal file.  The fields are  |	separated by a single space (ASCII 32). | | *//* | |	Copyright (c) 1994, 1995, 1996, 1998 Hugh Mahon. | */char *jrn_vers_str = "@(#)                           journal.c $Revision: 1.34 $";#include "aee.h"#include <time.h>/* |	writes the contents of the line, updates the value stored in  |	memory of where the start of the line is stored in the file */void write_journal(buffer, line)struct bufr *buffer;struct text *line;{	int counter;	int ret_val = 0;	ret_val = line->file_info.line_location = 				lseek(buffer->journ_fd, 0, SEEK_END);	for (counter = 0; (counter < line->line_length) && (ret_val != -1); 			counter += min(1024, (line->line_length - counter)))	{		ret_val = write(buffer->journ_fd, &(line->line[counter]), 			min(1024, (line->line_length - counter)));	}	update_journal_entry(buffer, line);	line->changed = FALSE;}/* |	update the information for a line that has already been written, or |	write a line for the first after its values have been initialised |	by journ_info_init */void update_journal_entry(buffer, line)struct bufr *buffer;struct text *line;{	int ret_val;	if (line->file_info.info_location == NO_FURTHER_LINES)	{		journ_info_init(buffer, line);		return ;	}	ret_val = lseek(buffer->journ_fd, line->file_info.info_location, 								SEEK_SET);	ret_val |= write(buffer->journ_fd, 		  (char *)&(line->file_info.prev_info), sizeof(unsigned long));	ret_val |= write(buffer->journ_fd, 		  (char *)&(line->file_info.next_info), sizeof(unsigned long));	ret_val |= write(buffer->journ_fd, 		  (char *)&(line->file_info.line_location), 		  	sizeof(unsigned long));	ret_val |= write(buffer->journ_fd, (char *)&(line->line_length), 						sizeof(int));}/* |	change journal info at first line if the first line is deleted  |	while editing */void remove_journ_line(buffer, line)struct bufr *buffer;struct text *line;{	if (line->prev_line == NULL)	{		/*		 |	This was the first line, now the next line is.		 */		line->next_line->file_info.info_location = 					line->file_info.info_location;		update_journal_entry(buffer, line->next_line);		if (line->next_line->next_line != NULL)		{			line->next_line->next_line->file_info.prev_info = 						line->file_info.info_location;			update_journal_entry(buffer, line->next_line->next_line);		}	}	else if (line->next_line == NULL)	{		/*		 |	This was the last line, now the prev line is.		 */		line->prev_line->file_info.next_info = NO_FURTHER_LINES;		update_journal_entry(buffer, line->prev_line);		/*		 |	no point in writing to file since no way to 		 |	access current line now		 */	}	else	{		/*		 |	Need to allow previous line to see next line, 		 |	vice-versa.		 */				line->prev_line->file_info.next_info = 				line->next_line->file_info.info_location;		line->next_line->file_info.prev_info = 				line->prev_line->file_info.info_location;		update_journal_entry(buffer, line->next_line);		update_journal_entry(buffer, line->prev_line);	}}/* |	initialize the location of where the information is to reside  |	(using lseek), initialize information for this line of where the  |	previous line is, set the information where to find this line for  |	the previous line, next line then | |	update current line (write for the first time) |	update the previous line (if prev_line != NULL) |	update the next line (if next_line != NULL) | */void journ_info_init(buffer, line)struct bufr *buffer;struct text *line;{	int ret_val;	ret_val = line->file_info.info_location = 					lseek(buffer->journ_fd, 0, SEEK_END);	if (line->prev_line != NULL)	{		line->file_info.prev_info = 				line->prev_line->file_info.info_location;		line->prev_line->file_info.next_info = 				line->file_info.info_location;	}	if (line->next_line != NULL)	{		line->file_info.next_info = 				line->next_line->file_info.info_location;		line->next_line->file_info.prev_info = 				line->file_info.info_location;	}	else		line->file_info.next_info = NO_FURTHER_LINES;	update_journal_entry(buffer, line);	if (line->prev_line != NULL)		update_journal_entry(buffer, line->prev_line);	if ((line->next_line != NULL) && 	    (line->file_info.next_info != NO_FURTHER_LINES))		update_journal_entry(buffer, line->next_line);}/* |	read the journal entry from the file */void read_journal_entry(buffer, line)struct bufr *buffer;struct text *line;{	int counter;	lseek(buffer->journ_fd, line->file_info.info_location, SEEK_SET);	read(buffer->journ_fd, (char *)&(line->file_info.prev_info), 						sizeof(unsigned long));	read(buffer->journ_fd, (char *)&(line->file_info.next_info), 						sizeof(unsigned long));	read(buffer->journ_fd, (char *)&(line->file_info.line_location), 						sizeof(unsigned long));	read(buffer->journ_fd, (char *)&(line->line_length), 						sizeof(unsigned int));	lseek(buffer->journ_fd, line->file_info.line_location, SEEK_SET);	line->line = malloc(line->line_length);	for (counter = 0; counter < line->line_length; 			counter += min(1024, (line->line_length - counter)))	{		read(buffer->journ_fd, &(line->line[counter]), 			min(1024, (line->line_length - counter)));	}}/* |	read the contents of the edited file from the journal file |	read the file up to the first '\n' (line feed), which is where  |	the journal information begins |	 |	This reads the contents of the edited file, plus sets the values  |	in the data structures to allow continued editing (it is recreated  |	within the editor, so why not?). */int recover_from_journal(buffer, file_name)struct bufr *buffer;char *file_name;{	int counter = 0;	struct text *line;	char temp;	char done = FALSE;	char name[1024];	if ((buffer->journ_fd = open(file_name, O_RDONLY)) == -1)	{		/*		 |	Unable to open journal file.		 */		return(1);	}	memset(name, 0, 1024);	/*	 |	get to first record in file (skip the file name)	 */	do	{		read(buffer->journ_fd, &temp, 1);		if ((counter < 1024) && (temp != '\n'))			name[counter] = temp;		counter++;	}	while (temp != '\n');	line = buffer->first_line;	/*	 |	set up first entry	 */	line->file_info.info_location = counter;	do	{		read_journal_entry(buffer, line);		line->vert_len = (scanline(line, line->line_length) / COLS) + 1;		line->max_length = line->line_length;		if (line->file_info.next_info != NO_FURTHER_LINES)		{			line->next_line = txtalloc();			buffer->num_of_lines++;			line->next_line->prev_line = line;			line->next_line->next_line = NULL;			line->next_line->line_number = line->line_number + 1;			line = line->next_line;			line->file_info.next_info = 0;			line->file_info.info_location = 				line->prev_line->file_info.next_info;		}		else			done = TRUE;	} 	while (!done);	curr_buff->pointer = buffer->first_line->line;	close(buffer->journ_fd);	change = TRUE;	buffer->changed = TRUE;	/*	 |	open journal for further changes	 */	if (buffer->journalling)	{		if ((buffer->journ_fd = 			open(buffer->journal_file, O_WRONLY)) == -1)		{			wprintw(com_win, cant_opn_rcvr_fil_msg);			buffer->journalling = FALSE;		}	}	/*	 |	Since the user can specify a journal name without specifying 	 |	the name of the file it journalled, use the name stored in 	 |	the journal file.	 */	if ((buffer->full_name == NULL) || (*buffer->full_name == (char) NULL))	{		buffer->full_name = (name[0] == (char) NULL) ? NULL : strdup(name);		if (buffer->full_name != NULL)		{			buffer->file_name = ae_basename(buffer->full_name);			if (strcmp(main_buffer_name, buffer->name))				buffer->name = strdup(buffer->file_name);		}		else			buffer->file_name = NULL;	}	/*	 |	Success!	 */	return(0);}/* |	journal database file routines */static char *lock_file_name = NULL;static char *db_file_name = NULL;/* |	write a lock file so that another process doesn't try to open  |	the file | |	This is an atomic action since the open should fail if the file  |	already exists, thus it can't be opened if someone else has a  |	lock in place. */int lock_journal_fd(){	int counter = 0;	int ret_val;	if (lock_file_name == NULL)		lock_file_name = resolve_name("~/.aeeinfo.L");	/*	 |	At some point may want to put in a check for an old lock file.	 */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人免费小视频| 一区二区三区在线视频免费观看 | 亚洲韩国精品一区| 国产婷婷色一区二区三区在线| 91国产精品成人| 精品一区二区三区免费毛片爱| 亚洲人吸女人奶水| 欧美精品一区二区三区四区| 欧美怡红院视频| 国产a视频精品免费观看| 日本午夜一区二区| 一区二区三区精品| 国产精品日产欧美久久久久| 精品国产免费一区二区三区四区 | 欧洲生活片亚洲生活在线观看| 精品夜夜嗨av一区二区三区| 亚洲国产成人av好男人在线观看| 国产精品久久777777| 精品国产一区二区国模嫣然| 91精品国产综合久久久久久| 99精品热视频| 成人一区在线观看| 国产一区免费电影| 久久99精品国产麻豆婷婷洗澡| 亚洲国产日韩一级| 亚洲男人天堂av网| 欧美国产综合色视频| 久久久91精品国产一区二区精品| 日韩一区二区中文字幕| 欧美日韩国产bt| 在线视频一区二区三| 91视频免费看| 97超碰欧美中文字幕| 成人av电影观看| 成人精品视频一区二区三区| 色综合网站在线| 成人免费视频app| 国产ts人妖一区二区| 国产精品一区二区三区乱码| 国产美女娇喘av呻吟久久| 久久91精品久久久久久秒播| 久久99国产精品免费网站| 狠狠色狠狠色合久久伊人| 国产伦精品一区二区三区免费迷| 韩国女主播一区| 国产黄色成人av| 99精品国产视频| 91成人免费在线| 欧美日韩情趣电影| 欧美一区二区三区公司| 欧美成人r级一区二区三区| 2欧美一区二区三区在线观看视频| 精品国产乱码久久久久久老虎| 日韩欧美国产综合一区 | 久久超碰97人人做人人爱| 久久国产成人午夜av影院| 另类人妖一区二区av| 国产乱子伦一区二区三区国色天香| 风流少妇一区二区| 99r国产精品| 欧美日韩在线播放三区四区| 91精品国产综合久久久久久| 久久无码av三级| 中文乱码免费一区二区| 亚洲精品久久嫩草网站秘色| 日韩成人av影视| 国产自产视频一区二区三区| 99久久精品免费精品国产| 欧美三级乱人伦电影| 日韩免费性生活视频播放| 欧美国产综合一区二区| 亚洲国产综合人成综合网站| 久久精品国产第一区二区三区| 粉嫩av一区二区三区粉嫩| 日本韩国精品在线| 日韩欧美在线综合网| 欧美国产成人在线| 午夜影院久久久| 国产一区二区三区四| 欧洲视频一区二区| 精品国产sm最大网站| 亚洲日穴在线视频| 美女视频黄频大全不卡视频在线播放| 国产精品一区二区无线| 欧美日韩激情一区二区| 久久久99精品久久| 亚洲电影视频在线| 国产成人av资源| 欧美三级乱人伦电影| 中文无字幕一区二区三区| 亚洲成av人片一区二区| 国产精品99久久久久久久女警| 欧美伊人久久久久久久久影院| 26uuu欧美| 亚洲不卡av一区二区三区| 国产成人综合在线| 666欧美在线视频| 国产精品三级视频| 久久黄色级2电影| 欧美亚洲国产怡红院影院| 国产女人aaa级久久久级| 天天综合天天做天天综合| av电影在线观看一区| 精品久久久久久综合日本欧美| 亚洲影院在线观看| 国产91精品精华液一区二区三区| 欧美裸体bbwbbwbbw| 中文字幕亚洲在| 国产一区二区影院| 日韩免费电影一区| 亚洲va国产天堂va久久en| 91免费视频观看| 国产喷白浆一区二区三区| 麻豆精品一区二区av白丝在线| 欧美又粗又大又爽| 亚洲视频一区二区在线| 国产成人av一区二区三区在线观看| 欧美一级电影网站| 五月婷婷另类国产| 在线观看视频欧美| 亚洲视频一二三区| 99精品偷自拍| 欧美激情一区不卡| 成人午夜电影久久影院| www成人在线观看| 美女视频黄频大全不卡视频在线播放| 欧美精品日韩综合在线| 一区二区高清在线| 91国偷自产一区二区三区成为亚洲经典| 中文字幕av一区二区三区免费看| 国产一区视频网站| 久久精品无码一区二区三区| 国产原创一区二区三区| 欧美精品一区二区三区一线天视频| 看电影不卡的网站| 欧美mv和日韩mv国产网站| 麻豆精品精品国产自在97香蕉| 欧美一二三区在线| 久久成人免费电影| 26uuu久久天堂性欧美| 国产制服丝袜一区| 久久久蜜臀国产一区二区| 国产精品自拍毛片| 国产精品美女一区二区在线观看| 成人精品国产一区二区4080| 国产精品久久久久影院老司| 99久久777色| 亚洲高清一区二区三区| 56国语精品自产拍在线观看| 日本不卡123| 精品精品国产高清一毛片一天堂| 国产一区二区三区四区在线观看| 国产午夜精品美女毛片视频| 成人18视频在线播放| 玉足女爽爽91| 欧美精品第一页| 久久se精品一区二区| 国产欧美视频在线观看| 色婷婷一区二区| 午夜精品久久久久久久久久久 | 亚洲成人动漫在线观看| 日韩欧美在线影院| 国产成人av电影在线| 亚洲精品亚洲人成人网 | 欧美日韩国产一二三| 免费精品视频最新在线| 欧美国产精品中文字幕| 日本高清不卡aⅴ免费网站| 日韩高清不卡一区| 久久久久久黄色| 色婷婷综合在线| 乱一区二区av| 亚洲色图第一区| 日韩一区二区三区在线视频| 高清在线成人网| 亚洲国产一区视频| 国产亚洲综合av| 欧美在线制服丝袜| 韩国三级在线一区| 洋洋av久久久久久久一区| 日韩欧美激情四射| 91免费视频网址| 极品尤物av久久免费看| 一区二区三区在线视频播放| 欧美岛国在线观看| 91成人免费网站| 国产麻豆成人精品| 亚洲444eee在线观看| 欧美韩国日本不卡| 欧美一区二区性放荡片| 91最新地址在线播放| 麻豆国产精品视频| 亚洲久草在线视频| 久久久久97国产精华液好用吗| 欧美日韩中文国产| 成人av在线影院| 久久精品久久99精品久久| 亚洲成人自拍偷拍| 中文字幕一区二区三区不卡在线| 日韩欧美国产不卡|