Develop and Download Open Source Software

Browse CVS Repository

Diff of /shiki/shiki/xyzzylisp.stub

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

revision 1.2 by aloha, Fri Nov 24 19:31:04 2006 UTC revision 1.3 by aloha, Sat Nov 25 09:10:43 2006 UTC
# Line 1  Line 1 
1  "#include \"shiki.h\""  "#include \"shiki.h\""
2    
3  (define-cproc buffer-substring (start::<int> end::<int>)  (define-cproc buffer-substring (start::<int> end::<int>)
4    "  ScmObj start, end, result;   (body <string>?
5    GtkTextIter s, e;    "  gchar *substr = Shiki_buffer_substring(start, end);
6    gchar *substring;    if(substr)
7    if(Scm_NumCmp(start, end) >= 0)      SCM_RESULT = SCM_STRING(SCM_MAKE_STR_COPYING(substr));
8      return SCM_FALSE;    else
9    gtk_text_buffer_get_iter_at_offset(Shiki_CURRENT_TEXT_BUFFER, &s, SCM_INT_VALUE(start));      SCM_RESULT = SCM_STRING(SCM_FALSE);
10    gtk_text_buffer_get_iter_at_offset(Shiki_CURRENT_TEXT_BUFFER, &e, SCM_INT_VALUE(end));    g_free(substr);"))
   
   substring = gtk_text_buffer_get_text(Shiki_CURRENT_TEXT_BUFFER, &s, &e, FALSE);  
   result = SCM_MAKE_STR_COPYING(substring);  
   g_free(substring);  
   SCM_RETURN(result);")  

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

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