Develop and Download Open Source Software

Browse CVS Repository

Contents of /shiki/shiki/xyzzylisp.c

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


Revision 1.2 - (show annotations) (download) (as text)
Fri Nov 24 19:31:04 2006 UTC (17 years, 4 months ago) by aloha
Branch: MAIN
Changes since 1.1: +1 -13 lines
File MIME type: text/x-csrc
separate file

1 /* Generated by genstub. Do not edit. */
2 #include <gauche.h>
3 #if defined(__CYGWIN__) || defined(__MINGW32__)
4 #define SCM_CGEN_CONST /*empty*/
5 #else
6 #define SCM_CGEN_CONST const
7 #endif
8 #include "shiki.h"
9 static ScmObj xyzzylisp_buffer_substring(ScmObj *SCM_FP, int SCM_ARGCNT, void *data_)
10 {
11 ScmObj start_scm;
12 int start;
13 ScmObj end_scm;
14 int end;
15 SCM_ENTER_SUBR("buffer-substring");
16 start_scm = SCM_ARGREF(0);
17 if (!SCM_EXACTP(start_scm)) Scm_Error("C integer required, but got %S", start_scm);
18 start = Scm_GetInteger(start_scm);
19 end_scm = SCM_ARGREF(1);
20 if (!SCM_EXACTP(end_scm)) Scm_Error("C integer required, but got %S", end_scm);
21 end = Scm_GetInteger(end_scm);
22 {
23 ScmObj start, end, result;
24 GtkTextIter s, e;
25 gchar *substring;
26 if(Scm_NumCmp(start, end) >= 0)
27 return SCM_FALSE;
28 gtk_text_buffer_get_iter_at_offset(Shiki_CURRENT_TEXT_BUFFER, &s, SCM_INT_VALUE(start));
29 gtk_text_buffer_get_iter_at_offset(Shiki_CURRENT_TEXT_BUFFER, &e, SCM_INT_VALUE(end));
30
31 substring = gtk_text_buffer_get_text(Shiki_CURRENT_TEXT_BUFFER, &s, &e, FALSE);
32 result = SCM_MAKE_STR_COPYING(substring);
33 g_free(substring);
34 SCM_RETURN(result);
35 }
36 }
37
38 static SCM_DEFINE_STRING_CONST(xyzzylisp_buffer_substring__NAME, "buffer-substring", 16, 16);
39 static SCM_DEFINE_SUBR(xyzzylisp_buffer_substring__STUB, 2, 0, SCM_OBJ(&xyzzylisp_buffer_substring__NAME), xyzzylisp_buffer_substring, NULL, NULL);
40
41 void Scm_Init_xyzzylisp(ScmModule *module)
42 {
43
44 SCM_DEFINE(module, "buffer-substring", SCM_OBJ(&xyzzylisp_buffer_substring__STUB));
45 }

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