Develop and Download Open Source Software

Browse CVS Repository

Annotation of /shiki/shiki/buffer.c

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (hide annotations) (download) (as text)
Sat Nov 25 09:10:43 2006 UTC (17 years, 4 months ago) by aloha
Branch: MAIN
Changes since 1.2: +12 -2 lines
File MIME type: text/x-csrc
refactoring

1 aloha 1.1 /* vim: set encoding=utf8:
2     *
3     * buffer.c
4     *
5     * This file is part of Shiki.
6     *
7     * Copyright(C)2006 WAKATSUKI toshihiro
8     *
9     * Permission is hereby granted, free of charge, to any person obtaining a
10     * copy of this software and associated documentation files (the "Software"),
11     * to deal in the Software without restriction, including without limitation
12     * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13     * and/or sell copies of the Software, and to permit persons to whom the
14     * Software is furnished to do so, subject to the following conditions:
15     *
16     * The above copyright notice and this permission notice shall be included in
17     * all copies or substantial portions of the Software.
18     *
19     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20     * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21     * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22     * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23     * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24     * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25     * SOFTWARE.
26     *
27 aloha 1.3 * $Id: buffer.c,v 1.2 2006/11/24 19:34:48 aloha Exp $
28 aloha 1.1 */
29     #include"shiki.h"
30 aloha 1.2
31 aloha 1.3 gchar *Shiki_buffer_substring(gint start, gint end) {
32     if(start >= end)
33     return NULL;
34     else {
35     GtkTextIter s, e;
36     gtk_text_buffer_get_iter_at_offset(Shiki_CURRENT_TEXT_BUFFER, &s, start);
37     gtk_text_buffer_get_iter_at_offset(Shiki_CURRENT_TEXT_BUFFER, &e, end);
38    
39     return gtk_text_buffer_get_text(Shiki_CURRENT_TEXT_BUFFER, &s, &e, FALSE);
40     }
41     }

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26