(通信企业管理)数据通信源代码(牧云水务信息大数据存储与分析系统)

上传人:管****问 文档编号:128095535 上传时间:2020-04-08 格式:DOC 页数:60 大小:47.66KB
返回 下载 相关 举报
(通信企业管理)数据通信源代码(牧云水务信息大数据存储与分析系统)_第1页
第1页 / 共60页
(通信企业管理)数据通信源代码(牧云水务信息大数据存储与分析系统)_第2页
第2页 / 共60页
(通信企业管理)数据通信源代码(牧云水务信息大数据存储与分析系统)_第3页
第3页 / 共60页
(通信企业管理)数据通信源代码(牧云水务信息大数据存储与分析系统)_第4页
第4页 / 共60页
(通信企业管理)数据通信源代码(牧云水务信息大数据存储与分析系统)_第5页
第5页 / 共60页
点击查看更多>>
资源描述

《(通信企业管理)数据通信源代码(牧云水务信息大数据存储与分析系统)》由会员分享,可在线阅读,更多相关《(通信企业管理)数据通信源代码(牧云水务信息大数据存储与分析系统)(60页珍藏版)》请在金锄头文库上搜索。

1、牧云水务信息大数据存储与分析系统 V1.0 60/* linenoise.c - guerrilla line editing library against the idea that a * * Copyright (c) 2010, Salvatore Sanfilippo * Copyright (c) 2010, Pieter Noordhuis * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are perm

2、itted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the f

3、ollowing disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of Redis nor the names of its contributors may be used * to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS

4、PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR AN

5、Y DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABIL

6、ITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * line editing lib needs to be 20,000 lines of C code. * * You can find the latest source code at: * * http:/ * * Does a number of crazy assum

7、ptions that happen to be true in 99.9999% of * the 2010 UNIX computers around. * * References: * - http:/invisible- * - http:/ * * Todo list: * - Switch to gets() if $TERM is something we cant support. * - Filter bogus Ctrl+ combinations. * - Win32 support * * Bloat: * - Completion? * - History sear

8、ch like Ctrl+r in readline? * * List of escape sequences used by this program, we do everything just * with three sequences. In order to be so cheap we may have some * flickering effect with some slow terminal, but the lesser sequences * the more compatible. * * CHA (Cursor Horizontal Absolute) * Se

9、quence: ESC n G * Effect: moves cursor to column n (1 based) * * EL (Erase Line) * Sequence: ESC n K * Effect: if n is 0 or missing, clear from cursor to end of line * Effect: if n is 1, clear from beginning of line to cursor * Effect: if n is 2, clear entire line * * CUF (Cursor Forward) * Sequence

10、: ESC n C * Effect: moves cursor forward of n chars * * The following are used to clear the screen: ESC H ESC 2 J * This is actually composed of two sequences: * * cursorhome * Sequence: ESC H * Effect: moves the cursor to upper left corner * * ED2 (Clear entire screen) * Sequence: ESC 2 J * Effect:

11、 clear the whole screen * */#ifdef _WIN32#include #include #include #define snprintf _snprintf / Microsoft headers use underscores in some names#define strcasecmp _stricmp#define strdup _strdup#define isatty _isatty#define write _write#define STDIN_FILENO 0#else /* _WIN32 */#include #include #includ

12、e #include #include #include #include #include #include #endif /* _WIN32 */#include #include #include #include linenoise.h#include linenoise_utf8.h#include mk_wcwidth.h#include #include #include using std:string;using std:vector;using boost:scoped_array;using linenoise_utf8:UChar8;using linenoise_ut

13、f8:UChar32;using linenoise_utf8:copyString8to32;using linenoise_utf8:copyString32;using linenoise_utf8:copyString32to8;using linenoise_utf8:strlen32;using linenoise_utf8:strncmp32;using linenoise_utf8:write32;using linenoise_utf8:Utf8String;using linenoise_utf8:Utf32String;struct linenoiseCompletions vector completionStrings;#define LINENOISE_DEFAULT_HISTORY_MAX_LEN 100#define LINENOISE_MAX_LINE 4096/ make control-characters more readable#define ctrlChar( upperCaseASCII ) ( upperCaseASCII - 0x40 )/* * Recompute widths of all characters i

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 商业/管理/HR > 经营企划

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号