⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tbuffer.h

📁 Software Development in C: A Practical Approach to Programming and Design 软件开发:编程与设计(C))——国外经典教材·计
💻 H
字号:
//---------------------------------------------------------
/*
File name:	Tbuffer.h
Comments:	This file contains the definitions needed to 
			use the text_buffer type.
*/


#ifndef TBUFFER_H
#define TBUFFER_H

//---------------------------------------------------------
// Include files

#include "Tstring.h"

// End include files
//---------------------------------------------------------



//---------------------------------------------------------
// Constants

#define TEXT_BUFFER_LENGTH 50

// End constants
//---------------------------------------------------------



//---------------------------------------------------------
// Enumerated types

typedef enum
{
	TBE_NO_ERROR = 0,

	TBE_FIRST_ERROR = 1000,
	TBE_BUFFER_FULL,
	TBE_INDEX_OUT_OF_RANGE,
	TBE_INVALID_CHARACTER
} text_buffer_error;

// End enumerated types
//---------------------------------------------------------



//---------------------------------------------------------
// Type definitions

/* This defines the text_buffer type as an array of 
TEXT_BUFFER_LENGTH strings. */
typedef text_string text_buffer[TEXT_BUFFER_LENGTH];

// End type definitions
//---------------------------------------------------------



//---------------------------------------------------------
// Prototypes

text_buffer_error TextBufferSetRow(text_buffer buffer,
								   int row,
								   text_string theString);
void TextBufferGetRow(text_buffer buffer,int row,text_string theString);

text_buffer_error TextBufferSetCharacter(text_buffer buffer,
										 int row,int column,
										 char theCharacter);
int TextBufferGetCharacter(text_buffer buffer,
						   int row,int column);

// End prototypes
//---------------------------------------------------------



#endif

// End Tbuffer.h
//---------------------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -