buffer.cc
来自「initial working phase of the design of s」· CC 代码 · 共 39 行
CC
39 行
#include "buffer.h"#include <stdlib.h>#include <unistd.h>buffer::~buffer(){// delete text; // moved to term.cc due to line type replacement strategy// free( text );}buffer::buffer(){// text = ( char* )NULL; -- do nothing -- this could be called twice!// this is called once now, but would be twice upon line::line( int );// more recently, it isn't called at all.}buffer::buffer( int s ){ text = new char[ s ]; /* if( (// text = ( char* )malloc( s ) ) == NULL );// {} */}buffer::buffer( buffer* here ): text( here -> text ){}/*void buffer::resize( int size ){// text = ( char* )realloc( text, size );}*/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?