Develop and Download Open Source Software

Browse CVS Repository

Contents of /shiki/shiki/xyzzylisp.stub

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


Revision 1.1 - (show annotations) (download)
Fri Nov 24 13:42:29 2006 UTC (17 years, 4 months ago) by aloha
Branch: MAIN
add stub file (for semi-automatic creation of scheme C function program ; xyzzylisp.c)

1 (define-cproc buffer-substring (start::<int> end::<int>)
2 " ScmObj start, end, result;
3 GtkTextIter s, e;
4 gchar *substring;
5 if(Scm_NumCmp(start, end) >= 0)
6 return SCM_FALSE;
7 gtk_text_buffer_get_iter_at_offset(Shiki_CURRENT_TEXT_BUFFER, &s, SCM_INT_VALUE(start));
8 gtk_text_buffer_get_iter_at_offset(Shiki_CURRENT_TEXT_BUFFER, &e, SCM_INT_VALUE(end));
9
10 substring = gtk_text_buffer_get_text(Shiki_CURRENT_TEXT_BUFFER, &s, &e, FALSE);
11 result = SCM_MAKE_STR_COPYING(substring);
12 g_free(substring);
13 SCM_RETURN(result);")
14
15 (define-cproc clear-current-buffer ()
16 " clear_current_buffer();
17 return SCM_NIL;")

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