assorted-commits Mailing List for Assorted projects (Page 40)
Brought to you by:
yangzhang
You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(9) |
Dec
(12) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(86) |
Feb
(265) |
Mar
(96) |
Apr
(47) |
May
(136) |
Jun
(28) |
Jul
(57) |
Aug
(42) |
Sep
(20) |
Oct
(67) |
Nov
(37) |
Dec
(34) |
2009 |
Jan
(39) |
Feb
(85) |
Mar
(96) |
Apr
(24) |
May
(82) |
Jun
(13) |
Jul
(10) |
Aug
(8) |
Sep
(2) |
Oct
(20) |
Nov
(31) |
Dec
(17) |
2010 |
Jan
(16) |
Feb
(11) |
Mar
(17) |
Apr
(53) |
May
(31) |
Jun
(13) |
Jul
(3) |
Aug
(6) |
Sep
(11) |
Oct
(4) |
Nov
(17) |
Dec
(17) |
2011 |
Jan
(3) |
Feb
(19) |
Mar
(5) |
Apr
(17) |
May
(3) |
Jun
(4) |
Jul
(14) |
Aug
(3) |
Sep
(2) |
Oct
(1) |
Nov
(3) |
Dec
(2) |
2012 |
Jan
(3) |
Feb
(7) |
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
(4) |
Aug
(5) |
Sep
(2) |
Oct
(3) |
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
(9) |
Apr
(5) |
May
|
Jun
(2) |
Jul
(1) |
Aug
(10) |
Sep
(1) |
Oct
(2) |
Nov
|
Dec
|
2014 |
Jan
(1) |
Feb
(3) |
Mar
(3) |
Apr
(1) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2016 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(5) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <yan...@us...> - 2008-08-03 23:11:01
|
Revision: 927 http://assorted.svn.sourceforge.net/assorted/?rev=927&view=rev Author: yangzhang Date: 2008-08-03 23:11:11 +0000 (Sun, 03 Aug 2008) Log Message: ----------- reworded corey Modified Paths: -------------- personal-site/trunk/src/index.txt Modified: personal-site/trunk/src/index.txt =================================================================== --- personal-site/trunk/src/index.txt 2008-08-03 05:07:50 UTC (rev 926) +++ personal-site/trunk/src/index.txt 2008-08-03 23:11:11 UTC (rev 927) @@ -60,7 +60,7 @@ for on-line transaction processing workloads. - Invirt: [SIPB]'s virtual machine management system. The name of the MIT instance of this service is [XVM]. -- Corey: an exokernel operating system for many-core systems. +- Corey: an exokernel operating system for many-core architectures. - [WebTables]: web-scale information retrieval over structured data. - [Scalable Resilient Overlay Networks]: distributed algorithms and systems to enable RONs to scale to thousands of nodes. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-08-03 05:07:42
|
Revision: 926 http://assorted.svn.sourceforge.net/assorted/?rev=926&view=rev Author: yangzhang Date: 2008-08-03 05:07:50 +0000 (Sun, 03 Aug 2008) Log Message: ----------- added MRU plugin Modified Paths: -------------- configs/trunk/src/vim/plugin/_yang.vim Added Paths: ----------- configs/trunk/src/vim/plugin/mru.vim Modified: configs/trunk/src/vim/plugin/_yang.vim =================================================================== --- configs/trunk/src/vim/plugin/_yang.vim 2008-08-02 06:24:32 UTC (rev 925) +++ configs/trunk/src/vim/plugin/_yang.vim 2008-08-03 05:07:50 UTC (rev 926) @@ -193,7 +193,7 @@ " temporaries autocmd BufNewFile,BufRead *.{lzz,tt,tcc} setlocal filetype=cpp "autocmd BufNewFile,BufRead *.{c,cc,cpp,cxx,h,lzz,tt,tcc} setlocal cindent expandtab softtabstop=2 shiftwidth=2 tabstop=8 -autocmd BufNewFile,BufRead *.java setlocal cindent noexpandtab softtabstop=4 shiftwidth=4 tabstop=4 +"autocmd BufNewFile,BufRead *.java setlocal cindent noexpandtab softtabstop=4 shiftwidth=4 tabstop=4 autocmd BufNewFile,BufRead *.lzx setlocal filetype=lzx " autocmd GDB au BufNewFile,BufRead *.gdb set ft=gdb @@ -305,14 +305,18 @@ " PLUGIN OPTIONS -------------------------------------------------------------- + +" MRU +let MRU_Max_Entries = 99 + " Project -let g:proj_flags="mstSg" +let g:proj_flags = "mstSg" " Mini Buffer Explorer -let g:miniBufExplMapWindowNavVim = 1 +let g:miniBufExplMapWindowNavVim = 1 let g:miniBufExplMapWindowNavArrows = 1 let g:miniBufExplMapCTabSwitchBuffs = 1 -let g:miniBufExplModSelTarget = 1 +let g:miniBufExplModSelTarget = 1 nmap <f11> :TMiniBufExplorer<cr> " Latex Added: configs/trunk/src/vim/plugin/mru.vim =================================================================== --- configs/trunk/src/vim/plugin/mru.vim (rev 0) +++ configs/trunk/src/vim/plugin/mru.vim 2008-08-03 05:07:50 UTC (rev 926) @@ -0,0 +1,701 @@ +" File: mru.vim +" Author: Yegappan Lakshmanan (yegappan AT yahoo DOT com) +" Version: 3.1 +" Last Modified: February 17, 2008 +" +" Overview +" -------- +" The Most Recently Used (MRU) plugin provides an easy access to a list of +" recently opened/edited files in Vim. This plugin automatically stores the +" file names as you open/edit them in Vim. +" +" This plugin will work on all the platforms where Vim is supported. This +" plugin will work in both console and GUI Vim. This version of the MRU +" plugin needs Vim 7.0 and above. If you are using an earlier version of +" Vim, then you should use an older version of the MRU plugin. +" +" The recently used filenames are stored in a file specified by the Vim +" MRU_File variable. +" +" Installation +" ------------ +" 1. Copy the mru.vim file to one of the following directories: +" +" $HOME/.vim/plugin - Unix like systems +" $HOME/vimfiles/plugin - MS-Windows +" $VIM:vimfiles:plugin - Macintosh +" $VIM/vimfiles/plugin - All +" +" Refer to the following Vim help topics for more information about Vim +" plugins: +" +" :help add-plugin +" :help add-global-plugin +" :help runtimepath +" +" 2. Set the MRU_File Vim variable in the .vimrc file to the location of a +" file to store the most recently edited file names. This step is needed +" only if you want to change the default MRU filename. +" 3. Restart Vim. +" 4. You can use the ":MRU" command to list and edit the recently used files. +" In GUI Vim, you can use the 'File->Recent Files' menu to access the +" recently used files. +" +" To uninstall this plugin, remove this file (mru.vim) from the +" $HOME/.vim/plugin or $HOME/vimfiles/plugin or the $VIM/vimfile/plugin +" directory. +" +" Usage +" ----- +" You can use the ":MRU" command to list all the most recently edited file +" names. The file names will be listed in a temporary Vim window. If the MRU +" window is already opened, then the MRU list displayed in the window will be +" refreshed. +" +" If you are using GUI Vim, then the names of the recently edited files are +" added to the "File->Recent Files" menu. You can select the name of a file +" from this sub-menu to edit the file. +" +" You can use the normal Vim commands to move around in the MRU window. You +" cannot make changes in the MRU window. +" +" You can select a file name to edit by pressing the <Enter> key or by double +" clicking the left mouse button on a file name. The selected file will be +" opened. If the file is already opened in a window, the cursor will be moved +" to that window. Otherwise, the file is opened in the previous window. If the +" previous window has a modified buffer or is the preview window or is used by +" some other plugin, then the file is opened in a new window. +" +" You can press the 'o' key to open the file name under the cursor in the +" MRU window in a new window. +" +" To open a file from the MRU window in a new tab, press the 't' key. If the +" file is already opened in a window in the current or in another tab, then +" the cursor is moved to that tab. Otherwise, a new tab is opened. +" +" You can press the 'u' key in the MRU window to update the file list. This is +" useful if you keep the MRU window open always. +" +" You can close the MRU window by pressing the 'q' key or using one of the Vim +" window commands. +" +" To display only files matching a pattern from the MRU list in the MRU +" window, you can specify a pattern to the ":MRU" command. For example, to +" display only file names containing "vim" in them, you can use the following +" command ":MRU vim". When you specify a partial file name and only one +" matching filename is found, then the ":MRU" command will edit that file. +" +" The ":MRU" command supports command-line completion of file names from +" the MRU list. You can enter a partial file name and then press <Tab> +" or <Ctrl-D> to complete or list all the matching file names. +" +" Whenever the MRU list changes, the MRU file is updated with the latest MRU +" list. When you have multiple instances of Vim running at the same time, the +" latest MRU list will show up in all the instances of Vim. +" +" Configuration +" ------------- +" By changing the following variables you can configure the behavior of this +" plugin. Set the following variables in your .vimrc file using the 'let' +" command. +" +" The list of recently edit file names is stored in the file specified by the +" MRU_File variable. The default setting for this variable is +" $HOME/.vim_mru_files for Unix systems and $VIM/_vim_mru_files for non-Unix +" systems. You can change this variable to point to a file by adding the +" following line to the .vimrc file: +" +" let MRU_File = 'd:\myhome\_vim_mru_files' +" +" By default, the plugin will remember the names of the last 10 used files. +" As you edit more files, old file names will be removed from the MRU list. +" You can set the 'MRU_Max_Entries' variable to remember more file names. For +" example, to remember 20 most recently used file names, you can use +" +" let MRU_Max_Entries = 20 +" +" By default, all the edited file names will be added to the MRU list. If you +" want to exclude file names matching a list of patterns, you can set the +" MRU_Exclude_Files variable to a list of Vim regular expressions. By default, +" this variable is set to an empty string. For example, to not include files +" in the temporary (/tmp, /var/tmp and d:\temp) directories, you can set the +" MRU_Exclude_Files variable to +" +" let MRU_Exclude_Files = '^/tmp/.*\|^/var/tmp/.*' " For Unix +" let MRU_Exclude_Files = '^c:\\temp\\.*' " For MS-Windows +" +" The specified pattern should be a Vim regular expression pattern. +" +" The default height of the MRU window is 8. You can set the MRU_Window_Height +" variable to change the window height. +" +" let MRU_Window_Height = 15 +" +" By default, when the :MRU command is invoked, the MRU list will be displayed +" in a new window. Instead, if you want the MRU plugin to reuse the current +" window, then you can set the 'MRU_Use_Current_Window' variable to one. +" +" let MRU_Use_Current_Window = 1 +" +" The MRU plugin will reuse the current window. When a file name is selected, +" the file is also opened in the current window. +" +" When you select a file from the MRU window, the MRU window will be +" automatically closed and the selected file will be opened in the previous +" window. You can set the 'MRU_Auto_Close' variable to zero to keep the MRU +" window open. +" +" let MRU_Auto_Close = 0 +" +" If you don't use the "File->Recent Files" menu and want to disable it, +" then you can set the 'MRU_Add_Menu' variable to zero. By default, the +" menu is enabled. +" +" let MRU_Add_Menu = 0 +" +" ****************** Do not modify after this line ************************ +if exists('loaded_mru') + finish +endif +let loaded_mru=1 + +if v:version < 700 + finish +endif + +" Line continuation used here +let s:cpo_save = &cpo +set cpo&vim + +" Maximum number of entries allowed in the MRU list +if !exists('MRU_Max_Entries') + let MRU_Max_Entries = 10 +endif + +" Files to exclude from the MRU list +if !exists('MRU_Exclude_Files') + let MRU_Exclude_Files = '' +endif + +" Height of the MRU window +" Default height is 8 +if !exists('MRU_Window_Height') + let MRU_Window_Height = 8 +endif + +if !exists('MRU_Use_Current_Window') + let MRU_Use_Current_Window = 0 +endif + +if !exists('MRU_Auto_Close') + let MRU_Auto_Close = 1 +endif + +if !exists('MRU_File') + if has('unix') + let MRU_File = $HOME . "/.vim_mru_files" + else + let MRU_File = $VIM . "/_vim_mru_files" + endif +endif + +" Option for enabling or disabling the MRU menu +if !exists('MRU_Add_Menu') + let MRU_Add_Menu = 1 +endif + +" MRU_LoadList +" Load the latest MRU file list from the MRU file +function! s:MRU_LoadList() + " Read the list from the MRU file. + if filereadable(g:MRU_File) + let s:MRU_files = readfile(g:MRU_File) + if s:MRU_files[0] =~# '^" Most recently edited files in Vim' + " Generated by the previous version of the MRU plugin. Ignore the + " list + let s:MRU_files = [] + elseif s:MRU_files[0] =~# '^#' + " Remove the comment line + call remove(s:MRU_files, 0) + endif + else + let s:MRU_files = [] + endif + + " Refresh the MRU menu + call s:MRU_Refresh_Menu() +endfunction + +" MRU_SaveList +" Save the MRU list to the file +function! s:MRU_SaveList() + let l = [] + call add(l, '# Most recently edited files in Vim (version 3.0)') + call extend(l, s:MRU_files) + call writefile(l, g:MRU_File) +endfunction + +" MRU_AddFile +" Add a file to the MRU file list +function! s:MRU_AddFile(acmd_bufnr) + " Get the full path to the filename + let fname = fnamemodify(bufname(a:acmd_bufnr + 0), ':p') + if fname == '' + return + endif + + " Skip temporary buffer with buftype set + if &buftype != '' + return + endif + + if g:MRU_Exclude_Files != '' + " Do not add files matching the pattern specified in the + " MRU_Exclude_Files to the MRU list + if fname =~? g:MRU_Exclude_Files + return + endif + endif + + " If the filename is already present in the MRU list, then move + " it to the beginning of the list + let idx = index(s:MRU_files, fname) + if idx == -1 + if !filereadable(fname) + " File is not readable and is not in the MRU list + return + endif + endif + + " Load the latest MRU file list + call s:MRU_LoadList() + + " Remove the new file name from the existing MRU list (if already present) + call filter(s:MRU_files, 'v:val !=# fname') + + " Add the new file list to the beginning of the updated old file list + call insert(s:MRU_files, fname, 0) + + " Return the trimmed list + if len(s:MRU_files) > g:MRU_Max_Entries + call remove(s:MRU_files, g:MRU_Max_Entries, -1) + endif + + " Save the updated MRU list + call s:MRU_SaveList() + + " Refresh the MRU menu + call s:MRU_Refresh_Menu() + + " If the MRU window is open, update the displayed MRU list + let bname = '__MRU_Files__' + let winnum = bufwinnr(bname) + if winnum != -1 + let cur_winnr = winnr() + call s:MRU_Open_Window() + if winnr() != cur_winnr + exe cur_winnr . 'wincmd w' + endif + endif +endfunction + +" MRU_Edit_File +" Edit the specified file +function! s:MRU_Edit_File(filename) + let fname = escape(a:filename, ' %#"') + " If the file is already open in one of the windows, jump to it + let winnum = bufwinnr('^' . fname . '$') + if winnum != -1 + if winnum != winnr() + exe winnum . 'wincmd w' + endif + else + if &modified || &buftype != '' || &previewwindow + " Current buffer has unsaved changes or is a special buffer or is + " the preview window. So open the file in a new window + exe 'split ' . fname + else + exe 'edit ' . fname + endif + endif +endfunction + +" MRU_Window_Edit_File +" Open a file selected from the MRU window +" win_opt == useopen, open file in previous window +" win_opt == newwin, open file in new window +" win_opt == newtab, open file in new tab +function! s:MRU_Window_Edit_File(win_opt) + let fname = getline('.') + + if fname == '' + return + endif + + let fname = escape(fname, ' %#"') + + if a:win_opt == 'newwin' + " Edit the file in a new window + exe 'leftabove new ' . fname + + if g:MRU_Auto_Close == 1 && g:MRU_Use_Current_Window == 0 + " Go back to the MRU window and close it + let cur_winnr = winnr() + + wincmd p + silent! close + + if winnr() != cur_winnr + exe cur_winnr . 'wincmd w' + endif + endif + elseif a:win_opt == 'newtab' + if g:MRU_Auto_Close == 1 && g:MRU_Use_Current_Window == 0 + " Automatically close the window if the file window is + " not used to display the MRU list. + silent! close + endif + + " If the selected file is already open in the current tab or in + " another tab, jump to it. Otherwise open it in a new tab + if bufwinnr('^' . fname . '$') == -1 + let tabnum = -1 + let i = 1 + let bnum = bufnr('^' . fname . '$') + while i <= tabpagenr('$') + if index(tabpagebuflist(i), bnum) != -1 + let tabnum = i + break + endif + let i += 1 + endwhile + + if tabnum != -1 + " Goto the tab containing the file + exe 'tabnext ' . i + else + " Open a new tab as the last tab page + exe '999tabnew ' . fname + endif + endif + + " Jump to the window containing the file + let winnum = bufwinnr('^' . fname . '$') + if winnum != winnr() + exe winnum . 'wincmd w' + endif + else + " If the selected file is already open in one of the windows, + " jump to it + let winnum = bufwinnr('^' . fname . '$') + if winnum != -1 + if g:MRU_Auto_Close == 1 && g:MRU_Use_Current_Window == 0 + " Automatically close the window if the file window is + " not used to display the MRU list. + silent! close + endif + " As the window numbers will change after closing a window, + " get the window number again and jump to it, if the cursor + " is not already in that window + let winnum = bufwinnr('^' . fname . '$') + if winnum != winnr() + exe winnum . 'wincmd w' + endif + else + if g:MRU_Auto_Close == 1 && g:MRU_Use_Current_Window == 0 + " Automatically close the window if the file window is + " not used to display the MRU list. + silent! close + + " Jump to the window from which the MRU window was opened + if exists('s:MRU_last_buffer') + let last_winnr = bufwinnr(s:MRU_last_buffer) + if last_winnr != -1 && last_winnr != winnr() + exe last_winnr . 'wincmd w' + endif + endif + else + if g:MRU_Use_Current_Window == 0 + " Goto the previous window + " If MRU_Use_Current_Window is set to one, then the + " current window is used to open the file + wincmd p + endif + endif + + " Edit the file + if &modified || &buftype != '' || &previewwindow + " Current buffer has unsaved changes or is a special buffer or + " is the preview window. So open the file in a new window + exe 'split ' . fname + else + exe 'edit ' . fname + endif + endif + endif +endfunction + +" MRU_Warn_Msg +" Display a warning message +function! s:MRU_Warn_Msg(msg) + echohl WarningMsg + echo a:msg + echohl None +endfunction + +" MRU_Open_Window +" Display the Most Recently Used file list in a temporary window. +function! s:MRU_Open_Window(...) + + " Load the latest MRU file list + call s:MRU_LoadList() + + " Empty MRU list + if empty(s:MRU_files) + call s:MRU_Warn_Msg('MRU file list is empty') + return + endif + + " Save the current buffer number. This is used later to open a file when a + " entry is selected from the MRU window. The window number is not saved, + " as the window number will change when new windows are opened. + let s:MRU_last_buffer = bufnr('%') + + let bname = '__MRU_Files__' + + " If the window is already open, jump to it + let winnum = bufwinnr(bname) + if winnum != -1 + if winnr() != winnum + " If not already in the window, jump to it + exe winnum . 'wincmd w' + endif + + setlocal modifiable + + " Delete the contents of the buffer to the black-hole register + silent! %delete _ + else + if g:MRU_Use_Current_Window + " Reuse the current window + " + " If the __MRU_Files__ buffer exists, then reuse it. Otherwise open + " a new buffer + let bufnum = bufnr(bname) + if bufnum == -1 + let cmd = 'edit ' . bname + else + let cmd = 'buffer ' . bufnum + endif + + exe cmd + + if bufnr('%') != bufnr(bname) + " Failed to edit the MRU buffer + return + endif + else + " Open a new window at the bottom + + " If the __MRU_Files__ buffer exists, then reuse it. Otherwise open + " a new buffer + let bufnum = bufnr(bname) + if bufnum == -1 + let wcmd = bname + else + let wcmd = '+buffer' . bufnum + endif + + exe 'silent! botright ' . g:MRU_Window_Height . 'split ' . wcmd + endif + endif + + " Mark the buffer as scratch + setlocal buftype=nofile + setlocal bufhidden=delete + setlocal noswapfile + setlocal nowrap + setlocal nobuflisted + " Use fixed height for the MRU window + if v:version >= 602 + setlocal winfixheight + endif + + " Setup the cpoptions properly for the maps to work + let old_cpoptions = &cpoptions + set cpoptions&vim + + " Create a mapping to jump to the file + nnoremap <buffer> <silent> <CR> + \ :call <SID>MRU_Window_Edit_File('useopen')<CR> + nnoremap <buffer> <silent> o + \ :call <SID>MRU_Window_Edit_File('newwin')<CR> + nnoremap <buffer> <silent> t + \ :call <SID>MRU_Window_Edit_File('newtab')<CR> + nnoremap <buffer> <silent> u :MRU<CR> + nnoremap <buffer> <silent> <2-LeftMouse> + \ :call <SID>MRU_Window_Edit_File('useopen')<CR> + nnoremap <buffer> <silent> q :close<CR> + + " Restore the previous cpoptions settings + let &cpoptions = old_cpoptions + + " Display the MRU list + if a:0 == 0 + " No search pattern specified. Display the complete list + silent! 0put =s:MRU_files + else + " Display only the entries matching the specified pattern + silent! 0put =filter(copy(s:MRU_files), 'v:val =~? a:1') + endif + + " Move the cursor to the beginning of the file + exe 1 + + setlocal nomodifiable +endfunction + +" MRU_Complete +" Command-line completion function used by :MRU command +function! s:MRU_Complete(ArgLead, CmdLine, CursorPos) + if a:ArgLead == '' + " Return the list of MRU files + return s:MRU_files + else + return filter(copy(s:MRU_files), 'v:val =~? a:ArgLead') + endif +endfunction + +" MRU_Cmd +" Function to handle the MRU command +function! s:MRU_Cmd(pat) + if a:pat == '' + " No arguments specified. Open the MRU window + call s:MRU_Open_Window() + return + endif + + " Load the latest MRU file + call s:MRU_LoadList() + + " Empty MRU list + if empty(s:MRU_files) + call s:MRU_Warn_Msg('MRU file list is empty') + return + endif + + " First use the specified string as a literal string and search for + " filenames containing the string. If only one filename is found, + " then edit it. + let m = filter(copy(s:MRU_files), 'stridx(v:val, a:pat) != -1') + if len(m) == 1 + call s:MRU_Edit_File(m[0]) + return + endif + + " Use the specified string as a regular expression pattern and search + " for filenames matching the pattern + let m = filter(copy(s:MRU_files), 'v:val =~? a:pat') + + if len(m) == 0 + " No filenames matching the specified pattern are found + call s:MRU_Warn_Msg("MRU file list doesn't contain " . + \ "files containing " . a:pat) + return + endif + + if len(m) == 1 + call s:MRU_Edit_File(m[0]) + return + endif + + call s:MRU_Open_Window(a:pat) +endfunction + +function! s:MRU_add_files_to_menu(prefix, file_list) + for fname in a:file_list + " Escape special characters in the filename + let esc_fname = escape(fnamemodify(fname, ':t'), ". \\|\t%#") + + " Truncate the directory name if it is long + let dir_name = fnamemodify(fname, ':h') + let len = strlen(dir_name) + " Shorten long file names by adding only few characters from + " the beginning and end. + if len > 30 + let dir_name = strpart(dir_name, 0, 10) . + \ '...' . + \ strpart(dir_name, len - 20) + endif + let esc_dir_name = escape(dir_name, ". \\|\t") + + exe 'anoremenu <silent> &File.Recent\ Files.' . a:prefix . esc_fname . + \ '\ (' . esc_dir_name . ')' . + \ " :call <SID>MRU_Edit_File('" . fname . "')<CR>" + endfor +endfunction + +" MRU_Refresh_Menu() +" Refresh the MRU menu +function! s:MRU_Refresh_Menu() + if !has('menu') || !g:MRU_Add_Menu + " No support for menus + return + endif + + " Setup the cpoptions properly for the maps to work + let old_cpoptions = &cpoptions + set cpoptions&vim + + " Remove the MRU menu + " To retain the teared-off MRU menu, we need to add a dummy entry + silent! unmenu &File.Recent\ Files + " The menu priority of the File menu is 10. If the MRU plugin runs + " first before menu.vim, the File menu order may not be correct. + " So specify the priority of the File menu here. + 10noremenu &File.Recent\ Files.Dummy <Nop> + silent! unmenu! &File.Recent\ Files + + anoremenu <silent> &File.Recent\ Files.Refresh\ list + \ :call <SID>MRU_LoadList()<CR> + anoremenu File.Recent\ Files.-SEP1- : + + " Add the filenames in the MRU list to the menu + let entry_cnt = len(s:MRU_files) + if entry_cnt > 10 + for start_idx in range(0, entry_cnt, 10) + let last_idx = start_idx + 9 + if last_idx >= entry_cnt + let last_idx = entry_cnt - 1 + endif + let prefix = 'Files\ (' . (start_idx + 1) . '\.\.\.' . + \ (last_idx + 1) . ').' + call s:MRU_add_files_to_menu(prefix, + \ s:MRU_files[start_idx : last_idx]) + endfor + else + call s:MRU_add_files_to_menu('', s:MRU_files) + endif + + " Remove the dummy menu entry + unmenu &File.Recent\ Files.Dummy + + " Restore the previous cpoptions settings + let &cpoptions = old_cpoptions +endfunction + +" Load the MRU list on plugin startup +call s:MRU_LoadList() + +" Autocommands to detect the most recently used files +autocmd BufRead * call s:MRU_AddFile(expand('<abuf>')) +autocmd BufNewFile * call s:MRU_AddFile(expand('<abuf>')) +autocmd BufWritePost * call s:MRU_AddFile(expand('<abuf>')) + +" Command to open the MRU window +command! -nargs=? -complete=customlist,s:MRU_Complete MRU + \ call s:MRU_Cmd(<q-args>) + +" restore 'cpo' +let &cpo = s:cpo_save +unlet s:cpo_save This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-08-02 06:24:25
|
Revision: 925 http://assorted.svn.sourceforge.net/assorted/?rev=925&view=rev Author: yangzhang Date: 2008-08-02 06:24:32 +0000 (Sat, 02 Aug 2008) Log Message: ----------- only print when in interactive mode Modified Paths: -------------- shell-tools/trunk/src/ssh-dummy-shell.bash Modified: shell-tools/trunk/src/ssh-dummy-shell.bash =================================================================== --- shell-tools/trunk/src/ssh-dummy-shell.bash 2008-08-02 06:01:17 UTC (rev 924) +++ shell-tools/trunk/src/ssh-dummy-shell.bash 2008-08-02 06:24:32 UTC (rev 925) @@ -1,4 +1,6 @@ #!/usr/bin/env bash -echo 'press enter to exit/disconnect...' +if [ -t 1 ] +then echo 'press enter to exit/disconnect...' +fi read This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-08-02 06:01:09
|
Revision: 924 http://assorted.svn.sourceforge.net/assorted/?rev=924&view=rev Author: yangzhang Date: 2008-08-02 06:01:17 +0000 (Sat, 02 Aug 2008) Log Message: ----------- added f(); added ssh-dummy-shell Modified Paths: -------------- shell-tools/trunk/src/bash-commons/bashrc.bash Added Paths: ----------- shell-tools/trunk/src/ssh-dummy-shell.bash Modified: shell-tools/trunk/src/bash-commons/bashrc.bash =================================================================== --- shell-tools/trunk/src/bash-commons/bashrc.bash 2008-08-02 04:40:08 UTC (rev 923) +++ shell-tools/trunk/src/bash-commons/bashrc.bash 2008-08-02 06:01:17 UTC (rev 924) @@ -608,6 +608,10 @@ done } +f() { + find "${2:-.}" -name "$1" +} + #function set_title() { # if [ $# -eq 0 ] ; then # eval set -- "$PWD" Added: shell-tools/trunk/src/ssh-dummy-shell.bash =================================================================== --- shell-tools/trunk/src/ssh-dummy-shell.bash (rev 0) +++ shell-tools/trunk/src/ssh-dummy-shell.bash 2008-08-02 06:01:17 UTC (rev 924) @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +echo 'press enter to exit/disconnect...' +read Property changes on: shell-tools/trunk/src/ssh-dummy-shell.bash ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-08-02 04:39:58
|
Revision: 923 http://assorted.svn.sourceforge.net/assorted/?rev=923&view=rev Author: yangzhang Date: 2008-08-02 04:40:08 +0000 (Sat, 02 Aug 2008) Log Message: ----------- cleaned up build system to go through ant Modified Paths: -------------- sandbox/trunk/src/java/java-from-c/Makefile sandbox/trunk/src/java/java-from-c/README Added Paths: ----------- sandbox/trunk/src/java/java-from-c/build.xml Modified: sandbox/trunk/src/java/java-from-c/Makefile =================================================================== --- sandbox/trunk/src/java/java-from-c/Makefile 2008-08-02 04:38:29 UTC (rev 922) +++ sandbox/trunk/src/java/java-from-c/Makefile 2008-08-02 04:40:08 UTC (rev 923) @@ -1,6 +1,6 @@ -CPATH := /usr/lib/jvm/java-6-openjdk/include:/usr/lib/jvm/java-6-openjdk/include/linux -LIBRARY_PATH := $(JAVA_HOME)/jre/lib:$(JAVA_HOME)/jre/lib/amd64:$(JAVA_HOME)/jre/lib/amd64/jli:$(JAVA_HOME)/jre/lib/amd64/jli:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/jli:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/jli:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server -LD_LIBRARY_PATH := $(LIBRARY_PATH):. +CPATH := $(JAVA_HOME)/include:$(JAVA_HOME)/include/linux:$(CPATH) +LIBRARY_PATH := $(JAVA_LIBRARY_PATH) +LD_LIBRARY_PATH := $(JAVA_LIBRARY_PATH):. all: test ./test Modified: sandbox/trunk/src/java/java-from-c/README =================================================================== --- sandbox/trunk/src/java/java-from-c/README 2008-08-02 04:38:29 UTC (rev 922) +++ sandbox/trunk/src/java/java-from-c/README 2008-08-02 04:40:08 UTC (rev 923) @@ -1,2 +1,6 @@ John Hugg's demo of going into Java from C/JNI. This is useful for -profiling/debugging JNI. The original source is buildable on OS X. +profiling/debugging JNI. + +To build and run this, run `ant`. + +Makefile.osx is the original build script, for building on OS X. Added: sandbox/trunk/src/java/java-from-c/build.xml =================================================================== --- sandbox/trunk/src/java/java-from-c/build.xml (rev 0) +++ sandbox/trunk/src/java/java-from-c/build.xml 2008-08-02 04:40:08 UTC (rev 923) @@ -0,0 +1,9 @@ +<?xml version="1.0" ?> +<project default="all"> + <target name="all"> + <exec executable='make' failonerror='true'> + <env key="JAVA_LIBRARY_PATH" path="${java.library.path}" /> + <env key="JAVA_HOME" path="${java.home}/.." /> + </exec> + </target> +</project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-08-02 04:38:20
|
Revision: 922 http://assorted.svn.sourceforge.net/assorted/?rev=922&view=rev Author: yangzhang Date: 2008-08-02 04:38:29 +0000 (Sat, 02 Aug 2008) Log Message: ----------- added make sandbox; added a simple join-path demo Added Paths: ----------- sandbox/trunk/src/make/ sandbox/trunk/src/make/join-path.mk Added: sandbox/trunk/src/make/join-path.mk =================================================================== --- sandbox/trunk/src/make/join-path.mk (rev 0) +++ sandbox/trunk/src/make/join-path.mk 2008-08-02 04:38:29 UTC (rev 922) @@ -0,0 +1,10 @@ +# This is how to join a space-separate list into a PATH-like, colon-separated +# list. + +empty := +space := $(empty) $(empty) +xs := a b c d +x := $(subst $(space),:,$(xs)) + +all: + @echo $(x) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-08-02 04:06:47
|
Revision: 921 http://assorted.svn.sourceforge.net/assorted/?rev=921&view=rev Author: yangzhang Date: 2008-08-02 04:06:42 +0000 (Sat, 02 Aug 2008) Log Message: ----------- added zephyr and barnowl configs Modified Paths: -------------- configs/trunk/setup-yang.bash configs/trunk/src/ssh/config Added Paths: ----------- configs/trunk/src/owl/ configs/trunk/src/owl/startup configs/trunk/src/zephyr/ configs/trunk/src/zephyr/anyone configs/trunk/src/zephyr/zephyr.subs Modified: configs/trunk/setup-yang.bash =================================================================== --- configs/trunk/setup-yang.bash 2008-08-01 16:17:16 UTC (rev 920) +++ configs/trunk/setup-yang.bash 2008-08-02 04:06:42 UTC (rev 921) @@ -8,20 +8,23 @@ . simple-setup.bash cd src -install .ssh/ ssh/config +install .Xdefaults Xdefaults +install .abcde.conf abcde.conf +install .anyone zephyr/anyone +install .aspell.en.prepl aspell/aspell.en.prepl +install .aspell.en.pws aspell/aspell.en.pws +install .astylerc astylerc +install .darcs/ darcs/boring +install .devscripts devscripts install .inputrc inputrc -install .astylerc astylerc +install .owl/ owl/startup +install .pythonrc.py pythonrc.py install .screenrc screenrc -install .pythonrc.py pythonrc.py -install .darcs/ darcs/boring +install .signature signature +install .ssh/ ssh/config install .subversion/ subversion/config -install .Xdefaults Xdefaults +install .supybot/ supybot/yangbot.conf install .synergy.conf synergy.conf install .unison unison -install .signature signature -install .abcde.conf abcde.conf -install .aspell.en.prepl aspell/aspell.en.prepl -install .aspell.en.pws aspell/aspell.en.pws -install .supybot/ supybot/yangbot.conf -install .devscripts devscripts +install .zephyr.subs zephyr/zephyr.subs # TODO figure out a place to put the .profile Added: configs/trunk/src/owl/startup =================================================================== --- configs/trunk/src/owl/startup (rev 0) +++ configs/trunk/src/owl/startup 2008-08-02 04:06:42 UTC (rev 921) @@ -0,0 +1,2 @@ +set logging on +set classlogging on Modified: configs/trunk/src/ssh/config =================================================================== --- configs/trunk/src/ssh/config 2008-08-01 16:17:16 UTC (rev 920) +++ configs/trunk/src/ssh/config 2008-08-02 04:06:42 UTC (rev 921) @@ -5,6 +5,18 @@ # StrictHostKeyChecking no +Host rem + HostName remote.mit.edu + User root + +Host bm + HostName black-mesa.mit.edu + User root + +Host sx + HostName sx-blade-2.mit.edu + User root + Host blokus HostName blokus.csail.mit.edu User y_z Added: configs/trunk/src/zephyr/anyone =================================================================== --- configs/trunk/src/zephyr/anyone (rev 0) +++ configs/trunk/src/zephyr/anyone 2008-08-02 04:06:42 UTC (rev 921) @@ -0,0 +1,5 @@ +dheera +emkim +kchen +pawan +y_z Added: configs/trunk/src/zephyr/zephyr.subs =================================================================== --- configs/trunk/src/zephyr/zephyr.subs (rev 0) +++ configs/trunk/src/zephyr/zephyr.subs 2008-08-02 04:06:42 UTC (rev 921) @@ -0,0 +1,3 @@ +sipb,*,* +xvm,*,* +sipb-auto,door,* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-08-01 16:17:08
|
Revision: 920 http://assorted.svn.sourceforge.net/assorted/?rev=920&view=rev Author: yangzhang Date: 2008-08-01 16:17:16 +0000 (Fri, 01 Aug 2008) Log Message: ----------- updated makefile with more direct build strategy Modified Paths: -------------- sandbox/trunk/src/java/java-from-c/Makefile Modified: sandbox/trunk/src/java/java-from-c/Makefile =================================================================== --- sandbox/trunk/src/java/java-from-c/Makefile 2008-08-01 15:48:56 UTC (rev 919) +++ sandbox/trunk/src/java/java-from-c/Makefile 2008-08-01 16:17:16 UTC (rev 920) @@ -1,11 +1,28 @@ CPATH := /usr/lib/jvm/java-6-openjdk/include:/usr/lib/jvm/java-6-openjdk/include/linux -LIBRARY_PATH := /usr/lib/jvm/java-6-openjdk/jre/lib:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/jli:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/jli:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/jli:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/jli:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server +LIBRARY_PATH := $(JAVA_HOME)/jre/lib:$(JAVA_HOME)/jre/lib/amd64:$(JAVA_HOME)/jre/lib/amd64/jli:$(JAVA_HOME)/jre/lib/amd64/jli:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/jli:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/jli:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server LD_LIBRARY_PATH := $(LIBRARY_PATH):. all: test ./test +dbg: test + gdb test + +# Two modes of building this. The first is the more direct way for Linux, and +# the second is more compatible with OS X platforms (which requires two +# separate libraries to be built, a .jnilib and a .dylib). + +ifeq ($(mode),) + test: JniTest.h jnitest.cpp libjnitest.so + g++ -g3 -o test jnitest.cpp libjnitest.so -ljava + +libjnitest.so: jnilib.cpp JniTest.h + g++ -g3 -shared -fPIC -o libjnitest.so jnilib.cpp + +else + +test: JniTest.h jnitest.cpp libjnitest.so g++ -g3 -o test jnitest.cpp librealjnitest.so -ljava libjnitest.so: librealjnitest.so @@ -14,6 +31,8 @@ librealjnitest.so: jnilib.cpp JniTest.h g++ -g3 -shared -fPIC -o librealjnitest.so jnilib.cpp +endif + JniTest.h: JniTest.class javah JniTest This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-08-01 15:48:50
|
Revision: 919 http://assorted.svn.sourceforge.net/assorted/?rev=919&view=rev Author: yangzhang Date: 2008-08-01 15:48:56 +0000 (Fri, 01 Aug 2008) Log Message: ----------- removed std headers; cleaned up `make clean` Modified Paths: -------------- sandbox/trunk/src/java/java-from-c/Makefile Removed Paths: ------------- sandbox/trunk/src/java/java-from-c/jni.h sandbox/trunk/src/java/java-from-c/jni_md.h Modified: sandbox/trunk/src/java/java-from-c/Makefile =================================================================== --- sandbox/trunk/src/java/java-from-c/Makefile 2008-08-01 14:38:17 UTC (rev 918) +++ sandbox/trunk/src/java/java-from-c/Makefile 2008-08-01 15:48:56 UTC (rev 919) @@ -23,5 +23,5 @@ .PHONY: clean clean: - rm -f test JniTest.h *.so + rm -f test JniTest.h *.so *.class Deleted: sandbox/trunk/src/java/java-from-c/jni.h =================================================================== --- sandbox/trunk/src/java/java-from-c/jni.h 2008-08-01 14:38:17 UTC (rev 918) +++ sandbox/trunk/src/java/java-from-c/jni.h 2008-08-01 15:48:56 UTC (rev 919) @@ -1,1961 +0,0 @@ -/* - * @(#)jni.h 1.62 06/02/02 - * - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. - * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. - */ - -/* - * We used part of Netscape's Java Runtime Interface (JRI) as the starting - * point of our design and implementation. - */ - -/****************************************************************************** - * Java Runtime Interface - * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved. - *****************************************************************************/ - -#ifndef _JAVASOFT_JNI_H_ -#define _JAVASOFT_JNI_H_ - -#include <stdio.h> -#include <stdarg.h> - -/* jni_md.h contains the machine-dependent typedefs for jbyte, jint - and jlong */ - -#include "jni_md.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * JNI Types - */ - -#ifndef JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H - -typedef unsigned char jboolean; -typedef unsigned short jchar; -typedef short jshort; -typedef float jfloat; -typedef double jdouble; - -typedef jint jsize; - -#ifdef __cplusplus - -class _jobject {}; -class _jclass : public _jobject {}; -class _jthrowable : public _jobject {}; -class _jstring : public _jobject {}; -class _jarray : public _jobject {}; -class _jbooleanArray : public _jarray {}; -class _jbyteArray : public _jarray {}; -class _jcharArray : public _jarray {}; -class _jshortArray : public _jarray {}; -class _jintArray : public _jarray {}; -class _jlongArray : public _jarray {}; -class _jfloatArray : public _jarray {}; -class _jdoubleArray : public _jarray {}; -class _jobjectArray : public _jarray {}; - -typedef _jobject *jobject; -typedef _jclass *jclass; -typedef _jthrowable *jthrowable; -typedef _jstring *jstring; -typedef _jarray *jarray; -typedef _jbooleanArray *jbooleanArray; -typedef _jbyteArray *jbyteArray; -typedef _jcharArray *jcharArray; -typedef _jshortArray *jshortArray; -typedef _jintArray *jintArray; -typedef _jlongArray *jlongArray; -typedef _jfloatArray *jfloatArray; -typedef _jdoubleArray *jdoubleArray; -typedef _jobjectArray *jobjectArray; - -#else - -struct _jobject; - -typedef struct _jobject *jobject; -typedef jobject jclass; -typedef jobject jthrowable; -typedef jobject jstring; -typedef jobject jarray; -typedef jarray jbooleanArray; -typedef jarray jbyteArray; -typedef jarray jcharArray; -typedef jarray jshortArray; -typedef jarray jintArray; -typedef jarray jlongArray; -typedef jarray jfloatArray; -typedef jarray jdoubleArray; -typedef jarray jobjectArray; - -#endif - -typedef jobject jweak; - -typedef union jvalue { - jboolean z; - jbyte b; - jchar c; - jshort s; - jint i; - jlong j; - jfloat f; - jdouble d; - jobject l; -} jvalue; - -struct _jfieldID; -typedef struct _jfieldID *jfieldID; - -struct _jmethodID; -typedef struct _jmethodID *jmethodID; - -/* Return values from jobjectRefType */ -typedef enum _jobjectType { - JNIInvalidRefType = 0, - JNILocalRefType = 1, - JNIGlobalRefType = 2, - JNIWeakGlobalRefType = 3 -} jobjectRefType; - - -#endif /* JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H */ - -/* - * jboolean constants - */ - -#define JNI_FALSE 0 -#define JNI_TRUE 1 - -/* - * possible return values for JNI functions. - */ - -#define JNI_OK 0 /* success */ -#define JNI_ERR (-1) /* unknown error */ -#define JNI_EDETACHED (-2) /* thread detached from the VM */ -#define JNI_EVERSION (-3) /* JNI version error */ -#define JNI_ENOMEM (-4) /* not enough memory */ -#define JNI_EEXIST (-5) /* VM already created */ -#define JNI_EINVAL (-6) /* invalid arguments */ - -/* - * used in ReleaseScalarArrayElements - */ - -#define JNI_COMMIT 1 -#define JNI_ABORT 2 - -/* - * used in RegisterNatives to describe native method name, signature, - * and function pointer. - */ - -typedef struct { - char *name; - char *signature; - void *fnPtr; -} JNINativeMethod; - -/* - * JNI Native Method Interface. - */ - -struct JNINativeInterface_; - -struct JNIEnv_; - -#ifdef __cplusplus -typedef JNIEnv_ JNIEnv; -#else -typedef const struct JNINativeInterface_ *JNIEnv; -#endif - -/* - * JNI Invocation Interface. - */ - -struct JNIInvokeInterface_; - -struct JavaVM_; - -#ifdef __cplusplus -typedef JavaVM_ JavaVM; -#else -typedef const struct JNIInvokeInterface_ *JavaVM; -#endif - -struct JNINativeInterface_ { - void *reserved0; - void *reserved1; - void *reserved2; - - void *reserved3; - -#if !TARGET_RT_MAC_CFM && defined(__ppc__) - void* cfm_vectors[225]; -#endif /* !TARGET_RT_MAC_CFM && defined(__ppc__) */ - - jint (JNICALL *GetVersion)(JNIEnv *env); - - jclass (JNICALL *DefineClass) - (JNIEnv *env, const char *name, jobject loader, const jbyte *buf, - jsize len); - jclass (JNICALL *FindClass) - (JNIEnv *env, const char *name); - - jmethodID (JNICALL *FromReflectedMethod) - (JNIEnv *env, jobject method); - jfieldID (JNICALL *FromReflectedField) - (JNIEnv *env, jobject field); - - jobject (JNICALL *ToReflectedMethod) - (JNIEnv *env, jclass cls, jmethodID methodID, jboolean isStatic); - - jclass (JNICALL *GetSuperclass) - (JNIEnv *env, jclass sub); - jboolean (JNICALL *IsAssignableFrom) - (JNIEnv *env, jclass sub, jclass sup); - - jobject (JNICALL *ToReflectedField) - (JNIEnv *env, jclass cls, jfieldID fieldID, jboolean isStatic); - - jint (JNICALL *Throw) - (JNIEnv *env, jthrowable obj); - jint (JNICALL *ThrowNew) - (JNIEnv *env, jclass clazz, const char *msg); - jthrowable (JNICALL *ExceptionOccurred) - (JNIEnv *env); - void (JNICALL *ExceptionDescribe) - (JNIEnv *env); - void (JNICALL *ExceptionClear) - (JNIEnv *env); - void (JNICALL *FatalError) - (JNIEnv *env, const char *msg); - - jint (JNICALL *PushLocalFrame) - (JNIEnv *env, jint capacity); - jobject (JNICALL *PopLocalFrame) - (JNIEnv *env, jobject result); - - jobject (JNICALL *NewGlobalRef) - (JNIEnv *env, jobject lobj); - void (JNICALL *DeleteGlobalRef) - (JNIEnv *env, jobject gref); - void (JNICALL *DeleteLocalRef) - (JNIEnv *env, jobject obj); - jboolean (JNICALL *IsSameObject) - (JNIEnv *env, jobject obj1, jobject obj2); - jobject (JNICALL *NewLocalRef) - (JNIEnv *env, jobject ref); - jint (JNICALL *EnsureLocalCapacity) - (JNIEnv *env, jint capacity); - - jobject (JNICALL *AllocObject) - (JNIEnv *env, jclass clazz); - jobject (JNICALL *NewObject) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jobject (JNICALL *NewObjectV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jobject (JNICALL *NewObjectA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - jclass (JNICALL *GetObjectClass) - (JNIEnv *env, jobject obj); - jboolean (JNICALL *IsInstanceOf) - (JNIEnv *env, jobject obj, jclass clazz); - - jmethodID (JNICALL *GetMethodID) - (JNIEnv *env, jclass clazz, const char *name, const char *sig); - - jobject (JNICALL *CallObjectMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jobject (JNICALL *CallObjectMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jobject (JNICALL *CallObjectMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args); - - jboolean (JNICALL *CallBooleanMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jboolean (JNICALL *CallBooleanMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jboolean (JNICALL *CallBooleanMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args); - - jbyte (JNICALL *CallByteMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jbyte (JNICALL *CallByteMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jbyte (JNICALL *CallByteMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); - - jchar (JNICALL *CallCharMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jchar (JNICALL *CallCharMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jchar (JNICALL *CallCharMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); - - jshort (JNICALL *CallShortMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jshort (JNICALL *CallShortMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jshort (JNICALL *CallShortMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); - - jint (JNICALL *CallIntMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jint (JNICALL *CallIntMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jint (JNICALL *CallIntMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); - - jlong (JNICALL *CallLongMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jlong (JNICALL *CallLongMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jlong (JNICALL *CallLongMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); - - jfloat (JNICALL *CallFloatMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jfloat (JNICALL *CallFloatMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jfloat (JNICALL *CallFloatMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); - - jdouble (JNICALL *CallDoubleMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jdouble (JNICALL *CallDoubleMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jdouble (JNICALL *CallDoubleMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); - - void (JNICALL *CallVoidMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - void (JNICALL *CallVoidMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - void (JNICALL *CallVoidMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args); - - jobject (JNICALL *CallNonvirtualObjectMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jobject (JNICALL *CallNonvirtualObjectMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jobject (JNICALL *CallNonvirtualObjectMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue * args); - - jboolean (JNICALL *CallNonvirtualBooleanMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jboolean (JNICALL *CallNonvirtualBooleanMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jboolean (JNICALL *CallNonvirtualBooleanMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue * args); - - jbyte (JNICALL *CallNonvirtualByteMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jbyte (JNICALL *CallNonvirtualByteMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jbyte (JNICALL *CallNonvirtualByteMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue *args); - - jchar (JNICALL *CallNonvirtualCharMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jchar (JNICALL *CallNonvirtualCharMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jchar (JNICALL *CallNonvirtualCharMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue *args); - - jshort (JNICALL *CallNonvirtualShortMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jshort (JNICALL *CallNonvirtualShortMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jshort (JNICALL *CallNonvirtualShortMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue *args); - - jint (JNICALL *CallNonvirtualIntMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jint (JNICALL *CallNonvirtualIntMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jint (JNICALL *CallNonvirtualIntMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue *args); - - jlong (JNICALL *CallNonvirtualLongMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jlong (JNICALL *CallNonvirtualLongMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jlong (JNICALL *CallNonvirtualLongMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue *args); - - jfloat (JNICALL *CallNonvirtualFloatMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jfloat (JNICALL *CallNonvirtualFloatMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jfloat (JNICALL *CallNonvirtualFloatMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue *args); - - jdouble (JNICALL *CallNonvirtualDoubleMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jdouble (JNICALL *CallNonvirtualDoubleMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jdouble (JNICALL *CallNonvirtualDoubleMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue *args); - - void (JNICALL *CallNonvirtualVoidMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - void (JNICALL *CallNonvirtualVoidMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - void (JNICALL *CallNonvirtualVoidMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue * args); - - jfieldID (JNICALL *GetFieldID) - (JNIEnv *env, jclass clazz, const char *name, const char *sig); - - jobject (JNICALL *GetObjectField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jboolean (JNICALL *GetBooleanField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jbyte (JNICALL *GetByteField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jchar (JNICALL *GetCharField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jshort (JNICALL *GetShortField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jint (JNICALL *GetIntField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jlong (JNICALL *GetLongField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jfloat (JNICALL *GetFloatField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jdouble (JNICALL *GetDoubleField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - - void (JNICALL *SetObjectField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jobject val); - void (JNICALL *SetBooleanField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jboolean val); - void (JNICALL *SetByteField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jbyte val); - void (JNICALL *SetCharField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jchar val); - void (JNICALL *SetShortField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jshort val); - void (JNICALL *SetIntField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jint val); - void (JNICALL *SetLongField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jlong val); - void (JNICALL *SetFloatField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jfloat val); - void (JNICALL *SetDoubleField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jdouble val); - - jmethodID (JNICALL *GetStaticMethodID) - (JNIEnv *env, jclass clazz, const char *name, const char *sig); - - jobject (JNICALL *CallStaticObjectMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jobject (JNICALL *CallStaticObjectMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jobject (JNICALL *CallStaticObjectMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - jboolean (JNICALL *CallStaticBooleanMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jboolean (JNICALL *CallStaticBooleanMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jboolean (JNICALL *CallStaticBooleanMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - jbyte (JNICALL *CallStaticByteMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jbyte (JNICALL *CallStaticByteMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jbyte (JNICALL *CallStaticByteMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - jchar (JNICALL *CallStaticCharMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jchar (JNICALL *CallStaticCharMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jchar (JNICALL *CallStaticCharMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - jshort (JNICALL *CallStaticShortMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jshort (JNICALL *CallStaticShortMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jshort (JNICALL *CallStaticShortMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - jint (JNICALL *CallStaticIntMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jint (JNICALL *CallStaticIntMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jint (JNICALL *CallStaticIntMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - jlong (JNICALL *CallStaticLongMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jlong (JNICALL *CallStaticLongMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jlong (JNICALL *CallStaticLongMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - jfloat (JNICALL *CallStaticFloatMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jfloat (JNICALL *CallStaticFloatMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jfloat (JNICALL *CallStaticFloatMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - jdouble (JNICALL *CallStaticDoubleMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jdouble (JNICALL *CallStaticDoubleMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jdouble (JNICALL *CallStaticDoubleMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - void (JNICALL *CallStaticVoidMethod) - (JNIEnv *env, jclass cls, jmethodID methodID, ...); - void (JNICALL *CallStaticVoidMethodV) - (JNIEnv *env, jclass cls, jmethodID methodID, va_list args); - void (JNICALL *CallStaticVoidMethodA) - (JNIEnv *env, jclass cls, jmethodID methodID, const jvalue * args); - - jfieldID (JNICALL *GetStaticFieldID) - (JNIEnv *env, jclass clazz, const char *name, const char *sig); - jobject (JNICALL *GetStaticObjectField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jboolean (JNICALL *GetStaticBooleanField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jbyte (JNICALL *GetStaticByteField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jchar (JNICALL *GetStaticCharField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jshort (JNICALL *GetStaticShortField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jint (JNICALL *GetStaticIntField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jlong (JNICALL *GetStaticLongField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jfloat (JNICALL *GetStaticFloatField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jdouble (JNICALL *GetStaticDoubleField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - - void (JNICALL *SetStaticObjectField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value); - void (JNICALL *SetStaticBooleanField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value); - void (JNICALL *SetStaticByteField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jbyte value); - void (JNICALL *SetStaticCharField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jchar value); - void (JNICALL *SetStaticShortField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value); - void (JNICALL *SetStaticIntField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jint value); - void (JNICALL *SetStaticLongField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jlong value); - void (JNICALL *SetStaticFloatField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value); - void (JNICALL *SetStaticDoubleField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value); - - jstring (JNICALL *NewString) - (JNIEnv *env, const jchar *unicode, jsize len); - jsize (JNICALL *GetStringLength) - (JNIEnv *env, jstring str); - const jchar *(JNICALL *GetStringChars) - (JNIEnv *env, jstring str, jboolean *isCopy); - void (JNICALL *ReleaseStringChars) - (JNIEnv *env, jstring str, const jchar *chars); - - jstring (JNICALL *NewStringUTF) - (JNIEnv *env, const char *utf); - jsize (JNICALL *GetStringUTFLength) - (JNIEnv *env, jstring str); - const char* (JNICALL *GetStringUTFChars) - (JNIEnv *env, jstring str, jboolean *isCopy); - void (JNICALL *ReleaseStringUTFChars) - (JNIEnv *env, jstring str, const char* chars); - - - jsize (JNICALL *GetArrayLength) - (JNIEnv *env, jarray array); - - jobjectArray (JNICALL *NewObjectArray) - (JNIEnv *env, jsize len, jclass clazz, jobject init); - jobject (JNICALL *GetObjectArrayElement) - (JNIEnv *env, jobjectArray array, jsize index); - void (JNICALL *SetObjectArrayElement) - (JNIEnv *env, jobjectArray array, jsize index, jobject val); - - jbooleanArray (JNICALL *NewBooleanArray) - (JNIEnv *env, jsize len); - jbyteArray (JNICALL *NewByteArray) - (JNIEnv *env, jsize len); - jcharArray (JNICALL *NewCharArray) - (JNIEnv *env, jsize len); - jshortArray (JNICALL *NewShortArray) - (JNIEnv *env, jsize len); - jintArray (JNICALL *NewIntArray) - (JNIEnv *env, jsize len); - jlongArray (JNICALL *NewLongArray) - (JNIEnv *env, jsize len); - jfloatArray (JNICALL *NewFloatArray) - (JNIEnv *env, jsize len); - jdoubleArray (JNICALL *NewDoubleArray) - (JNIEnv *env, jsize len); - - jboolean * (JNICALL *GetBooleanArrayElements) - (JNIEnv *env, jbooleanArray array, jboolean *isCopy); - jbyte * (JNICALL *GetByteArrayElements) - (JNIEnv *env, jbyteArray array, jboolean *isCopy); - jchar * (JNICALL *GetCharArrayElements) - (JNIEnv *env, jcharArray array, jboolean *isCopy); - jshort * (JNICALL *GetShortArrayElements) - (JNIEnv *env, jshortArray array, jboolean *isCopy); - jint * (JNICALL *GetIntArrayElements) - (JNIEnv *env, jintArray array, jboolean *isCopy); - jlong * (JNICALL *GetLongArrayElements) - (JNIEnv *env, jlongArray array, jboolean *isCopy); - jfloat * (JNICALL *GetFloatArrayElements) - (JNIEnv *env, jfloatArray array, jboolean *isCopy); - jdouble * (JNICALL *GetDoubleArrayElements) - (JNIEnv *env, jdoubleArray array, jboolean *isCopy); - - void (JNICALL *ReleaseBooleanArrayElements) - (JNIEnv *env, jbooleanArray array, jboolean *elems, jint mode); - void (JNICALL *ReleaseByteArrayElements) - (JNIEnv *env, jbyteArray array, jbyte *elems, jint mode); - void (JNICALL *ReleaseCharArrayElements) - (JNIEnv *env, jcharArray array, jchar *elems, jint mode); - void (JNICALL *ReleaseShortArrayElements) - (JNIEnv *env, jshortArray array, jshort *elems, jint mode); - void (JNICALL *ReleaseIntArrayElements) - (JNIEnv *env, jintArray array, jint *elems, jint mode); - void (JNICALL *ReleaseLongArrayElements) - (JNIEnv *env, jlongArray array, jlong *elems, jint mode); - void (JNICALL *ReleaseFloatArrayElements) - (JNIEnv *env, jfloatArray array, jfloat *elems, jint mode); - void (JNICALL *ReleaseDoubleArrayElements) - (JNIEnv *env, jdoubleArray array, jdouble *elems, jint mode); - - void (JNICALL *GetBooleanArrayRegion) - (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf); - void (JNICALL *GetByteArrayRegion) - (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf); - void (JNICALL *GetCharArrayRegion) - (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf); - void (JNICALL *GetShortArrayRegion) - (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf); - void (JNICALL *GetIntArrayRegion) - (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf); - void (JNICALL *GetLongArrayRegion) - (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf); - void (JNICALL *GetFloatArrayRegion) - (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf); - void (JNICALL *GetDoubleArrayRegion) - (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf); - - void (JNICALL *SetBooleanArrayRegion) - (JNIEnv *env, jbooleanArray array, jsize start, jsize l, const jboolean *buf); - void (JNICALL *SetByteArrayRegion) - (JNIEnv *env, jbyteArray array, jsize start, jsize len, const jbyte *buf); - void (JNICALL *SetCharArrayRegion) - (JNIEnv *env, jcharArray array, jsize start, jsize len, const jchar *buf); - void (JNICALL *SetShortArrayRegion) - (JNIEnv *env, jshortArray array, jsize start, jsize len, const jshort *buf); - void (JNICALL *SetIntArrayRegion) - (JNIEnv *env, jintArray array, jsize start, jsize len, const jint *buf); - void (JNICALL *SetLongArrayRegion) - (JNIEnv *env, jlongArray array, jsize start, jsize len, const jlong *buf); - void (JNICALL *SetFloatArrayRegion) - (JNIEnv *env, jfloatArray array, jsize start, jsize len, const jfloat *buf); - void (JNICALL *SetDoubleArrayRegion) - (JNIEnv *env, jdoubleArray array, jsize start, jsize len, const jdouble *buf); - - jint (JNICALL *RegisterNatives) - (JNIEnv *env, jclass clazz, const JNINativeMethod *methods, - jint nMethods); - jint (JNICALL *UnregisterNatives) - (JNIEnv *env, jclass clazz); - - jint (JNICALL *MonitorEnter) - (JNIEnv *env, jobject obj); - jint (JNICALL *MonitorExit) - (JNIEnv *env, jobject obj); - - jint (JNICALL *GetJavaVM) - (JNIEnv *env, JavaVM **vm); - - void (JNICALL *GetStringRegion) - (JNIEnv *env, jstring str, jsize start, jsize len, jchar *buf); - void (JNICALL *GetStringUTFRegion) - (JNIEnv *env, jstring str, jsize start, jsize len, char *buf); - - void * (JNICALL *GetPrimitiveArrayCritical) - (JNIEnv *env, jarray array, jboolean *isCopy); - void (JNICALL *ReleasePrimitiveArrayCritical) - (JNIEnv *env, jarray array, void *carray, jint mode); - - const jchar * (JNICALL *GetStringCritical) - (JNIEnv *env, jstring string, jboolean *isCopy); - void (JNICALL *ReleaseStringCritical) - (JNIEnv *env, jstring string, const jchar *cstring); - - jweak (JNICALL *NewWeakGlobalRef) - (JNIEnv *env, jobject obj); - void (JNICALL *DeleteWeakGlobalRef) - (JNIEnv *env, jweak ref); - - jboolean (JNICALL *ExceptionCheck) - (JNIEnv *env); - - jobject (JNICALL *NewDirectByteBuffer) - (JNIEnv* env, void* address, jlong capacity); - void* (JNICALL *GetDirectBufferAddress) - (JNIEnv* env, jobject buf); - jlong (JNICALL *GetDirectBufferCapacity) - (JNIEnv* env, jobject buf); - - /* New JNI 1.6 Features */ - - jobjectRefType (JNICALL *GetObjectRefType) - (JNIEnv* env, jobject obj); - - #if TARGET_RT_MAC_CFM && defined(__ppc__) - void* real_functions[228]; - #endif /* TARGET_RT_MAC_CFM && defined(__ppc__) */ -}; - -/* - * We use inlined functions for C++ so that programmers can write: - * - * env->FindClass("java/lang/String") - * - * in C++ rather than: - * - * (*env)->FindClass(env, "java/lang/String") - * - * in C. - */ - -struct JNIEnv_ { - const struct JNINativeInterface_ *functions; -#ifdef __cplusplus - - jint GetVersion() { - return functions->GetVersion(this); - } - jclass DefineClass(const char *name, jobject loader, const jbyte *buf, - jsize len) { - return functions->DefineClass(this, name, loader, buf, len); - } - jclass FindClass(const char *name) { - return functions->FindClass(this, name); - } - jmethodID FromReflectedMethod(jobject method) { - return functions->FromReflectedMethod(this,method); - } - jfieldID FromReflectedField(jobject field) { - return functions->FromReflectedField(this,field); - } - - jobject ToReflectedMethod(jclass cls, jmethodID methodID, jboolean isStatic) { - return functions->ToReflectedMethod(this, cls, methodID, isStatic); - } - - jclass GetSuperclass(jclass sub) { - return functions->GetSuperclass(this, sub); - } - jboolean IsAssignableFrom(jclass sub, jclass sup) { - return functions->IsAssignableFrom(this, sub, sup); - } - - jobject ToReflectedField(jclass cls, jfieldID fieldID, jboolean isStatic) { - return functions->ToReflectedField(this,cls,fieldID,isStatic); - } - - jint Throw(jthrowable obj) { - return functions->Throw(this, obj); - } - jint ThrowNew(jclass clazz, const char *msg) { - return functions->ThrowNew(this, clazz, msg); - } - jthrowable ExceptionOccurred() { - return functions->ExceptionOccurred(this); - } - void ExceptionDescribe() { - functions->ExceptionDescribe(this); - } - void ExceptionClear() { - functions->ExceptionClear(this); - } - void FatalError(const char *msg) { - functions->FatalError(this, msg); - } - - jint PushLocalFrame(jint capacity) { - return functions->PushLocalFrame(this,capacity); - } - jobject PopLocalFrame(jobject result) { - return functions->PopLocalFrame(this,result); - } - - jobject NewGlobalRef(jobject lobj) { - return functions->NewGlobalRef(this,lobj); - } - void DeleteGlobalRef(jobject gref) { - functions->DeleteGlobalRef(this,gref); - } - void DeleteLocalRef(jobject obj) { - functions->DeleteLocalRef(this, obj); - } - - jboolean IsSameObject(jobject obj1, jobject obj2) { - return functions->IsSameObject(this,obj1,obj2); - } - - jobject NewLocalRef(jobject ref) { - return functions->NewLocalRef(this,ref); - } - jint EnsureLocalCapacity(jint capacity) { - return functions->EnsureLocalCapacity(this,capacity); - } - - jobject AllocObject(jclass clazz) { - return functions->AllocObject(this,clazz); - } - jobject NewObject(jclass clazz, jmethodID methodID, ...) { - va_list args; - jobject result; - va_start(args, methodID); - result = functions->NewObjectV(this,clazz,methodID,args); - va_end(args); - return result; - } - jobject NewObjectV(jclass clazz, jmethodID methodID, - va_list args) { - return functions->NewObjectV(this,clazz,methodID,args); - } - jobject NewObjectA(jclass clazz, jmethodID methodID, - const jvalue *args) { - return functions->NewObjectA(this,clazz,methodID,args); - } - - jclass GetObjectClass(jobject obj) { - return functions->GetObjectClass(this,obj); - } - jboolean IsInstanceOf(jobject obj, jclass clazz) { - return functions->IsInstanceOf(this,obj,clazz); - } - - jmethodID GetMethodID(jclass clazz, const char *name, - const char *sig) { - return functions->GetMethodID(this,clazz,name,sig); - } - - jobject CallObjectMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jobject result; - va_start(args,methodID); - result = functions->CallObjectMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jobject CallObjectMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallObjectMethodV(this,obj,methodID,args); - } - jobject CallObjectMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - return functions->CallObjectMethodA(this,obj,methodID,args); - } - - jboolean CallBooleanMethod(jobject obj, - jmethodID methodID, ...) { - va_list args; - jboolean result; - va_start(args,methodID); - result = functions->CallBooleanMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jboolean CallBooleanMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallBooleanMethodV(this,obj,methodID,args); - } - jboolean CallBooleanMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - return functions->CallBooleanMethodA(this,obj,methodID, args); - } - - jbyte CallByteMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jbyte result; - va_start(args,methodID); - result = functions->CallByteMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jbyte CallByteMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallByteMethodV(this,obj,methodID,args); - } - jbyte CallByteMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - return functions->CallByteMethodA(this,obj,methodID,args); - } - - jchar CallCharMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jchar result; - va_start(args,methodID); - result = functions->CallCharMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jchar CallCharMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallCharMethodV(this,obj,methodID,args); - } - jchar CallCharMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - return functions->CallCharMethodA(this,obj,methodID,args); - } - - jshort CallShortMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jshort result; - va_start(args,methodID); - result = functions->CallShortMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jshort CallShortMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallShortMethodV(this,obj,methodID,args); - } - jshort CallShortMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - return functions->CallShortMethodA(this,obj,methodID,args); - } - - jint CallIntMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jint result; - va_start(args,methodID); - result = functions->CallIntMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jint CallIntMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallIntMethodV(this,obj,methodID,args); - } - jint CallIntMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - return functions->CallIntMethodA(this,obj,methodID,args); - } - - jlong CallLongMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jlong result; - va_start(args,methodID); - result = functions->CallLongMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jlong CallLongMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallLongMethodV(this,obj,methodID,args); - } - jlong CallLongMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - return functions->CallLongMethodA(this,obj,methodID,args); - } - - jfloat CallFloatMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jfloat result; - va_start(args,methodID); - result = functions->CallFloatMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jfloat CallFloatMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallFloatMethodV(this,obj,methodID,args); - } - jfloat CallFloatMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - return functions->CallFloatMethodA(this,obj,methodID,args); - } - - jdouble CallDoubleMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jdouble result; - va_start(args,methodID); - result = functions->CallDoubleMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jdouble CallDoubleMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallDoubleMethodV(this,obj,methodID,args); - } - jdouble CallDoubleMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - return functions->CallDoubleMethodA(this,obj,methodID,args); - } - - void CallVoidMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - va_start(args,methodID); - functions->CallVoidMethodV(this,obj,methodID,args); - va_end(args); - } - void CallVoidMethodV(jobject obj, jmethodID methodID, - va_list args) { - functions->CallVoidMethodV(this,obj,methodID,args); - } - void CallVoidMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - functions->CallVoidMethodA(this,obj,methodID,args); - } - - jobject CallNonvirtualObjectMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jobject result; - va_start(args,methodID); - result = functions->CallNonvirtualObjectMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jobject CallNonvirtualObjectMethodV(jobject obj, jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallNonvirtualObjectMethodV(this,obj,clazz, - methodID,args); - } - jobject CallNonvirtualObjectMethodA(jobject obj, jclass clazz, - jmethodID methodID, const jvalue * args) { - return functions->CallNonvirtualObjectMethodA(this,obj,clazz, - methodID,args); - } - - jboolean CallNonvirtualBooleanMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jboolean result; - va_start(args,methodID); - result = functions->CallNonvirtualBooleanMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jboolean CallNonvirtualBooleanMethodV(jobject obj, jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallNonvirtualBooleanMethodV(this,obj,clazz, - methodID,args); - } - jboolean CallNonvirtualBooleanMethodA(jobject obj, jclass clazz, - jmethodID methodID, const jvalue * args) { - return functions->CallNonvirtualBooleanMethodA(this,obj,clazz, - methodID, args); - } - - jbyte CallNonvirtualByteMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jbyte result; - va_start(args,methodID); - result = functions->CallNonvirtualByteMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jbyte CallNonvirtualByteMethodV(jobject obj, jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallNonvirtualByteMethodV(this,obj,clazz, - methodID,args); - } - jbyte CallNonvirtualByteMethodA(jobject obj, jclass clazz, - jmethodID methodID, const jvalue * args) { - return functions->CallNonvirtualByteMethodA(this,obj,clazz, - methodID,args); - } - - jchar CallNonvirtualCharMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jchar result; - va_start(args,methodID); - result = functions->CallNonvirtualCharMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jchar CallNonvirtualCharMethodV(jobject obj, jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallNonvirtualCharMethodV(this,obj,clazz, - methodID,args); - } - jchar CallNonvirtualCharMethodA(jobject obj, jclass clazz, - jmethodID methodID, const jvalue * args) { - return functions->CallNonvirtualCharMethodA(this,obj,clazz, - methodID,args); - } - - jshort CallNonvirtualShortMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jshort result; - va_start(args,methodID); - result = functions->CallNonvirtualShortMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jshort CallNonvirtualShortMethodV(jobject obj, jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallNonvirtualShortMethodV(this,obj,clazz, - methodID,args); - } - jshort CallNonvirtualShortMethodA(jobject obj, jclass clazz, - jmethodID methodID, const jvalue * args) { - return functions->CallNonvirtualShortMethodA(this,obj,clazz, - methodID,args); - } - - jint CallNonvirtualIntMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jint result; - va_start(args,methodID); - result = functions->CallNonvirtualIntMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jint CallNonvirtualIntMethodV(jobject obj, jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallNonvirtualIntMethodV(this,obj,clazz, - methodID,args); - } - jint CallNonvirtualIntMethodA(jobject obj, jclass clazz, - jmethodID methodID, const jvalue * args) { - return functions->CallNonvirtualIntMethodA(this,obj,clazz, - methodID,args); - } - - jlong CallNonvirtualLongMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jlong result; - va_start(args,methodID); - result = functions->CallNonvirtualLongMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jlong CallNonvirtualLongMethodV(jobject obj, jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallNonvirtualLongMethodV(this,obj,clazz, - methodID,args); - } - jlong CallNonvirtualLongMethodA(jobject obj, jclass clazz, - jmethodID methodID, const jvalue * args) { - return functions->CallNonvirtualLongMethodA(this,obj,clazz, - methodID,args); - } - - jfloat CallNonvirtualFloatMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jfloat result; - va_start(args,methodID); - result = functions->CallNonvirtualFloatMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jfloat CallNonvirtualFloatMethodV(jobject obj, jclass clazz, - jmethodID methodID, - va_list args) { - return functions->CallNonvirtualFloatMethodV(this,obj,clazz, - methodID,args); - } - jfloat CallNonvirtualFloatMethodA(jobject obj, jclass clazz, - jmethodID methodID, - const jvalue * args) { - return functions->CallNonvirtualFloatMethodA(this,obj,clazz, - methodID,args); - } - - jdouble CallNonvirtualDoubleMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jdouble result; - va_start(args,methodID); - result = functions->CallNonvirtualDoubleMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jdouble CallNonvirtualDoubleMethodV(jobject obj, jclass clazz, - jmethodID methodID, - va_list args) { - return functions->CallNonvirtualDoubleMethodV(this,obj,clazz, - methodID,args); - } - jdouble CallNonvirtualDoubleMethodA(jobject obj, jclass clazz, - jmethodID methodID, - const jvalue * args) { - return functions->CallNonvirtualDoubleMethodA(this,obj,clazz, - methodID,args); - } - - void CallNonvirtualVoidMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - va_start(args,methodID); - functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args); - va_end(args); - } - void CallNonvirtualVoidMethodV(jobject obj, jclass clazz, - jmethodID methodID, - va_list args) { - functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args); - } - void CallNonvirtualVoidMethodA(jobject obj, jclass clazz, - jmethodID methodID, - const jvalue * args) { - functions->CallNonvirtualVoidMethodA(this,obj,clazz,methodID,args); - } - - jfieldID GetFieldID(jclass clazz, const char *name, - const char *sig) { - return functions->GetFieldID(this,clazz,name,sig); - } - - jobject GetObjectField(jobject obj, jfieldID fieldID) { - return functions->GetObjectField(this,obj,fieldID); - } - jboolean GetBooleanField(jobject obj, jfieldID fieldID) { - return functions->GetBooleanField(this,obj,fieldID); - } - jbyte GetByteField(jobject obj, jfieldID fieldID) { - return functions->GetByteField(this,obj,fieldID); - } - jchar GetCharField(jobject obj, jfieldID fieldID) { - return functions->GetCharField(this,obj,fieldID); - } - jshort GetShortField(jobject obj, jfieldID fieldID) { - return functions->GetShortField(this,obj,fieldID); - } - jint GetIntField(jobject obj, jfieldID fieldID) { - return functions->GetIntField(this,obj,fieldID); - } - jlong GetLongField(jobject obj, jfieldID fieldID) { - return functions->GetLongField(this,obj,fieldID); - } - jfloat GetFloatField(jobject obj, jfieldID fieldID) { - return functions->GetFloatField(this,obj,fieldID); - } - jdouble GetDoubleField(jobject obj, jfieldID fieldID) { - return functions->GetDoubleField(this,obj,fieldID); - } - - void SetObjectField(jobject obj, jfieldID fieldID, jobject val) { - functions->SetObjectField(this,obj,fieldID,val); - } - void SetBooleanField(jobject obj, jfieldID fieldID, - jboolean val) { - functions->SetBooleanField(this,obj,fieldID,val); - } - void SetByteField(jobject obj, jfieldID fieldID, - jbyte val) { - functions->SetByteField(this,obj,fieldID,val); - } - void SetCharField(jobject obj, jfieldID fieldID, - jchar val) { - functions->SetCharField(this,obj,fieldID,val); - } - void SetShortField(jobject obj, jfieldID fieldID, - jshort val) { - functions->SetShortField(this,obj,fieldID,val); - } - void SetIntField(jobject obj, jfieldID fieldID, - jint val) { - functions->SetIntField(this,obj,fieldID,val); - } - void SetLongField(jobject obj, jfieldID fieldID, - jlong val) { - functions->SetLongField(this,obj,fieldID,val); - } - void SetFloatField(jobject obj, jfieldID fieldID, - jfloat val) { - functions->SetFloatField(this,obj,fieldID,val); - } - void SetDoubleField(jobject obj, jfieldID fieldID, - jdouble val) { - functions->SetDoubleField(this,obj,fieldID,val); - } - - jmethodID GetStaticMethodID(jclass clazz, const char *name, - const char *sig) { - return functions->GetStaticMethodID(this,clazz,name,sig); - } - - jobject CallStaticObjectMethod(jclass clazz, jmethodID methodID, - ...) { - va_list args; - jobject result; - va_start(args,methodID); - result = functions->CallStaticObjectMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jobject CallStaticObjectMethodV(jclass clazz, jmethodID methodID, - va_list args) { - return functions->CallStaticObjectMethodV(this,clazz,methodID,args); - } - jobject CallStaticObjectMethodA(jclass clazz, jmethodID methodID, - const jvalue *args) { - return functions->CallStaticObjectMethodA(this,clazz,methodID,args); - } - - jboolean CallStaticBooleanMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jboolean result; - va_start(args,methodID); - result = functions->CallStaticBooleanMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jboolean CallStaticBooleanMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticBooleanMethodV(this,clazz,methodID,args); - } - jboolean CallStaticBooleanMethodA(jclass clazz, - jmethodID methodID, const jvalue *args) { - return functions->CallStaticBooleanMethodA(this,clazz,methodID,args); - } - - jbyte CallStaticByteMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jbyte result; - va_start(args,methodID); - result = functions->CallStaticByteMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jbyte CallStaticByteMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticByteMethodV(this,clazz,methodID,args); - } - jbyte CallStaticByteMethodA(jclass clazz, - jmethodID methodID, const jvalue *args) { - return functions->CallStaticByteMethodA(this,clazz,methodID,args); - } - - jchar CallStaticCharMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jchar result; - va_start(args,methodID); - result = functions->CallStaticCharMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jchar CallStaticCharMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticCharMethodV(this,clazz,methodID,args); - } - jchar CallStaticCharMethodA(jclass clazz, - jmethodID methodID, const jvalue *args) { - return functions->CallStaticCharMethodA(this,clazz,methodID,args); - } - - jshort CallStaticShortMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jshort result; - va_start(args,methodID); - result = functions->CallStaticShortMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jshort CallStaticShortMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticShortMethodV(this,clazz,methodID,args); - } - jshort CallStaticShortMethodA(jclass clazz, - jmethodID methodID, const jvalue *args) { - return functions->CallStaticShortMethodA(this,clazz,methodID,args); - } - - jint CallStaticIntMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jint result; - va_start(args,methodID); - result = functions->CallStaticIntMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jint CallStaticIntMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticIntMethodV(this,clazz,methodID,args); - } - jint CallStaticIntMethodA(jclass clazz, - jmethodID methodID, const jvalue *args) { - return functions->CallStaticIntMethodA(this,clazz,methodID,args); - } - - jlong CallStaticLongMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jlong result; - va_start(args,methodID); - result = functions->CallStaticLongMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jlong CallStaticLongMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticLongMethodV(this,clazz,methodID,args); - } - jlong CallStaticLongMethodA(jclass clazz, - jmethodID methodID, const jvalue *args) { - return functions->CallStaticLongMethodA(this,clazz,methodID,args); - } - - jfloat CallStaticFloatMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jfloat result; - va_start(args,methodID); - result = functions->CallStaticFloatMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jfloat CallStaticFloatMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticFloatMethodV(this,clazz,methodID,args); - } - jfloat CallStaticFloatMethodA(jclass clazz, - jmethodID methodID, const jvalue *args) { - return functions->CallStaticFloatMethodA(this,clazz,methodID,args); - } - - jdouble CallStaticDoubleMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jdouble result; - va_start(args,methodID); - result = functions->CallStaticDoubleMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jdouble CallStaticDoubleMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticDoubleMethodV(this,clazz,methodID,args); - } - jdouble CallStaticDoubleMethodA(jclass clazz, - jmethodID methodID, const jvalue *args) { - return functions->CallStaticDoubleMethodA(this,clazz,methodID,args); - } - - void CallStaticVoidMethod(jclass cls, jmethodID methodID, ...) { - va_list args; - va_start(args,methodID); - functions->CallStaticVoidMethodV(this,cls,methodID,args); - va_end(args); - } - void CallStaticVoidMethodV(jclass cls, jmethodID methodID, - va_list args) { - functions->CallStaticVoidMethodV(this,cls,methodID,args); - } - void CallStaticVoidMethodA(jclass cls, jmethodID methodID, - const jvalue * args) { - functions->CallStaticVoidMethodA(this,cls,methodID,args); - } - - jfieldID GetStaticFieldID(jclass clazz, const char *name, - const char *sig) { - return functions->GetStaticFieldID(this,clazz,name,sig); - } - jobject GetStaticObjectField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticObjectField(this,clazz,fieldID); - } - jboolean GetStaticBooleanField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticBooleanField(this,clazz,fieldID); - } - jbyte GetStaticByteField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticByteField(this,clazz,fieldID); - } - jchar GetStaticCharField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticCharField(this,clazz,fieldID); - } - jshort GetStaticShortField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticShortField(this,clazz,fieldID); - } - jint GetStaticIntField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticIntField(this,clazz,fieldID); - } - jlong GetStaticLongField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticLongField(this,clazz,fieldID); - } - jfloat GetStaticFloatField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticFloatField(this,clazz,fieldID); - } - jdouble GetStaticDoubleField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticDoubleField(this,clazz,fieldID); - } - - void SetStaticObjectField(jclass clazz, jfieldID fieldID, - jobject value) { - functions->SetStaticObjectField(this,clazz,fieldID,value); - } - void SetStaticBooleanField(jclass clazz, jfieldID fieldID, - jboolean value) { - functions->SetStaticBooleanField(this,clazz,fieldID,value); - } - void SetStaticByteField(jclass clazz, jfieldID fieldID, - jbyte value) { - functions->SetStaticByteField(this,clazz,fieldID,value); - } - void SetStaticCharField(jclass clazz, jfieldID fieldID, - jchar value) { - functions->SetStaticCharField(this,clazz,fieldID,value); - } - void SetStaticShortField(jclass clazz, jfieldID fieldID, - jshort value) { - functions->SetStaticShortField(this,clazz,fieldID,value); - } - void SetStaticIntField(jclass clazz, jfieldID fieldID, - jint value) { - functions->SetStaticIntField(this,clazz,fieldID,value); - } - void SetStaticLongField(jclass clazz, jfieldID fieldID, - jlong value) { - functions->SetStaticLongField(this,clazz,fieldID,value); - } - void SetStaticFloatField(jclass clazz, jfieldID fieldID, - jfloat value) { - functions->SetStaticFloatField(this,clazz,fieldID,value); - } - void SetStaticDoubleField(jclass clazz, jfieldID fieldID, - jdouble value) { - functions->SetStaticDoubleField(this,clazz,fieldID,value); - } - - jstring NewString(const jchar *unicode, jsize len) { - return functions->NewString(this,unicode,len); - } - jsize GetStringLength(jstring str) { - return functions->GetStringLength(this,str); - } - const jchar *GetStringChars(jstring str, jboolean *isCopy) { - return functions->GetStringChars(this,str,isCopy); - } - void ReleaseStringChars(jstring str, const jchar *chars) { - functions->ReleaseStringChars(this,str,chars); - } - - jstring NewStringUTF(const char *utf) { - return functions->NewStringUTF(this,utf); - } - jsize GetStringUTFLength(jstring str) { - return functions->GetStringUTFLength(this,str); - } - const char* GetStringUTFChars(jstring str, jboolean *isCopy) { - return functions->GetStringUTFChars(this,str,isCopy); - } - void ReleaseStringUTFChars(jstring str, const char* chars) { - functions->ReleaseStringUTFChars(this,str,chars); - } - - jsize GetArrayLength(jarray array) { - return functions->GetArrayLength(this,array); - } - - jobjectArray NewObjectArray(jsize len, jclass clazz, - jobject init) { - return functions->NewObjectArray(this,len,clazz,init); - } - jobject GetObjectArrayElement(jobjectArray array, jsize index) { - return functions->GetObjectArrayElement(this,array,index); - } - void SetObjectArrayElement(jobjectArray array, jsize index, - jobject val) { - functions->SetObjectArrayElement(this,array,index,val); - } - - jbooleanArray NewBooleanArray(jsize len) { - return functions->NewBooleanArray(this,len); - } - jbyteArray NewByteArray(jsize len) { - return functions->NewByteArray(this,len); - } - jcharArray NewCharArray(jsize len) { - return functions->NewCharArray(this,len); - } - jshortArray NewShortArray(jsize len) { - return functions->NewShortArray(this,len); - } - jintArray NewIntArray(jsi... [truncated message content] |
From: <yan...@us...> - 2008-08-01 14:38:09
|
Revision: 918 http://assorted.svn.sourceforge.net/assorted/?rev=918&view=rev Author: yangzhang Date: 2008-08-01 14:38:17 +0000 (Fri, 01 Aug 2008) Log Message: ----------- added running to makefile too Modified Paths: -------------- sandbox/trunk/src/java/java-from-c/Makefile Modified: sandbox/trunk/src/java/java-from-c/Makefile =================================================================== --- sandbox/trunk/src/java/java-from-c/Makefile 2008-08-01 05:29:24 UTC (rev 917) +++ sandbox/trunk/src/java/java-from-c/Makefile 2008-08-01 14:38:17 UTC (rev 918) @@ -1,7 +1,12 @@ CPATH := /usr/lib/jvm/java-6-openjdk/include:/usr/lib/jvm/java-6-openjdk/include/linux +LIBRARY_PATH := /usr/lib/jvm/java-6-openjdk/jre/lib:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/jli:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/jli:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/jli:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/jli:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server +LD_LIBRARY_PATH := $(LIBRARY_PATH):. +all: test + ./test + test: JniTest.h jnitest.cpp libjnitest.so - g++ -g3 -o test jnitest.cpp librealjnitest.so + g++ -g3 -o test jnitest.cpp librealjnitest.so -ljava libjnitest.so: librealjnitest.so g++ -g3 -shared -fPIC -o libjnitest.so librealjnitest.so This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-08-01 05:29:14
|
Revision: 917 http://assorted.svn.sourceforge.net/assorted/?rev=917&view=rev Author: yangzhang Date: 2008-08-01 05:29:24 +0000 (Fri, 01 Aug 2008) Log Message: ----------- posting before asking for support Modified Paths: -------------- sandbox/trunk/src/java/java-from-c/Makefile sandbox/trunk/src/java/java-from-c/jnilib.cpp sandbox/trunk/src/java/java-from-c/jnitest.cpp Added Paths: ----------- sandbox/trunk/src/java/java-from-c/Makefile.osx Modified: sandbox/trunk/src/java/java-from-c/Makefile =================================================================== --- sandbox/trunk/src/java/java-from-c/Makefile 2008-08-01 05:08:51 UTC (rev 916) +++ sandbox/trunk/src/java/java-from-c/Makefile 2008-08-01 05:29:24 UTC (rev 917) @@ -1,13 +1,14 @@ -test: JniTest.h jnitest.cpp libjnitest.jnilib - g++ -g3 -arch x86_64 -o test -I. -framework JavaVM jnitest.cpp libjnitest.dylib +CPATH := /usr/lib/jvm/java-6-openjdk/include:/usr/lib/jvm/java-6-openjdk/include/linux -libjnitest.jnilib: libjnitest.dylib - g++ -bundle -g3 -arch x86_64 -o libjnitest.jnilib -I. -framework JavaVM libjnitest.dylib +test: JniTest.h jnitest.cpp libjnitest.so + g++ -g3 -o test jnitest.cpp librealjnitest.so -libjnitest.dylib: jnilib.cpp JniTest.h - g++ -g3 -arch x86_64 -I. -dynamiclib -undefined dynamic_lookup -single_module \ - -o libjnitest.dylib -framework JavaVM jnilib.cpp +libjnitest.so: librealjnitest.so + g++ -g3 -shared -fPIC -o libjnitest.so librealjnitest.so +librealjnitest.so: jnilib.cpp JniTest.h + g++ -g3 -shared -fPIC -o librealjnitest.so jnilib.cpp + JniTest.h: JniTest.class javah JniTest @@ -17,5 +18,5 @@ .PHONY: clean clean: - $(RM) test test.dSYM JniTest.h *.jnilib *.dylib + rm -f test JniTest.h *.so Copied: sandbox/trunk/src/java/java-from-c/Makefile.osx (from rev 916, sandbox/trunk/src/java/java-from-c/Makefile) =================================================================== --- sandbox/trunk/src/java/java-from-c/Makefile.osx (rev 0) +++ sandbox/trunk/src/java/java-from-c/Makefile.osx 2008-08-01 05:29:24 UTC (rev 917) @@ -0,0 +1,21 @@ +test: JniTest.h jnitest.cpp libjnitest.jnilib + g++ -g3 -arch x86_64 -o test -I. -framework JavaVM jnitest.cpp libjnitest.dylib + +libjnitest.jnilib: libjnitest.dylib + g++ -bundle -g3 -arch x86_64 -o libjnitest.jnilib -I. -framework JavaVM libjnitest.dylib + +libjnitest.dylib: jnilib.cpp JniTest.h + g++ -g3 -arch x86_64 -I. -dynamiclib -undefined dynamic_lookup -single_module \ + -o libjnitest.dylib -framework JavaVM jnilib.cpp + +JniTest.h: JniTest.class + javah JniTest + +JniTest.class: JniTest.java + javac JniTest.java + +.PHONY: clean + +clean: + $(RM) test test.dSYM JniTest.h *.jnilib *.dylib + Modified: sandbox/trunk/src/java/java-from-c/jnilib.cpp =================================================================== --- sandbox/trunk/src/java/java-from-c/jnilib.cpp 2008-08-01 05:08:51 UTC (rev 916) +++ sandbox/trunk/src/java/java-from-c/jnilib.cpp 2008-08-01 05:29:24 UTC (rev 917) @@ -11,4 +11,5 @@ cout << "native: " << x << endl; cout.flush(); } -} \ No newline at end of file +} + Modified: sandbox/trunk/src/java/java-from-c/jnitest.cpp =================================================================== --- sandbox/trunk/src/java/java-from-c/jnitest.cpp 2008-08-01 05:08:51 UTC (rev 916) +++ sandbox/trunk/src/java/java-from-c/jnitest.cpp 2008-08-01 05:29:24 UTC (rev 917) @@ -3,21 +3,22 @@ #include <iostream> #include <jni.h> #include <cassert> + using namespace std; int main(int argc, char* argv[]) { - + Java_JniTest_printNativeValue(NULL, NULL, 5); - + JavaVMOption options[2]; JavaVMInitArgs vm_args; JavaVM *jvm; JNIEnv *env; long status; - options[0].optionString = "-Djava.class.path=."; - options[1].optionString = "-verbose:jni"; - //options[2].optionString = "-Xverbose:class"; + options[0].optionString = strdup("-Djava.class.path=."); + options[1].optionString = strdup("-verbose:jni"); + //options[2].optionString = strdup("-Xverbose:class"); memset(&vm_args, 0, sizeof(vm_args)); vm_args.version = JNI_VERSION_1_6; @@ -30,10 +31,10 @@ fprintf(stderr, "Error creating VM\n"); return 1; } - + jclass class_JniTest; jint value; - + jthrowable e; class_JniTest = env->FindClass("JniTest"); e = env->ExceptionOccurred(); @@ -44,8 +45,8 @@ else{ cout<<"Found class\n"; } - - + + assert(class_JniTest != NULL); jmethodID id_print = env->GetMethodID(class_JniTest, "printValue", "(I)V"); e = env->ExceptionOccurred(); @@ -66,11 +67,12 @@ cout<<"Found method 2\n"; } jobject obj = env->NewObject(class_JniTest, id_construct); - for (int i = 0; i < 100000; i++) + for (int i = 0; i < 100000; i++) env->CallVoidMethod(obj, id_print, i); - + cout << "This is some output." << endl; - + jvm->DestroyJavaVM(); return 0; -} \ No newline at end of file +} + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-08-01 05:08:41
|
Revision: 916 http://assorted.svn.sourceforge.net/assorted/?rev=916&view=rev Author: yangzhang Date: 2008-08-01 05:08:51 +0000 (Fri, 01 Aug 2008) Log Message: ----------- John Hugg's OS X-buildable demo of going into Java from C/JNI Added Paths: ----------- sandbox/trunk/src/java/java-from-c/ sandbox/trunk/src/java/java-from-c/JniTest.java sandbox/trunk/src/java/java-from-c/Makefile sandbox/trunk/src/java/java-from-c/README sandbox/trunk/src/java/java-from-c/jni.h sandbox/trunk/src/java/java-from-c/jni_md.h sandbox/trunk/src/java/java-from-c/jnilib.cpp sandbox/trunk/src/java/java-from-c/jnitest.cpp Added: sandbox/trunk/src/java/java-from-c/JniTest.java =================================================================== --- sandbox/trunk/src/java/java-from-c/JniTest.java (rev 0) +++ sandbox/trunk/src/java/java-from-c/JniTest.java 2008-08-01 05:08:51 UTC (rev 916) @@ -0,0 +1,13 @@ +public class JniTest { + static { + System.loadLibrary("jnitest"); + } + JniTest() { + + } + public void printValue(int value) { + //System.out.println(String.valueOf(value)); + printNativeValue(value+1); + } + public native void printNativeValue(int value); +} \ No newline at end of file Added: sandbox/trunk/src/java/java-from-c/Makefile =================================================================== --- sandbox/trunk/src/java/java-from-c/Makefile (rev 0) +++ sandbox/trunk/src/java/java-from-c/Makefile 2008-08-01 05:08:51 UTC (rev 916) @@ -0,0 +1,21 @@ +test: JniTest.h jnitest.cpp libjnitest.jnilib + g++ -g3 -arch x86_64 -o test -I. -framework JavaVM jnitest.cpp libjnitest.dylib + +libjnitest.jnilib: libjnitest.dylib + g++ -bundle -g3 -arch x86_64 -o libjnitest.jnilib -I. -framework JavaVM libjnitest.dylib + +libjnitest.dylib: jnilib.cpp JniTest.h + g++ -g3 -arch x86_64 -I. -dynamiclib -undefined dynamic_lookup -single_module \ + -o libjnitest.dylib -framework JavaVM jnilib.cpp + +JniTest.h: JniTest.class + javah JniTest + +JniTest.class: JniTest.java + javac JniTest.java + +.PHONY: clean + +clean: + $(RM) test test.dSYM JniTest.h *.jnilib *.dylib + Added: sandbox/trunk/src/java/java-from-c/README =================================================================== --- sandbox/trunk/src/java/java-from-c/README (rev 0) +++ sandbox/trunk/src/java/java-from-c/README 2008-08-01 05:08:51 UTC (rev 916) @@ -0,0 +1,2 @@ +John Hugg's demo of going into Java from C/JNI. This is useful for +profiling/debugging JNI. The original source is buildable on OS X. Added: sandbox/trunk/src/java/java-from-c/jni.h =================================================================== --- sandbox/trunk/src/java/java-from-c/jni.h (rev 0) +++ sandbox/trunk/src/java/java-from-c/jni.h 2008-08-01 05:08:51 UTC (rev 916) @@ -0,0 +1,1961 @@ +/* + * @(#)jni.h 1.62 06/02/02 + * + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +/* + * We used part of Netscape's Java Runtime Interface (JRI) as the starting + * point of our design and implementation. + */ + +/****************************************************************************** + * Java Runtime Interface + * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved. + *****************************************************************************/ + +#ifndef _JAVASOFT_JNI_H_ +#define _JAVASOFT_JNI_H_ + +#include <stdio.h> +#include <stdarg.h> + +/* jni_md.h contains the machine-dependent typedefs for jbyte, jint + and jlong */ + +#include "jni_md.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * JNI Types + */ + +#ifndef JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H + +typedef unsigned char jboolean; +typedef unsigned short jchar; +typedef short jshort; +typedef float jfloat; +typedef double jdouble; + +typedef jint jsize; + +#ifdef __cplusplus + +class _jobject {}; +class _jclass : public _jobject {}; +class _jthrowable : public _jobject {}; +class _jstring : public _jobject {}; +class _jarray : public _jobject {}; +class _jbooleanArray : public _jarray {}; +class _jbyteArray : public _jarray {}; +class _jcharArray : public _jarray {}; +class _jshortArray : public _jarray {}; +class _jintArray : public _jarray {}; +class _jlongArray : public _jarray {}; +class _jfloatArray : public _jarray {}; +class _jdoubleArray : public _jarray {}; +class _jobjectArray : public _jarray {}; + +typedef _jobject *jobject; +typedef _jclass *jclass; +typedef _jthrowable *jthrowable; +typedef _jstring *jstring; +typedef _jarray *jarray; +typedef _jbooleanArray *jbooleanArray; +typedef _jbyteArray *jbyteArray; +typedef _jcharArray *jcharArray; +typedef _jshortArray *jshortArray; +typedef _jintArray *jintArray; +typedef _jlongArray *jlongArray; +typedef _jfloatArray *jfloatArray; +typedef _jdoubleArray *jdoubleArray; +typedef _jobjectArray *jobjectArray; + +#else + +struct _jobject; + +typedef struct _jobject *jobject; +typedef jobject jclass; +typedef jobject jthrowable; +typedef jobject jstring; +typedef jobject jarray; +typedef jarray jbooleanArray; +typedef jarray jbyteArray; +typedef jarray jcharArray; +typedef jarray jshortArray; +typedef jarray jintArray; +typedef jarray jlongArray; +typedef jarray jfloatArray; +typedef jarray jdoubleArray; +typedef jarray jobjectArray; + +#endif + +typedef jobject jweak; + +typedef union jvalue { + jboolean z; + jbyte b; + jchar c; + jshort s; + jint i; + jlong j; + jfloat f; + jdouble d; + jobject l; +} jvalue; + +struct _jfieldID; +typedef struct _jfieldID *jfieldID; + +struct _jmethodID; +typedef struct _jmethodID *jmethodID; + +/* Return values from jobjectRefType */ +typedef enum _jobjectType { + JNIInvalidRefType = 0, + JNILocalRefType = 1, + JNIGlobalRefType = 2, + JNIWeakGlobalRefType = 3 +} jobjectRefType; + + +#endif /* JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H */ + +/* + * jboolean constants + */ + +#define JNI_FALSE 0 +#define JNI_TRUE 1 + +/* + * possible return values for JNI functions. + */ + +#define JNI_OK 0 /* success */ +#define JNI_ERR (-1) /* unknown error */ +#define JNI_EDETACHED (-2) /* thread detached from the VM */ +#define JNI_EVERSION (-3) /* JNI version error */ +#define JNI_ENOMEM (-4) /* not enough memory */ +#define JNI_EEXIST (-5) /* VM already created */ +#define JNI_EINVAL (-6) /* invalid arguments */ + +/* + * used in ReleaseScalarArrayElements + */ + +#define JNI_COMMIT 1 +#define JNI_ABORT 2 + +/* + * used in RegisterNatives to describe native method name, signature, + * and function pointer. + */ + +typedef struct { + char *name; + char *signature; + void *fnPtr; +} JNINativeMethod; + +/* + * JNI Native Method Interface. + */ + +struct JNINativeInterface_; + +struct JNIEnv_; + +#ifdef __cplusplus +typedef JNIEnv_ JNIEnv; +#else +typedef const struct JNINativeInterface_ *JNIEnv; +#endif + +/* + * JNI Invocation Interface. + */ + +struct JNIInvokeInterface_; + +struct JavaVM_; + +#ifdef __cplusplus +typedef JavaVM_ JavaVM; +#else +typedef const struct JNIInvokeInterface_ *JavaVM; +#endif + +struct JNINativeInterface_ { + void *reserved0; + void *reserved1; + void *reserved2; + + void *reserved3; + +#if !TARGET_RT_MAC_CFM && defined(__ppc__) + void* cfm_vectors[225]; +#endif /* !TARGET_RT_MAC_CFM && defined(__ppc__) */ + + jint (JNICALL *GetVersion)(JNIEnv *env); + + jclass (JNICALL *DefineClass) + (JNIEnv *env, const char *name, jobject loader, const jbyte *buf, + jsize len); + jclass (JNICALL *FindClass) + (JNIEnv *env, const char *name); + + jmethodID (JNICALL *FromReflectedMethod) + (JNIEnv *env, jobject method); + jfieldID (JNICALL *FromReflectedField) + (JNIEnv *env, jobject field); + + jobject (JNICALL *ToReflectedMethod) + (JNIEnv *env, jclass cls, jmethodID methodID, jboolean isStatic); + + jclass (JNICALL *GetSuperclass) + (JNIEnv *env, jclass sub); + jboolean (JNICALL *IsAssignableFrom) + (JNIEnv *env, jclass sub, jclass sup); + + jobject (JNICALL *ToReflectedField) + (JNIEnv *env, jclass cls, jfieldID fieldID, jboolean isStatic); + + jint (JNICALL *Throw) + (JNIEnv *env, jthrowable obj); + jint (JNICALL *ThrowNew) + (JNIEnv *env, jclass clazz, const char *msg); + jthrowable (JNICALL *ExceptionOccurred) + (JNIEnv *env); + void (JNICALL *ExceptionDescribe) + (JNIEnv *env); + void (JNICALL *ExceptionClear) + (JNIEnv *env); + void (JNICALL *FatalError) + (JNIEnv *env, const char *msg); + + jint (JNICALL *PushLocalFrame) + (JNIEnv *env, jint capacity); + jobject (JNICALL *PopLocalFrame) + (JNIEnv *env, jobject result); + + jobject (JNICALL *NewGlobalRef) + (JNIEnv *env, jobject lobj); + void (JNICALL *DeleteGlobalRef) + (JNIEnv *env, jobject gref); + void (JNICALL *DeleteLocalRef) + (JNIEnv *env, jobject obj); + jboolean (JNICALL *IsSameObject) + (JNIEnv *env, jobject obj1, jobject obj2); + jobject (JNICALL *NewLocalRef) + (JNIEnv *env, jobject ref); + jint (JNICALL *EnsureLocalCapacity) + (JNIEnv *env, jint capacity); + + jobject (JNICALL *AllocObject) + (JNIEnv *env, jclass clazz); + jobject (JNICALL *NewObject) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jobject (JNICALL *NewObjectV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jobject (JNICALL *NewObjectA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jclass (JNICALL *GetObjectClass) + (JNIEnv *env, jobject obj); + jboolean (JNICALL *IsInstanceOf) + (JNIEnv *env, jobject obj, jclass clazz); + + jmethodID (JNICALL *GetMethodID) + (JNIEnv *env, jclass clazz, const char *name, const char *sig); + + jobject (JNICALL *CallObjectMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jobject (JNICALL *CallObjectMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jobject (JNICALL *CallObjectMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args); + + jboolean (JNICALL *CallBooleanMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jboolean (JNICALL *CallBooleanMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jboolean (JNICALL *CallBooleanMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args); + + jbyte (JNICALL *CallByteMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jbyte (JNICALL *CallByteMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jbyte (JNICALL *CallByteMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); + + jchar (JNICALL *CallCharMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jchar (JNICALL *CallCharMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jchar (JNICALL *CallCharMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); + + jshort (JNICALL *CallShortMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jshort (JNICALL *CallShortMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jshort (JNICALL *CallShortMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); + + jint (JNICALL *CallIntMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jint (JNICALL *CallIntMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jint (JNICALL *CallIntMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); + + jlong (JNICALL *CallLongMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jlong (JNICALL *CallLongMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jlong (JNICALL *CallLongMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); + + jfloat (JNICALL *CallFloatMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jfloat (JNICALL *CallFloatMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jfloat (JNICALL *CallFloatMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); + + jdouble (JNICALL *CallDoubleMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + jdouble (JNICALL *CallDoubleMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + jdouble (JNICALL *CallDoubleMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); + + void (JNICALL *CallVoidMethod) + (JNIEnv *env, jobject obj, jmethodID methodID, ...); + void (JNICALL *CallVoidMethodV) + (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); + void (JNICALL *CallVoidMethodA) + (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args); + + jobject (JNICALL *CallNonvirtualObjectMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jobject (JNICALL *CallNonvirtualObjectMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jobject (JNICALL *CallNonvirtualObjectMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue * args); + + jboolean (JNICALL *CallNonvirtualBooleanMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jboolean (JNICALL *CallNonvirtualBooleanMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jboolean (JNICALL *CallNonvirtualBooleanMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue * args); + + jbyte (JNICALL *CallNonvirtualByteMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jbyte (JNICALL *CallNonvirtualByteMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jbyte (JNICALL *CallNonvirtualByteMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue *args); + + jchar (JNICALL *CallNonvirtualCharMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jchar (JNICALL *CallNonvirtualCharMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jchar (JNICALL *CallNonvirtualCharMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue *args); + + jshort (JNICALL *CallNonvirtualShortMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jshort (JNICALL *CallNonvirtualShortMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jshort (JNICALL *CallNonvirtualShortMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue *args); + + jint (JNICALL *CallNonvirtualIntMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jint (JNICALL *CallNonvirtualIntMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jint (JNICALL *CallNonvirtualIntMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue *args); + + jlong (JNICALL *CallNonvirtualLongMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jlong (JNICALL *CallNonvirtualLongMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jlong (JNICALL *CallNonvirtualLongMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue *args); + + jfloat (JNICALL *CallNonvirtualFloatMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jfloat (JNICALL *CallNonvirtualFloatMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jfloat (JNICALL *CallNonvirtualFloatMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue *args); + + jdouble (JNICALL *CallNonvirtualDoubleMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + jdouble (JNICALL *CallNonvirtualDoubleMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + jdouble (JNICALL *CallNonvirtualDoubleMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue *args); + + void (JNICALL *CallNonvirtualVoidMethod) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); + void (JNICALL *CallNonvirtualVoidMethodV) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + va_list args); + void (JNICALL *CallNonvirtualVoidMethodA) + (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, + const jvalue * args); + + jfieldID (JNICALL *GetFieldID) + (JNIEnv *env, jclass clazz, const char *name, const char *sig); + + jobject (JNICALL *GetObjectField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jboolean (JNICALL *GetBooleanField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jbyte (JNICALL *GetByteField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jchar (JNICALL *GetCharField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jshort (JNICALL *GetShortField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jint (JNICALL *GetIntField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jlong (JNICALL *GetLongField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jfloat (JNICALL *GetFloatField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + jdouble (JNICALL *GetDoubleField) + (JNIEnv *env, jobject obj, jfieldID fieldID); + + void (JNICALL *SetObjectField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jobject val); + void (JNICALL *SetBooleanField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jboolean val); + void (JNICALL *SetByteField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jbyte val); + void (JNICALL *SetCharField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jchar val); + void (JNICALL *SetShortField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jshort val); + void (JNICALL *SetIntField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jint val); + void (JNICALL *SetLongField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jlong val); + void (JNICALL *SetFloatField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jfloat val); + void (JNICALL *SetDoubleField) + (JNIEnv *env, jobject obj, jfieldID fieldID, jdouble val); + + jmethodID (JNICALL *GetStaticMethodID) + (JNIEnv *env, jclass clazz, const char *name, const char *sig); + + jobject (JNICALL *CallStaticObjectMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jobject (JNICALL *CallStaticObjectMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jobject (JNICALL *CallStaticObjectMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jboolean (JNICALL *CallStaticBooleanMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jboolean (JNICALL *CallStaticBooleanMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jboolean (JNICALL *CallStaticBooleanMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jbyte (JNICALL *CallStaticByteMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jbyte (JNICALL *CallStaticByteMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jbyte (JNICALL *CallStaticByteMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jchar (JNICALL *CallStaticCharMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jchar (JNICALL *CallStaticCharMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jchar (JNICALL *CallStaticCharMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jshort (JNICALL *CallStaticShortMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jshort (JNICALL *CallStaticShortMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jshort (JNICALL *CallStaticShortMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jint (JNICALL *CallStaticIntMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jint (JNICALL *CallStaticIntMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jint (JNICALL *CallStaticIntMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jlong (JNICALL *CallStaticLongMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jlong (JNICALL *CallStaticLongMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jlong (JNICALL *CallStaticLongMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jfloat (JNICALL *CallStaticFloatMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jfloat (JNICALL *CallStaticFloatMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jfloat (JNICALL *CallStaticFloatMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + jdouble (JNICALL *CallStaticDoubleMethod) + (JNIEnv *env, jclass clazz, jmethodID methodID, ...); + jdouble (JNICALL *CallStaticDoubleMethodV) + (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); + jdouble (JNICALL *CallStaticDoubleMethodA) + (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); + + void (JNICALL *CallStaticVoidMethod) + (JNIEnv *env, jclass cls, jmethodID methodID, ...); + void (JNICALL *CallStaticVoidMethodV) + (JNIEnv *env, jclass cls, jmethodID methodID, va_list args); + void (JNICALL *CallStaticVoidMethodA) + (JNIEnv *env, jclass cls, jmethodID methodID, const jvalue * args); + + jfieldID (JNICALL *GetStaticFieldID) + (JNIEnv *env, jclass clazz, const char *name, const char *sig); + jobject (JNICALL *GetStaticObjectField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jboolean (JNICALL *GetStaticBooleanField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jbyte (JNICALL *GetStaticByteField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jchar (JNICALL *GetStaticCharField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jshort (JNICALL *GetStaticShortField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jint (JNICALL *GetStaticIntField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jlong (JNICALL *GetStaticLongField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jfloat (JNICALL *GetStaticFloatField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + jdouble (JNICALL *GetStaticDoubleField) + (JNIEnv *env, jclass clazz, jfieldID fieldID); + + void (JNICALL *SetStaticObjectField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value); + void (JNICALL *SetStaticBooleanField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value); + void (JNICALL *SetStaticByteField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jbyte value); + void (JNICALL *SetStaticCharField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jchar value); + void (JNICALL *SetStaticShortField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value); + void (JNICALL *SetStaticIntField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jint value); + void (JNICALL *SetStaticLongField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jlong value); + void (JNICALL *SetStaticFloatField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value); + void (JNICALL *SetStaticDoubleField) + (JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value); + + jstring (JNICALL *NewString) + (JNIEnv *env, const jchar *unicode, jsize len); + jsize (JNICALL *GetStringLength) + (JNIEnv *env, jstring str); + const jchar *(JNICALL *GetStringChars) + (JNIEnv *env, jstring str, jboolean *isCopy); + void (JNICALL *ReleaseStringChars) + (JNIEnv *env, jstring str, const jchar *chars); + + jstring (JNICALL *NewStringUTF) + (JNIEnv *env, const char *utf); + jsize (JNICALL *GetStringUTFLength) + (JNIEnv *env, jstring str); + const char* (JNICALL *GetStringUTFChars) + (JNIEnv *env, jstring str, jboolean *isCopy); + void (JNICALL *ReleaseStringUTFChars) + (JNIEnv *env, jstring str, const char* chars); + + + jsize (JNICALL *GetArrayLength) + (JNIEnv *env, jarray array); + + jobjectArray (JNICALL *NewObjectArray) + (JNIEnv *env, jsize len, jclass clazz, jobject init); + jobject (JNICALL *GetObjectArrayElement) + (JNIEnv *env, jobjectArray array, jsize index); + void (JNICALL *SetObjectArrayElement) + (JNIEnv *env, jobjectArray array, jsize index, jobject val); + + jbooleanArray (JNICALL *NewBooleanArray) + (JNIEnv *env, jsize len); + jbyteArray (JNICALL *NewByteArray) + (JNIEnv *env, jsize len); + jcharArray (JNICALL *NewCharArray) + (JNIEnv *env, jsize len); + jshortArray (JNICALL *NewShortArray) + (JNIEnv *env, jsize len); + jintArray (JNICALL *NewIntArray) + (JNIEnv *env, jsize len); + jlongArray (JNICALL *NewLongArray) + (JNIEnv *env, jsize len); + jfloatArray (JNICALL *NewFloatArray) + (JNIEnv *env, jsize len); + jdoubleArray (JNICALL *NewDoubleArray) + (JNIEnv *env, jsize len); + + jboolean * (JNICALL *GetBooleanArrayElements) + (JNIEnv *env, jbooleanArray array, jboolean *isCopy); + jbyte * (JNICALL *GetByteArrayElements) + (JNIEnv *env, jbyteArray array, jboolean *isCopy); + jchar * (JNICALL *GetCharArrayElements) + (JNIEnv *env, jcharArray array, jboolean *isCopy); + jshort * (JNICALL *GetShortArrayElements) + (JNIEnv *env, jshortArray array, jboolean *isCopy); + jint * (JNICALL *GetIntArrayElements) + (JNIEnv *env, jintArray array, jboolean *isCopy); + jlong * (JNICALL *GetLongArrayElements) + (JNIEnv *env, jlongArray array, jboolean *isCopy); + jfloat * (JNICALL *GetFloatArrayElements) + (JNIEnv *env, jfloatArray array, jboolean *isCopy); + jdouble * (JNICALL *GetDoubleArrayElements) + (JNIEnv *env, jdoubleArray array, jboolean *isCopy); + + void (JNICALL *ReleaseBooleanArrayElements) + (JNIEnv *env, jbooleanArray array, jboolean *elems, jint mode); + void (JNICALL *ReleaseByteArrayElements) + (JNIEnv *env, jbyteArray array, jbyte *elems, jint mode); + void (JNICALL *ReleaseCharArrayElements) + (JNIEnv *env, jcharArray array, jchar *elems, jint mode); + void (JNICALL *ReleaseShortArrayElements) + (JNIEnv *env, jshortArray array, jshort *elems, jint mode); + void (JNICALL *ReleaseIntArrayElements) + (JNIEnv *env, jintArray array, jint *elems, jint mode); + void (JNICALL *ReleaseLongArrayElements) + (JNIEnv *env, jlongArray array, jlong *elems, jint mode); + void (JNICALL *ReleaseFloatArrayElements) + (JNIEnv *env, jfloatArray array, jfloat *elems, jint mode); + void (JNICALL *ReleaseDoubleArrayElements) + (JNIEnv *env, jdoubleArray array, jdouble *elems, jint mode); + + void (JNICALL *GetBooleanArrayRegion) + (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf); + void (JNICALL *GetByteArrayRegion) + (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf); + void (JNICALL *GetCharArrayRegion) + (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf); + void (JNICALL *GetShortArrayRegion) + (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf); + void (JNICALL *GetIntArrayRegion) + (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf); + void (JNICALL *GetLongArrayRegion) + (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf); + void (JNICALL *GetFloatArrayRegion) + (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf); + void (JNICALL *GetDoubleArrayRegion) + (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf); + + void (JNICALL *SetBooleanArrayRegion) + (JNIEnv *env, jbooleanArray array, jsize start, jsize l, const jboolean *buf); + void (JNICALL *SetByteArrayRegion) + (JNIEnv *env, jbyteArray array, jsize start, jsize len, const jbyte *buf); + void (JNICALL *SetCharArrayRegion) + (JNIEnv *env, jcharArray array, jsize start, jsize len, const jchar *buf); + void (JNICALL *SetShortArrayRegion) + (JNIEnv *env, jshortArray array, jsize start, jsize len, const jshort *buf); + void (JNICALL *SetIntArrayRegion) + (JNIEnv *env, jintArray array, jsize start, jsize len, const jint *buf); + void (JNICALL *SetLongArrayRegion) + (JNIEnv *env, jlongArray array, jsize start, jsize len, const jlong *buf); + void (JNICALL *SetFloatArrayRegion) + (JNIEnv *env, jfloatArray array, jsize start, jsize len, const jfloat *buf); + void (JNICALL *SetDoubleArrayRegion) + (JNIEnv *env, jdoubleArray array, jsize start, jsize len, const jdouble *buf); + + jint (JNICALL *RegisterNatives) + (JNIEnv *env, jclass clazz, const JNINativeMethod *methods, + jint nMethods); + jint (JNICALL *UnregisterNatives) + (JNIEnv *env, jclass clazz); + + jint (JNICALL *MonitorEnter) + (JNIEnv *env, jobject obj); + jint (JNICALL *MonitorExit) + (JNIEnv *env, jobject obj); + + jint (JNICALL *GetJavaVM) + (JNIEnv *env, JavaVM **vm); + + void (JNICALL *GetStringRegion) + (JNIEnv *env, jstring str, jsize start, jsize len, jchar *buf); + void (JNICALL *GetStringUTFRegion) + (JNIEnv *env, jstring str, jsize start, jsize len, char *buf); + + void * (JNICALL *GetPrimitiveArrayCritical) + (JNIEnv *env, jarray array, jboolean *isCopy); + void (JNICALL *ReleasePrimitiveArrayCritical) + (JNIEnv *env, jarray array, void *carray, jint mode); + + const jchar * (JNICALL *GetStringCritical) + (JNIEnv *env, jstring string, jboolean *isCopy); + void (JNICALL *ReleaseStringCritical) + (JNIEnv *env, jstring string, const jchar *cstring); + + jweak (JNICALL *NewWeakGlobalRef) + (JNIEnv *env, jobject obj); + void (JNICALL *DeleteWeakGlobalRef) + (JNIEnv *env, jweak ref); + + jboolean (JNICALL *ExceptionCheck) + (JNIEnv *env); + + jobject (JNICALL *NewDirectByteBuffer) + (JNIEnv* env, void* address, jlong capacity); + void* (JNICALL *GetDirectBufferAddress) + (JNIEnv* env, jobject buf); + jlong (JNICALL *GetDirectBufferCapacity) + (JNIEnv* env, jobject buf); + + /* New JNI 1.6 Features */ + + jobjectRefType (JNICALL *GetObjectRefType) + (JNIEnv* env, jobject obj); + + #if TARGET_RT_MAC_CFM && defined(__ppc__) + void* real_functions[228]; + #endif /* TARGET_RT_MAC_CFM && defined(__ppc__) */ +}; + +/* + * We use inlined functions for C++ so that programmers can write: + * + * env->FindClass("java/lang/String") + * + * in C++ rather than: + * + * (*env)->FindClass(env, "java/lang/String") + * + * in C. + */ + +struct JNIEnv_ { + const struct JNINativeInterface_ *functions; +#ifdef __cplusplus + + jint GetVersion() { + return functions->GetVersion(this); + } + jclass DefineClass(const char *name, jobject loader, const jbyte *buf, + jsize len) { + return functions->DefineClass(this, name, loader, buf, len); + } + jclass FindClass(const char *name) { + return functions->FindClass(this, name); + } + jmethodID FromReflectedMethod(jobject method) { + return functions->FromReflectedMethod(this,method); + } + jfieldID FromReflectedField(jobject field) { + return functions->FromReflectedField(this,field); + } + + jobject ToReflectedMethod(jclass cls, jmethodID methodID, jboolean isStatic) { + return functions->ToReflectedMethod(this, cls, methodID, isStatic); + } + + jclass GetSuperclass(jclass sub) { + return functions->GetSuperclass(this, sub); + } + jboolean IsAssignableFrom(jclass sub, jclass sup) { + return functions->IsAssignableFrom(this, sub, sup); + } + + jobject ToReflectedField(jclass cls, jfieldID fieldID, jboolean isStatic) { + return functions->ToReflectedField(this,cls,fieldID,isStatic); + } + + jint Throw(jthrowable obj) { + return functions->Throw(this, obj); + } + jint ThrowNew(jclass clazz, const char *msg) { + return functions->ThrowNew(this, clazz, msg); + } + jthrowable ExceptionOccurred() { + return functions->ExceptionOccurred(this); + } + void ExceptionDescribe() { + functions->ExceptionDescribe(this); + } + void ExceptionClear() { + functions->ExceptionClear(this); + } + void FatalError(const char *msg) { + functions->FatalError(this, msg); + } + + jint PushLocalFrame(jint capacity) { + return functions->PushLocalFrame(this,capacity); + } + jobject PopLocalFrame(jobject result) { + return functions->PopLocalFrame(this,result); + } + + jobject NewGlobalRef(jobject lobj) { + return functions->NewGlobalRef(this,lobj); + } + void DeleteGlobalRef(jobject gref) { + functions->DeleteGlobalRef(this,gref); + } + void DeleteLocalRef(jobject obj) { + functions->DeleteLocalRef(this, obj); + } + + jboolean IsSameObject(jobject obj1, jobject obj2) { + return functions->IsSameObject(this,obj1,obj2); + } + + jobject NewLocalRef(jobject ref) { + return functions->NewLocalRef(this,ref); + } + jint EnsureLocalCapacity(jint capacity) { + return functions->EnsureLocalCapacity(this,capacity); + } + + jobject AllocObject(jclass clazz) { + return functions->AllocObject(this,clazz); + } + jobject NewObject(jclass clazz, jmethodID methodID, ...) { + va_list args; + jobject result; + va_start(args, methodID); + result = functions->NewObjectV(this,clazz,methodID,args); + va_end(args); + return result; + } + jobject NewObjectV(jclass clazz, jmethodID methodID, + va_list args) { + return functions->NewObjectV(this,clazz,methodID,args); + } + jobject NewObjectA(jclass clazz, jmethodID methodID, + const jvalue *args) { + return functions->NewObjectA(this,clazz,methodID,args); + } + + jclass GetObjectClass(jobject obj) { + return functions->GetObjectClass(this,obj); + } + jboolean IsInstanceOf(jobject obj, jclass clazz) { + return functions->IsInstanceOf(this,obj,clazz); + } + + jmethodID GetMethodID(jclass clazz, const char *name, + const char *sig) { + return functions->GetMethodID(this,clazz,name,sig); + } + + jobject CallObjectMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jobject result; + va_start(args,methodID); + result = functions->CallObjectMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jobject CallObjectMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallObjectMethodV(this,obj,methodID,args); + } + jobject CallObjectMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallObjectMethodA(this,obj,methodID,args); + } + + jboolean CallBooleanMethod(jobject obj, + jmethodID methodID, ...) { + va_list args; + jboolean result; + va_start(args,methodID); + result = functions->CallBooleanMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jboolean CallBooleanMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallBooleanMethodV(this,obj,methodID,args); + } + jboolean CallBooleanMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallBooleanMethodA(this,obj,methodID, args); + } + + jbyte CallByteMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jbyte result; + va_start(args,methodID); + result = functions->CallByteMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jbyte CallByteMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallByteMethodV(this,obj,methodID,args); + } + jbyte CallByteMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallByteMethodA(this,obj,methodID,args); + } + + jchar CallCharMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jchar result; + va_start(args,methodID); + result = functions->CallCharMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jchar CallCharMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallCharMethodV(this,obj,methodID,args); + } + jchar CallCharMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallCharMethodA(this,obj,methodID,args); + } + + jshort CallShortMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jshort result; + va_start(args,methodID); + result = functions->CallShortMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jshort CallShortMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallShortMethodV(this,obj,methodID,args); + } + jshort CallShortMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallShortMethodA(this,obj,methodID,args); + } + + jint CallIntMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jint result; + va_start(args,methodID); + result = functions->CallIntMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jint CallIntMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallIntMethodV(this,obj,methodID,args); + } + jint CallIntMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallIntMethodA(this,obj,methodID,args); + } + + jlong CallLongMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jlong result; + va_start(args,methodID); + result = functions->CallLongMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jlong CallLongMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallLongMethodV(this,obj,methodID,args); + } + jlong CallLongMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallLongMethodA(this,obj,methodID,args); + } + + jfloat CallFloatMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jfloat result; + va_start(args,methodID); + result = functions->CallFloatMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jfloat CallFloatMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallFloatMethodV(this,obj,methodID,args); + } + jfloat CallFloatMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallFloatMethodA(this,obj,methodID,args); + } + + jdouble CallDoubleMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + jdouble result; + va_start(args,methodID); + result = functions->CallDoubleMethodV(this,obj,methodID,args); + va_end(args); + return result; + } + jdouble CallDoubleMethodV(jobject obj, jmethodID methodID, + va_list args) { + return functions->CallDoubleMethodV(this,obj,methodID,args); + } + jdouble CallDoubleMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + return functions->CallDoubleMethodA(this,obj,methodID,args); + } + + void CallVoidMethod(jobject obj, jmethodID methodID, ...) { + va_list args; + va_start(args,methodID); + functions->CallVoidMethodV(this,obj,methodID,args); + va_end(args); + } + void CallVoidMethodV(jobject obj, jmethodID methodID, + va_list args) { + functions->CallVoidMethodV(this,obj,methodID,args); + } + void CallVoidMethodA(jobject obj, jmethodID methodID, + const jvalue * args) { + functions->CallVoidMethodA(this,obj,methodID,args); + } + + jobject CallNonvirtualObjectMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jobject result; + va_start(args,methodID); + result = functions->CallNonvirtualObjectMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jobject CallNonvirtualObjectMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualObjectMethodV(this,obj,clazz, + methodID,args); + } + jobject CallNonvirtualObjectMethodA(jobject obj, jclass clazz, + jmethodID methodID, const jvalue * args) { + return functions->CallNonvirtualObjectMethodA(this,obj,clazz, + methodID,args); + } + + jboolean CallNonvirtualBooleanMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jboolean result; + va_start(args,methodID); + result = functions->CallNonvirtualBooleanMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jboolean CallNonvirtualBooleanMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualBooleanMethodV(this,obj,clazz, + methodID,args); + } + jboolean CallNonvirtualBooleanMethodA(jobject obj, jclass clazz, + jmethodID methodID, const jvalue * args) { + return functions->CallNonvirtualBooleanMethodA(this,obj,clazz, + methodID, args); + } + + jbyte CallNonvirtualByteMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jbyte result; + va_start(args,methodID); + result = functions->CallNonvirtualByteMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jbyte CallNonvirtualByteMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualByteMethodV(this,obj,clazz, + methodID,args); + } + jbyte CallNonvirtualByteMethodA(jobject obj, jclass clazz, + jmethodID methodID, const jvalue * args) { + return functions->CallNonvirtualByteMethodA(this,obj,clazz, + methodID,args); + } + + jchar CallNonvirtualCharMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jchar result; + va_start(args,methodID); + result = functions->CallNonvirtualCharMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jchar CallNonvirtualCharMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualCharMethodV(this,obj,clazz, + methodID,args); + } + jchar CallNonvirtualCharMethodA(jobject obj, jclass clazz, + jmethodID methodID, const jvalue * args) { + return functions->CallNonvirtualCharMethodA(this,obj,clazz, + methodID,args); + } + + jshort CallNonvirtualShortMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jshort result; + va_start(args,methodID); + result = functions->CallNonvirtualShortMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jshort CallNonvirtualShortMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualShortMethodV(this,obj,clazz, + methodID,args); + } + jshort CallNonvirtualShortMethodA(jobject obj, jclass clazz, + jmethodID methodID, const jvalue * args) { + return functions->CallNonvirtualShortMethodA(this,obj,clazz, + methodID,args); + } + + jint CallNonvirtualIntMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jint result; + va_start(args,methodID); + result = functions->CallNonvirtualIntMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jint CallNonvirtualIntMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualIntMethodV(this,obj,clazz, + methodID,args); + } + jint CallNonvirtualIntMethodA(jobject obj, jclass clazz, + jmethodID methodID, const jvalue * args) { + return functions->CallNonvirtualIntMethodA(this,obj,clazz, + methodID,args); + } + + jlong CallNonvirtualLongMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jlong result; + va_start(args,methodID); + result = functions->CallNonvirtualLongMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jlong CallNonvirtualLongMethodV(jobject obj, jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallNonvirtualLongMethodV(this,obj,clazz, + methodID,args); + } + jlong CallNonvirtualLongMethodA(jobject obj, jclass clazz, + jmethodID methodID, const jvalue * args) { + return functions->CallNonvirtualLongMethodA(this,obj,clazz, + methodID,args); + } + + jfloat CallNonvirtualFloatMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jfloat result; + va_start(args,methodID); + result = functions->CallNonvirtualFloatMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jfloat CallNonvirtualFloatMethodV(jobject obj, jclass clazz, + jmethodID methodID, + va_list args) { + return functions->CallNonvirtualFloatMethodV(this,obj,clazz, + methodID,args); + } + jfloat CallNonvirtualFloatMethodA(jobject obj, jclass clazz, + jmethodID methodID, + const jvalue * args) { + return functions->CallNonvirtualFloatMethodA(this,obj,clazz, + methodID,args); + } + + jdouble CallNonvirtualDoubleMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + jdouble result; + va_start(args,methodID); + result = functions->CallNonvirtualDoubleMethodV(this,obj,clazz, + methodID,args); + va_end(args); + return result; + } + jdouble CallNonvirtualDoubleMethodV(jobject obj, jclass clazz, + jmethodID methodID, + va_list args) { + return functions->CallNonvirtualDoubleMethodV(this,obj,clazz, + methodID,args); + } + jdouble CallNonvirtualDoubleMethodA(jobject obj, jclass clazz, + jmethodID methodID, + const jvalue * args) { + return functions->CallNonvirtualDoubleMethodA(this,obj,clazz, + methodID,args); + } + + void CallNonvirtualVoidMethod(jobject obj, jclass clazz, + jmethodID methodID, ...) { + va_list args; + va_start(args,methodID); + functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args); + va_end(args); + } + void CallNonvirtualVoidMethodV(jobject obj, jclass clazz, + jmethodID methodID, + va_list args) { + functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args); + } + void CallNonvirtualVoidMethodA(jobject obj, jclass clazz, + jmethodID methodID, + const jvalue * args) { + functions->CallNonvirtualVoidMethodA(this,obj,clazz,methodID,args); + } + + jfieldID GetFieldID(jclass clazz, const char *name, + const char *sig) { + return functions->GetFieldID(this,clazz,name,sig); + } + + jobject GetObjectField(jobject obj, jfieldID fieldID) { + return functions->GetObjectField(this,obj,fieldID); + } + jboolean GetBooleanField(jobject obj, jfieldID fieldID) { + return functions->GetBooleanField(this,obj,fieldID); + } + jbyte GetByteField(jobject obj, jfieldID fieldID) { + return functions->GetByteField(this,obj,fieldID); + } + jchar GetCharField(jobject obj, jfieldID fieldID) { + return functions->GetCharField(this,obj,fieldID); + } + jshort GetShortField(jobject obj, jfieldID fieldID) { + return functions->GetShortField(this,obj,fieldID); + } + jint GetIntField(jobject obj, jfieldID fieldID) { + return functions->GetIntField(this,obj,fieldID); + } + jlong GetLongField(jobject obj, jfieldID fieldID) { + return functions->GetLongField(this,obj,fieldID); + } + jfloat GetFloatField(jobject obj, jfieldID fieldID) { + return functions->GetFloatField(this,obj,fieldID); + } + jdouble GetDoubleField(jobject obj, jfieldID fieldID) { + return functions->GetDoubleField(this,obj,fieldID); + } + + void SetObjectField(jobject obj, jfieldID fieldID, jobject val) { + functions->SetObjectField(this,obj,fieldID,val); + } + void SetBooleanField(jobject obj, jfieldID fieldID, + jboolean val) { + functions->SetBooleanField(this,obj,fieldID,val); + } + void SetByteField(jobject obj, jfieldID fieldID, + jbyte val) { + functions->SetByteField(this,obj,fieldID,val); + } + void SetCharField(jobject obj, jfieldID fieldID, + jchar val) { + functions->SetCharField(this,obj,fieldID,val); + } + void SetShortField(jobject obj, jfieldID fieldID, + jshort val) { + functions->SetShortField(this,obj,fieldID,val); + } + void SetIntField(jobject obj, jfieldID fieldID, + jint val) { + functions->SetIntField(this,obj,fieldID,val); + } + void SetLongField(jobject obj, jfieldID fieldID, + jlong val) { + functions->SetLongField(this,obj,fieldID,val); + } + void SetFloatField(jobject obj, jfieldID fieldID, + jfloat val) { + functions->SetFloatField(this,obj,fieldID,val); + } + void SetDoubleField(jobject obj, jfieldID fieldID, + jdouble val) { + functions->SetDoubleField(this,obj,fieldID,val); + } + + jmethodID GetStaticMethodID(jclass clazz, const char *name, + const char *sig) { + return functions->GetStaticMethodID(this,clazz,name,sig); + } + + jobject CallStaticObjectMethod(jclass clazz, jmethodID methodID, + ...) { + va_list args; + jobject result; + va_start(args,methodID); + result = functions->CallStaticObjectMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jobject CallStaticObjectMethodV(jclass clazz, jmethodID methodID, + va_list args) { + return functions->CallStaticObjectMethodV(this,clazz,methodID,args); + } + jobject CallStaticObjectMethodA(jclass clazz, jmethodID methodID, + const jvalue *args) { + return functions->CallStaticObjectMethodA(this,clazz,methodID,args); + } + + jboolean CallStaticBooleanMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jboolean result; + va_start(args,methodID); + result = functions->CallStaticBooleanMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jboolean CallStaticBooleanMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticBooleanMethodV(this,clazz,methodID,args); + } + jboolean CallStaticBooleanMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticBooleanMethodA(this,clazz,methodID,args); + } + + jbyte CallStaticByteMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jbyte result; + va_start(args,methodID); + result = functions->CallStaticByteMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jbyte CallStaticByteMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticByteMethodV(this,clazz,methodID,args); + } + jbyte CallStaticByteMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticByteMethodA(this,clazz,methodID,args); + } + + jchar CallStaticCharMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jchar result; + va_start(args,methodID); + result = functions->CallStaticCharMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jchar CallStaticCharMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticCharMethodV(this,clazz,methodID,args); + } + jchar CallStaticCharMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticCharMethodA(this,clazz,methodID,args); + } + + jshort CallStaticShortMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jshort result; + va_start(args,methodID); + result = functions->CallStaticShortMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jshort CallStaticShortMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticShortMethodV(this,clazz,methodID,args); + } + jshort CallStaticShortMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticShortMethodA(this,clazz,methodID,args); + } + + jint CallStaticIntMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jint result; + va_start(args,methodID); + result = functions->CallStaticIntMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jint CallStaticIntMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticIntMethodV(this,clazz,methodID,args); + } + jint CallStaticIntMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticIntMethodA(this,clazz,methodID,args); + } + + jlong CallStaticLongMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jlong result; + va_start(args,methodID); + result = functions->CallStaticLongMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jlong CallStaticLongMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticLongMethodV(this,clazz,methodID,args); + } + jlong CallStaticLongMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticLongMethodA(this,clazz,methodID,args); + } + + jfloat CallStaticFloatMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jfloat result; + va_start(args,methodID); + result = functions->CallStaticFloatMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jfloat CallStaticFloatMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticFloatMethodV(this,clazz,methodID,args); + } + jfloat CallStaticFloatMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticFloatMethodA(this,clazz,methodID,args); + } + + jdouble CallStaticDoubleMethod(jclass clazz, + jmethodID methodID, ...) { + va_list args; + jdouble result; + va_start(args,methodID); + result = functions->CallStaticDoubleMethodV(this,clazz,methodID,args); + va_end(args); + return result; + } + jdouble CallStaticDoubleMethodV(jclass clazz, + jmethodID methodID, va_list args) { + return functions->CallStaticDoubleMethodV(this,clazz,methodID,args); + } + jdouble CallStaticDoubleMethodA(jclass clazz, + jmethodID methodID, const jvalue *args) { + return functions->CallStaticDoubleMethodA(this,clazz,methodID,args); + } + + void CallStaticVoidMethod(jclass cls, jmethodID methodID, ...) { + va_list args; + va_start(args,methodID); + functions->CallStaticVoidMethodV(this,cls,methodID,args); + va_end(args); + } + void CallStaticVoidMethodV(jclass cls, jmethodID methodID, + va_list args) { + functions->CallStaticVoidMethodV(this,cls,methodID,args); + } + void CallStaticVoidMethodA(jclass cls, jmethodID methodID, + const jvalue * args) { + functions->CallStaticVoidMethodA(this,cls,methodID,args); + } + + jfieldID GetStaticFieldID(jclass clazz, const char *name, + const char *sig) { + return functions->GetStaticFieldID(this,clazz,name,sig); + } + jobject GetStaticObjectField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticObjectField(this,clazz,fieldID); + } + jboolean GetStaticBooleanField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticBooleanField(this,clazz,fieldID); + } + jbyte GetStaticByteField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticByteField(this,clazz,fieldID); + } + jchar GetStaticCharField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticCharField(this,clazz,fieldID); + } + jshort GetStaticShortField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticShortField(this,clazz,fieldID); + } + jint GetStaticIntField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticIntField(this,clazz,fieldID); + } + jlong GetStaticLongField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticLongField(this,clazz,fieldID); + } + jfloat GetStaticFloatField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticFloatField(this,clazz,fieldID); + } + jdouble GetStaticDoubleField(jclass clazz, jfieldID fieldID) { + return functions->GetStaticDoubleField(this,clazz,fieldID); + } + + void SetStaticObjectField(jclass clazz, jfieldID fieldID, + jobject value) { + functions->SetStaticObjectField(this,clazz,fieldID,value); + } + void SetStaticBooleanField(jclass clazz, jfieldID fieldID, + jboolean value) { + functions->SetStaticBooleanField(this,clazz,fieldID,value); + } + void SetStaticByteField(jclass clazz, jfieldID fieldID, + jbyte value) { + functions->SetStaticByteField(this,clazz,fieldID,value); + } + void SetStaticCharField(jclass clazz, jfieldID fieldID, + jchar value) { + functions->SetStaticCharField(this,clazz,fieldID,value); + } + void SetStaticShortField(jclass clazz, jfieldID fieldID, + jshort value) { + functions->SetStaticShortField(this,clazz,fieldID,value); + } + void SetStaticIntField(jclass clazz, jfieldID fieldID, + jint value) { + functions->SetStaticIntField(this,clazz,fieldID,value); + } + void SetStaticLongField(jclass clazz, jfieldID fieldID, + jlong value) { + functions->SetStaticLongField(this,clazz,fieldID,value); + } + void SetStaticFloatField(jclass clazz, jfieldID fieldID, + jfloat value) { + functions->SetStaticFloatField(this,clazz,fieldID,value); + } + void SetStaticDoubleField(jclass clazz, jfieldID fieldID, + jdouble value) { + functions->SetStaticDoubleField(this,clazz,fieldID,value); + } + + jstring NewString(const jchar *unicode, jsize len) { + return functions->NewString(this,unicode,len); + } + jsize GetStringLength(jstring str) { + return functions->GetStringLength(thi... [truncated message content] |
From: <yan...@us...> - 2008-07-30 16:40:53
|
Revision: 915 http://assorted.svn.sourceforge.net/assorted/?rev=915&view=rev Author: yangzhang Date: 2008-07-30 16:41:02 +0000 (Wed, 30 Jul 2008) Log Message: ----------- added persistent-pidgin Modified Paths: -------------- shell-tools/trunk/src/bash-commons/bashrc.bash Modified: shell-tools/trunk/src/bash-commons/bashrc.bash =================================================================== --- shell-tools/trunk/src/bash-commons/bashrc.bash 2008-07-30 07:05:58 UTC (rev 914) +++ shell-tools/trunk/src/bash-commons/bashrc.bash 2008-07-30 16:41:02 UTC (rev 915) @@ -599,6 +599,15 @@ done | less } +persistent-pidgin() { + while true ; do + date + time gdb -batch -ex 'handle SIGPIPE nostop' -ex 'run' -ex 'bt full' -ex 'q' pidgin + echo "exit status: $?" + trace sleep 1 + done +} + #function set_title() { # if [ $# -eq 0 ] ; then # eval set -- "$PWD" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-07-30 07:05:52
|
Revision: 914 http://assorted.svn.sourceforge.net/assorted/?rev=914&view=rev Author: yangzhang Date: 2008-07-30 07:05:58 +0000 (Wed, 30 Jul 2008) Log Message: ----------- updated freenode handle; updated office number; added corey paper; added xvm to project list Modified Paths: -------------- personal-site/trunk/src/index.txt personal-site/trunk/src/links.txt Added Paths: ----------- personal-site/trunk/static/papers/corey-osdi08.pdf Modified: personal-site/trunk/src/index.txt =================================================================== --- personal-site/trunk/src/index.txt 2008-07-30 03:15:58 UTC (rev 913) +++ personal-site/trunk/src/index.txt 2008-07-30 07:05:58 UTC (rev 914) @@ -40,8 +40,8 @@ item( 'Yahoo', 'ymsgr:sendIM?', 'overbored' ); item( 'Jabber (Google)', 'xmpp:', 'gmail.com', 'yaaang' ); item( 'Skype', 'callto://', 'yaaang' ); - item( 'FreeNode', 'irc://irc.freenode.org/', 'zeeeee' ); // TODO fix - item( '"Office"', 'MIT/CSAIL <a href="http://whereis.mit.edu/map-jpg?selection=32&Buildings=go">32</a>-<a href="http://www.csail.mit.edu/resources/maps/9G/G908.gif">G908</a>, <a href="http://www.eecs.mit.edu/stata-link.html">Stata Center</a>, <a href="http://maps.google.com/maps?f=q&hl=en&geocode=&q=32+Vassar+St,+Cambridge,+MA+02139&sll=42.357926,-71.093616&sspn=0.00842,0.01575&ie=UTF8&ll=42.362682,-71.093495&spn=0.008419,0.01575&z=16&iwloc=addr">32 Vassar St., Cambridge, MA 02139</a>, <a href="callto://+1-617-253-0969">(617) 253-0969</a>' ); + item( 'FreeNode', 'irc://irc.freenode.org/', 'zeeee' ); // TODO fix + item( '"Office"', 'MIT/CSAIL <a href="http://whereis.mit.edu/map-jpg?selection=32&Buildings=go">32</a>-<a href="http://www.csail.mit.edu/resources/maps/9G/G908.gif">G908</a>, <a href="http://www.eecs.mit.edu/stata-link.html">Stata Center</a>, <a href="http://maps.google.com/maps?f=q&hl=en&geocode=&q=32+Vassar+St,+Cambridge,+MA+02139&sll=42.357926,-71.093616&sspn=0.00842,0.01575&ie=UTF8&ll=42.362682,-71.093495&spn=0.008419,0.01575&z=16&iwloc=addr">32 Vassar St., Cambridge, MA 02139</a>, <a href="callto://+1-617-253-6015">(617) 253-6015</a>' ); item( 'GPG public key', '<a href="yang.gpg.asc">yang.gpg.asc</a> (<a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xB1E65B60">MIT PKS entry</a>)' ); document.write( '</ul>' ); // ]]> @@ -56,9 +56,11 @@ Here are the non-confidential projects in which I've been involved. More details when I have time! -- JOSMP: an exokernel operating system for many-core systems. - [H-Store]: a distributed main-memory relational database management system for on-line transaction processing workloads. +- Invirt: [SIPB]'s virtual machine management system. The name of the MIT + instance of this service is [XVM]. +- Corey: an exokernel operating system for many-core systems. - [WebTables]: web-scale information retrieval over structured data. - [Scalable Resilient Overlay Networks]: distributed algorithms and systems to enable RONs to scale to thousands of nodes. @@ -91,7 +93,8 @@ - [Recovery-Oriented Computing] (ROC). - [Microsoft Search] and [Microsoft SharePoint Portal Server]. -<!-- TODO upload --> +[SIPB]: http://sipb.mit.edu/ +[XVM]: http://xvm.mit.edu/ [H-Store]: http://db.cs.yale.edu/hstore/ [WebTables]: slides/webtables-presentation-google07.pdf @@ -121,12 +124,13 @@ Misc Software ------------- -<!-- TODO: have a page of software --> +<!-- TODO: ZDB provides comprehensive navigable views of your software/projects +--> These are various other software I've worked on, not exclusively associated with any particular project above. -- [Assorted Projects]: my code dump +- [Assorted Projects]: my code dump---find a bunch more programs here - [Simple Publications Manager]: publication management web application - [gbookmark2delicious]: Python script to migrate/sync Google Bookmarks to del.icio.us @@ -146,6 +150,13 @@ <!-- TODO: mirror papers. integrate with zdb --> +- Silas Boyd-Wickizer (MIT), Haibo Chen (Fudan University), Rong Chen (Fudan + University), Yandong Mao (Fudan University), Frans Kaashoek (MIT), Robert + Morris (MIT), Aleksey Pesterev (MIT), Lex Stein (Microsoft Research Asia), + Ming Wu (Microsoft Research Asia), Yuehua Dai (Xi'an Jiaotong University), + Yang Zhang (MIT), Zheng Zhang (Microsoft Research Asia). _Corey: an + operating system for many cores_. OSDI 2008. [PDF](papers/corey-osdi08.pdf). + - Michael Cafarella, Alon Halevy, Daisy Wang, Eugene Wu, Yang Zhang. _WebTables: Exploring the Power of Tables on the Web_. VLDB 2008. [PDF](papers/webtables-vldb08.pdf) Modified: personal-site/trunk/src/links.txt =================================================================== --- personal-site/trunk/src/links.txt 2008-07-30 03:15:58 UTC (rev 913) +++ personal-site/trunk/src/links.txt 2008-07-30 07:05:58 UTC (rev 914) @@ -4,19 +4,22 @@ Myself Elsewhere ---------------- -- [Blog](http://scripts.mit.edu/~y_z/wp/) +- [My blog] - [Bookmarks]: Mirrors my Google Bookmarks using [gbookmark2delicious]. I post articles, software/tools, research projects, homepages, and just about anything else noteworthy that I come across. -- [Google Reader Shared Items]: I try to keep this restricted to posts that are - technical in nature, with a heavy emphasis on software systems in computer - science. +- [Google Reader Shared Items]: These are articles that I found interesting + from my RSS reader (Google Reader). I try to keep this restricted to posts + that are technical in nature, with a heavy emphasis on software systems in + computer science, but sometimes I share things like release announcements of + some of my favorite software. - [All my feed subscriptions] ([RSS]): All my Google Reader subscriptions, merged via Yahoo Pipes. Like my shared items, this is still mostly technical content. - [Facebook](http://www.facebook.com/profile.php?id=708869) - [LinkedIn](http://www.linkedin.com/in/yzhang) +[Blog]: http://scripts.mit.edu/~y_z/wp/ [Bookmarks]: http://del.icio.us/yaaang/ [gbookmark2delicious]: http://gbookmark2delicious.googlecode.com/ [Google Reader Shared Items]: https://www.google.com/reader/shared/18352898346631652002 @@ -31,10 +34,13 @@ Haskell posts. Low frequency. - [All Things Distributed]: Werner Vogels' blog (Amazon CTO and former CMU prof). Focus on distributed systems. Low frequency. -- [Ars Technica]: Jon "Hannibal" Stokes' pieces great explanatory articles on +- [Ars Technica]: Jon "Hannibal" Stokes' great explanatory articles on computer architecture topics. Low frequency. - [Evan Jones' Scratch Pad]: Labmate's blog on systems topics with occasional low-level articles on programming. Low frequency. +- [Geeking with Greg]: A blog by Greg Linden, the guy behind Amazon's + recommendation and personalization systems, now at MS Live Labs. Lots of good + discussion on IR research. Low frequency. - [High Scalability]: Blog on systems and scalability, particularly in the web applications/datacenter universe. The author frequently provides useful summarizing notes. Medium frequency. @@ -58,6 +64,7 @@ [All Things Distributed]: http://www.allthingsdistributed.com/ [Ars Technica]: http://arstechnica.com/index.ars [Evan Jones' Scratch Pad]: http://evanjones.ca/ +[Geeking with Greg]: http://glinden.blogspot.com/ [High Scalability]: http://www.highscalability.com/ [Kernel Trap]: http://kerneltrap.org/ [Linux kernel mailing list]: http://lkml.org/ Property changes on: personal-site/trunk/static/papers/corey-osdi08.pdf ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-07-30 03:15:48
|
Revision: 913 http://assorted.svn.sourceforge.net/assorted/?rev=913&view=rev Author: yangzhang Date: 2008-07-30 03:15:58 +0000 (Wed, 30 Jul 2008) Log Message: ----------- added reflection benchmark Added Paths: ----------- sandbox/trunk/src/java/ReflectionBench.java Added: sandbox/trunk/src/java/ReflectionBench.java =================================================================== --- sandbox/trunk/src/java/ReflectionBench.java (rev 0) +++ sandbox/trunk/src/java/ReflectionBench.java 2008-07-30 03:15:58 UTC (rev 913) @@ -0,0 +1,31 @@ +public class ReflectionBench { + public static void main(String[] args) throws Exception { + Object object = new Object(); + Class<?> c = Object.class; + + int loops = 100000; + + long start = System.currentTimeMillis(); + for( int i = 0; i < loops; i++ ) + { + object.toString(); + } + System.out.println( loops + " regular method calls:" + (System.currentTimeMillis() - start) + " milliseconds." ); + java.lang.reflect.Method method = c.getMethod( "toString" ); + + start = System.currentTimeMillis(); + for( int i = 0; i < loops; i++ ) + { + method.invoke( object ); + } + + System.out.println( loops + " reflective method calls without lookup:" + (System.currentTimeMillis() - start) + " milliseconds." ); + start = System.currentTimeMillis(); + for( int i = 0; i < loops; i++ ) + { + method = c.getMethod( "toString" ); + method.invoke( object ); + } + System.out.println( loops + " reflective method calls with lookup:" + (System.currentTimeMillis() - start) + " milliseconds." ); + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-07-30 02:08:27
|
Revision: 912 http://assorted.svn.sourceforge.net/assorted/?rev=912&view=rev Author: yangzhang Date: 2008-07-30 02:08:37 +0000 (Wed, 30 Jul 2008) Log Message: ----------- added demo that with cannot be implemented in python 2.4 Added Paths: ----------- sandbox/trunk/src/py/with_decorator.py Added: sandbox/trunk/src/py/with_decorator.py =================================================================== --- sandbox/trunk/src/py/with_decorator.py (rev 0) +++ sandbox/trunk/src/py/with_decorator.py 2008-07-30 02:08:37 UTC (rev 912) @@ -0,0 +1,45 @@ +# Can we implement the with statement using decorators? Not really.... + +class ctxmgr(object): pass # not used + +def With(ctx): + def wrapper(func): + if type(ctx) == ctxmgr: + rsrc = ctx.enter() + if func.func_code.co_argcount == 0: result = func() + else: result = func(rsrc) + ctx.exit() + elif type(ctx).__name__ == 'generator': + rsrc = ctx.next() + if func.func_code.co_argcount == 0: result = func() + else: result = func(rsrc) + else: assert False, type(ctx) + return result + return wrapper + +# some context managers + +def closing(rsrc): + try: yield rsrc + finally: print 'CLOSIN'; rsrc.close() + +def locking(path): + @With(closing(file(path, 'w'))) + def foo(f): + flock(f, LOCK_EX) + # here is where we fail! we'd need to yield two levels up the + # stack! + try: yield + finally: flock(f, LOCK_UN) + return foo + +# demos + +@With(closing(file('/tmp/hello', 'w'))) +def foo(f): print 'WRITING'; f.write('hello!') + +@With(locking('/tmp/mylock')) +def foo(): + print 'locked' + return raw_input() +print foo This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-07-30 01:01:26
|
Revision: 911 http://assorted.svn.sourceforge.net/assorted/?rev=911&view=rev Author: yangzhang Date: 2008-07-30 01:01:34 +0000 (Wed, 30 Jul 2008) Log Message: ----------- added flock demo Added Paths: ----------- sandbox/trunk/src/py/flocking.py Added: sandbox/trunk/src/py/flocking.py =================================================================== --- sandbox/trunk/src/py/flocking.py (rev 0) +++ sandbox/trunk/src/py/flocking.py 2008-07-30 01:01:34 UTC (rev 911) @@ -0,0 +1,18 @@ +#!/usr/bin/env python + +# Demo of flock. Try running this concurrently from two shells. + +from __future__ import with_statement +from fcntl import * + +with file('/tmp/mylock', 'w') as f: + print 'locking' + flock(f, LOCK_EX) + print 'locked' + + print 'press enter to continue...' + raw_input() + + print 'unlocking' + flock(f, LOCK_UN) + print 'unlocked' Property changes on: sandbox/trunk/src/py/flocking.py ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-07-29 20:47:01
|
Revision: 910 http://assorted.svn.sourceforge.net/assorted/?rev=910&view=rev Author: yangzhang Date: 2008-07-29 20:47:10 +0000 (Tue, 29 Jul 2008) Log Message: ----------- added jni demo and benchmark Added Paths: ----------- sandbox/trunk/src/java/jni/ sandbox/trunk/src/java/jni/Bench/ sandbox/trunk/src/java/jni/Bench/Bench.cc sandbox/trunk/src/java/jni/Bench/Bench.java sandbox/trunk/src/java/jni/Bench/Makefile sandbox/trunk/src/java/jni/HelloWorld/ sandbox/trunk/src/java/jni/HelloWorld/HelloWorld.cc sandbox/trunk/src/java/jni/HelloWorld/HelloWorld.java sandbox/trunk/src/java/jni/HelloWorld/Makefile Added: sandbox/trunk/src/java/jni/Bench/Bench.cc =================================================================== --- sandbox/trunk/src/java/jni/Bench/Bench.cc (rev 0) +++ sandbox/trunk/src/java/jni/Bench/Bench.cc 2008-07-29 20:47:10 UTC (rev 910) @@ -0,0 +1,10 @@ +#include <jni.h> +#include <iostream> +#include "Bench.h" + +using namespace std; + +JNIEXPORT void JNICALL +Java_Bench_foo(JNIEnv *env, jclass cls) +{ +} Added: sandbox/trunk/src/java/jni/Bench/Bench.java =================================================================== --- sandbox/trunk/src/java/jni/Bench/Bench.java (rev 0) +++ sandbox/trunk/src/java/jni/Bench/Bench.java 2008-07-29 20:47:10 UTC (rev 910) @@ -0,0 +1,15 @@ +public class Bench { + private static native void foo(); + public static void main(String[] args) { + int count = 1000000; + long start = System.nanoTime(); + for (int i = 0; i < count; i++) + foo(); + long end = System.nanoTime(); + System.out.println(end - start + " ns"); + System.out.println((((double) end - start) / count) + " ns/call"); + } + static { + System.loadLibrary("Bench"); + } +} Added: sandbox/trunk/src/java/jni/Bench/Makefile =================================================================== --- sandbox/trunk/src/java/jni/Bench/Makefile (rev 0) +++ sandbox/trunk/src/java/jni/Bench/Makefile 2008-07-29 20:47:10 UTC (rev 910) @@ -0,0 +1,19 @@ +all: libBench.so + java -Djava.library.path=. Bench + +libBench.so: Bench.cc Bench.h + g++ -shared -fPIC \ + -I/usr/lib/jvm/java-6-openjdk/include/ \ + -I/usr/lib/jvm/java-6-openjdk/include/linux \ + -o libBench.so Bench.cc + +Bench.h: Bench.class + javah -jni Bench + +Bench.class: Bench.java + javac Bench.java + +clean: + rm -f libBench.so Bench.h Bench.class + +.PHONY: clean Added: sandbox/trunk/src/java/jni/HelloWorld/HelloWorld.cc =================================================================== --- sandbox/trunk/src/java/jni/HelloWorld/HelloWorld.cc (rev 0) +++ sandbox/trunk/src/java/jni/HelloWorld/HelloWorld.cc 2008-07-29 20:47:10 UTC (rev 910) @@ -0,0 +1,12 @@ +#include <jni.h> +#include <iostream> +#include "HelloWorld.h" + +using namespace std; + +JNIEXPORT void JNICALL +Java_HelloWorld_print(JNIEnv *env, jobject obj) +{ + cout << "Hello World!" << endl; + return; +} Added: sandbox/trunk/src/java/jni/HelloWorld/HelloWorld.java =================================================================== --- sandbox/trunk/src/java/jni/HelloWorld/HelloWorld.java (rev 0) +++ sandbox/trunk/src/java/jni/HelloWorld/HelloWorld.java 2008-07-29 20:47:10 UTC (rev 910) @@ -0,0 +1,9 @@ +public class HelloWorld { + private native void print(); + public static void main(String[] args) { + new HelloWorld().print(); + } + static { + System.loadLibrary("HelloWorld"); + } +} Added: sandbox/trunk/src/java/jni/HelloWorld/Makefile =================================================================== --- sandbox/trunk/src/java/jni/HelloWorld/Makefile (rev 0) +++ sandbox/trunk/src/java/jni/HelloWorld/Makefile 2008-07-29 20:47:10 UTC (rev 910) @@ -0,0 +1,19 @@ +all: libHelloWorld.so + java -Djava.library.path=. HelloWorld + +libHelloWorld.so: HelloWorld.cc HelloWorld.h + g++ -shared -fPIC \ + -I/usr/lib/jvm/java-6-openjdk/include/ \ + -I/usr/lib/jvm/java-6-openjdk/include/linux \ + -o libHelloWorld.so HelloWorld.cc + +HelloWorld.h: HelloWorld.class + javah -jni HelloWorld + +HelloWorld.class: HelloWorld.java + javac HelloWorld.java + +clean: + rm -f libHelloWorld.so HelloWorld.h HelloWorld.class + +.PHONY: clean This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-07-27 23:05:37
|
Revision: 909 http://assorted.svn.sourceforge.net/assorted/?rev=909&view=rev Author: yangzhang Date: 2008-07-27 23:05:45 +0000 (Sun, 27 Jul 2008) Log Message: ----------- added .devscripts Modified Paths: -------------- configs/trunk/setup-yang.bash Added Paths: ----------- configs/trunk/src/devscripts Modified: configs/trunk/setup-yang.bash =================================================================== --- configs/trunk/setup-yang.bash 2008-07-26 04:19:19 UTC (rev 908) +++ configs/trunk/setup-yang.bash 2008-07-27 23:05:45 UTC (rev 909) @@ -23,4 +23,5 @@ install .aspell.en.prepl aspell/aspell.en.prepl install .aspell.en.pws aspell/aspell.en.pws install .supybot/ supybot/yangbot.conf +install .devscripts devscripts # TODO figure out a place to put the .profile Added: configs/trunk/src/devscripts =================================================================== --- configs/trunk/src/devscripts (rev 0) +++ configs/trunk/src/devscripts 2008-07-27 23:05:45 UTC (rev 909) @@ -0,0 +1 @@ +DEBUILD_DPKG_BUILDPACKAGE_OPTS='-us -uc -sa' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-07-26 04:19:10
|
Revision: 908 http://assorted.svn.sourceforge.net/assorted/?rev=908&view=rev Author: yangzhang Date: 2008-07-26 04:19:19 +0000 (Sat, 26 Jul 2008) Log Message: ----------- added supybot configuration Modified Paths: -------------- configs/trunk/setup-yang.bash Added Paths: ----------- configs/trunk/src/supybot/ configs/trunk/src/supybot/yangbot.conf Modified: configs/trunk/setup-yang.bash =================================================================== --- configs/trunk/setup-yang.bash 2008-07-25 02:04:25 UTC (rev 907) +++ configs/trunk/setup-yang.bash 2008-07-26 04:19:19 UTC (rev 908) @@ -22,4 +22,5 @@ install .abcde.conf abcde.conf install .aspell.en.prepl aspell/aspell.en.prepl install .aspell.en.pws aspell/aspell.en.pws +install .supybot/ supybot/yangbot.conf # TODO figure out a place to put the .profile Added: configs/trunk/src/supybot/yangbot.conf =================================================================== --- configs/trunk/src/supybot/yangbot.conf (rev 0) +++ configs/trunk/src/supybot/yangbot.conf 2008-07-26 04:19:19 UTC (rev 908) @@ -0,0 +1,1302 @@ +### +# Determines the bot's default nick. +# +# Default value: supybot +### +supybot.nick: yangbot + +### +# Determines what alternative nicks will be used if the primary nick +# (supybot.nick) isn't available. A %s in this nick is replaced by the +# value of supybot.nick when used. If no alternates are given, or if all +# are used, the supybot.nick will be perturbed appropriately until an +# unused nick is found. +# +# Default value: %s` %s_ +### +supybot.nick.alternates: %s` %s_ + +### +# Determines the bot's ident string, if the server doesn't provide one +# by default. +# +# Default value: supybot +### +supybot.ident: supybot + +### +# Determines the user the bot sends to the server. A standard user using +# the current version of the bot will be generated if this is left +# empty. +# +# Default value: +### +supybot.user: + +### +# Determines what networks the bot will connect to. +# +# Default value: +### +supybot.networks: freenode + +### +# Determines what password will be used on freenode. Yes, we know that +# technically passwords are server-specific and not network-specific, +# but this is the best we can do right now. +# +# Default value: +### +supybot.networks.freenode.password: + +### +# Determines what servers the bot will connect to for freenode. Each +# will be tried in order, wrapping back to the first when the cycle is +# completed. +# +# Default value: +### +supybot.networks.freenode.servers: irc.freenode.org:6667 + +### +# Determines what channels the bot will join only on freenode. +# +# Default value: +### +supybot.networks.freenode.channels: #hz + +### +# Determines what key (if any) will be used to join the channel. +# +# Default value: +### +supybot.networks.freenode.channels.key: + +### +# Determines whether the bot will attempt to connect with SSL sockets to +# freenode. +# +# Default value: False +### +supybot.networks.freenode.ssl: False + +### +# Determines how timestamps printed for human reading should be +# formatted. Refer to the Python documentation for the time module to +# see valid formatting characters for time formats. +# +# Default value: %I:%M %p, %B %d, %Y +### +supybot.reply.format.time: %I:%M %p, %B %d, %Y + +### +# Determines whether elapsed times will be given as "1 day, 2 hours, 3 +# minutes, and 15 seconds" or as "1d 2h 3m 15s". +# +# Default value: False +### +supybot.reply.format.time.elapsed.short: False + +### +# Determines the absolute maximum length of the bot's reply -- no reply +# will be passed through the bot with a length greater than this. +# +# Default value: 131072 +### +supybot.reply.maximumLength: 131072 + +### +# Determines whether the bot will break up long messages into chunks and +# allow users to use the 'more' command to get the remaining chunks. +# +# Default value: True +### +supybot.reply.mores: True + +### +# Determines what the maximum number of chunks (for use with the 'more' +# command) will be. +# +# Default value: 50 +### +supybot.reply.mores.maximum: 50 + +### +# Determines how long individual chunks will be. If set to 0, uses our +# super-tweaked, get-the-most-out-of-an-individual-message default. +# +# Default value: 0 +### +supybot.reply.mores.length: 0 + +### +# Determines how many mores will be sent instantly (i.e., without the +# use of the more command, immediately when they are formed). Defaults +# to 1, which means that a more command will be required for all but the +# first chunk. +# +# Default value: 1 +### +supybot.reply.mores.instant: 1 + +### +# Determines whether the bot will send multi-message replies in a single +# message or in multiple messages. For safety purposes (so the bot is +# less likely to flood) it will normally send everything in a single +# message, using mores if necessary. +# +# Default value: True +### +supybot.reply.oneToOne: True + +### +# Determines whether the bot will reply with an error message when it is +# addressed but not given a valid command. If this value is False, the +# bot will remain silent, as long as no other plugins override the +# normal behavior. +# +# Default value: True +### +supybot.reply.whenNotCommand: True + +### +# Determines whether error messages that result from bugs in the bot +# will show a detailed error message (the uncaught exception) or a +# generic error message. +# +# Default value: False +### +supybot.reply.error.detailed: False + +### +# Determines whether the bot will send error messages to users in +# private. You might want to do this in order to keep channel traffic to +# minimum. This can be used in combination with +# supybot.reply.error.withNotice. +# +# Default value: False +### +supybot.reply.error.inPrivate: False + +### +# Determines whether the bot will send error messages to users via +# NOTICE instead of PRIVMSG. You might want to do this so users can +# ignore NOTICEs from the bot and not have to see error messages; or you +# might want to use it in combination with supybot.reply.errorInPrivate +# so private errors don't open a query window in most IRC clients. +# +# Default value: False +### +supybot.reply.error.withNotice: False + +### +# Determines whether the bot will send an error message to users who +# attempt to call a command for which they do not have the necessary +# capability. You may wish to make this True if you don't want users to +# understand the underlying security system preventing them from running +# certain commands. +# +# Default value: False +### +supybot.reply.error.noCapability: False + +### +# Determines whether the bot will reply privately when replying in a +# channel, rather than replying to the whole channel. +# +# Default value: False +### +supybot.reply.inPrivate: False + +### +# Determines whether the bot will reply with a notice when replying in a +# channel, rather than replying with a privmsg as normal. +# +# Default value: False +### +supybot.reply.withNotice: False + +### +# Determines whether the bot will reply with a notice when it is sending +# a private message, in order not to open a /query window in clients. +# This can be overridden by individual users via the user configuration +# variable reply.withNoticeWhenPrivate. +# +# Default value: False +### +supybot.reply.withNoticeWhenPrivate: False + +### +# Determines whether the bot will always prefix the user's nick to its +# reply to that user's command. +# +# Default value: True +### +supybot.reply.withNickPrefix: True + +### +# Determines whether the bot should attempt to reply to all messages +# even if they don't address it (either via its nick or a prefix +# character). If you set this to True, you almost certainly want to set +# supybot.reply.whenNotCommand to False. +# +# Default value: False +### +supybot.reply.whenNotAddressed: False + +### +# Determines whether the bot will allow you to send channel-related +# commands outside of that channel. Sometimes people find it confusing +# if a channel-related command (like Filter.outfilter) changes the +# behavior of the channel but was sent outside the channel itself. +# +# Default value: False +### +supybot.reply.requireChannelCommandsToBeSentInChannel: False + +### +# Supybot normally replies with the full help whenever a user misuses a +# command. If this value is set to True, the bot will only reply with +# the syntax of the command (the first line of the help) rather than the +# full help. +# +# Default value: False +### +supybot.reply.showSimpleSyntax: False + +### +# Determines what prefix characters the bot will reply to. A prefix +# character is a single character that the bot will use to determine +# what messages are addressed to it; when there are no prefix characters +# set, it just uses its nick. Each character in this string is +# interpreted individually; you can have multiple prefix chars +# simultaneously, and if any one of them is used as a prefix the bot +# will assume it is being addressed. +# +# Default value: +### +supybot.reply.whenAddressedBy.chars: , + +### +# Determines what strings the bot will reply to when they are at the +# beginning of the message. Whereas prefix.chars can only be one +# character (although there can be many of them), this variable is a +# space-separated list of strings, so you can set something like '@@ ??' +# and the bot will reply when a message is prefixed by either @@ or ??. +# +# Default value: +### +supybot.reply.whenAddressedBy.strings: + +### +# Determines whether the bot will reply when people address it by its +# nick, rather than with a prefix character. +# +# Default value: True +### +supybot.reply.whenAddressedBy.nick: True + +### +# Determines whether the bot will reply when people address it by its +# nick at the end of the message, rather than at the beginning. +# +# Default value: False +### +supybot.reply.whenAddressedBy.nick.atEnd: False + +### +# Determines what extra nicks the bot will always respond to when +# addressed by, even if its current nick is something else. +# +# Default value: +### +supybot.reply.whenAddressedBy.nicks: + +### +# Determines whether the bot will unidentify someone when that person +# changes his or her nick. Setting this to True will cause the bot to +# track such changes. It defaults to False for a little greater +# security. +# +# Default value: False +### +supybot.followIdentificationThroughNickChanges: False + +### +# Determines whether the bot will always join a channel when it's +# invited. If this value is False, the bot will only join a channel if +# the user inviting it has the 'admin' capability (or if it's explicitly +# told to join the channel using the Admin.join command) +# +# Default value: False +### +supybot.alwaysJoinOnInvite: False + +### +# Determines what message the bot replies with when a command succeeded. +# If this configuration variable is empty, no success message will be +# sent. +### +supybot.replies.success: The operation succeeded. + +### +# Determines what error message the bot gives when it wants to be +# ambiguous. +### +supybot.replies.error: An error has occurred and has been logged. Please\ + contact this bot's administrator for more\ + information. + +### +# Determines what message the bot replies with when someone tries to use +# a command that requires being identified or having a password and +# neither credential is correct. +### +supybot.replies.incorrectAuthentication: Your hostmask doesn't match or your\ + password is wrong. + +### +# Determines what error message the bot replies with when someone tries +# to accessing some information on a user the bot doesn't know about. +### +supybot.replies.noUser: I can't find %s in my user database. If you didn't\ + give a user name, then I might not know what your\ + user is, and you'll need to identify before this\ + command might work. + +### +# Determines what error message the bot replies with when someone tries +# to do something that requires them to be registered but they're not +# currently recognized. +### +supybot.replies.notRegistered: You must be registered to use this command.\ + If you are already registered, you must\ + either identify (using the identify command)\ + or add a hostmask matching your current\ + hostmask (using the "hostmask add" command). + +### +# Determines what error message is given when the bot is telling someone +# they aren't cool enough to use the command they tried to use. +### +supybot.replies.noCapability: You don't have the %s capability. If you think\ + that you should have this capability, be sure\ + that you are identified before trying again.\ + The 'whoami' command can tell you if you're\ + identified. + +### +# Determines what generic error message is given when the bot is telling +# someone that they aren't cool enough to use the command they tried to +# use, and the author of the code calling errorNoCapability didn't +# provide an explicit capability for whatever reason. +### +supybot.replies.genericNoCapability: You're missing some capability you\ + need. This could be because you\ + actually possess the anti-capability\ + for the capability that's required of\ + you, or because the channel provides\ + that anti-capability by default, or\ + because the global capabilities include\ + that anti-capability. Or, it could be\ + because the channel or\ + supybot.capabilities.default is set to\ + False, meaning that no commands are\ + allowed unless explicitly in your\ + capabilities. Either way, you can't do\ + what you want to do. + +### +# Determines what error messages the bot sends to people who try to do +# things in a channel that really should be done in private. +### +supybot.replies.requiresPrivacy: That operation cannot be done in a channel. + +### +# Determines what message the bot sends when it thinks you've +# encountered a bug that the developers don't know about. +### +supybot.replies.possibleBug: This may be a bug. If you think it is, please\ + file a bug report at <http://sourceforge.net/tr\ + acker/?func=add&group_id=58965&atid=489447>. + +### +# A floating point number of seconds to throttle snarfed URLs, in order +# to prevent loops between two bots snarfing the same URLs and having +# the snarfed URL in the output of the snarf message. +# +# Default value: 10.0 +### +supybot.snarfThrottle: 10.0 + +### +# Determines the number of seconds between running the upkeep function +# that flushes (commits) open databases, collects garbage, and records +# some useful statistics at the debugging level. +# +# Default value: 3600 +### +supybot.upkeepInterval: 3600 + +### +# Determines whether the bot will periodically flush data and +# configuration files to disk. Generally, the only time you'll want to +# set this to False is when you want to modify those configuration files +# by hand and don't want the bot to flush its current version over your +# modifications. Do note that if you change this to False inside the +# bot, your changes won't be flushed. To make this change permanent, you +# must edit the registry yourself. +# +# Default value: True +### +supybot.flush: True + +### +# Determines what characters are valid for quoting arguments to commands +# in order to prevent them from being tokenized. +# +# Default value: " +### +supybot.commands.quotes: " + +### +# Determines whether the bot will allow nested commands, which rule. You +# definitely should keep this on. +# +# Default value: True +### +supybot.commands.nested: True + +### +# Determines what the maximum number of nested commands will be; users +# will receive an error if they attempt commands more nested than this. +# +# Default value: 10 +### +supybot.commands.nested.maximum: 10 + +### +# Supybot allows you to specify what brackets are used for your nested +# commands. Valid sets of brackets include [], <>, and {} (). [] has +# strong historical motivation, as well as being the brackets that don't +# require shift. <> or () might be slightly superior because they cannot +# occur in a nick. If this string is empty, nested commands will not be +# allowed in this channel. +# +# Default value: [] +### +supybot.commands.nested.brackets: [] + +### +# Supybot allows nested commands. Enabling this option will allow nested +# commands with a syntax similar to UNIX pipes, for example: 'bot: foo | +# bar'. +# +# Default value: False +### +supybot.commands.nested.pipeSyntax: False + +### +# Determines what commands have default plugins set, and which plugins +# are set to be the default for each of those commands. +### + +### +# Determines what plugins automatically get precedence over all other +# plugins when selecting a default plugin for a command. By default, +# this includes the standard loaded plugins. You probably shouldn't +# change this if you don't know what you're doing; if you do know what +# you're doing, then also know that this set is case-sensitive. +# +# Default value: Plugin Admin Misc User Owner Config Channel +### +supybot.commands.defaultPlugins.importantPlugins: Plugin Admin Misc User Owner Config Channel + +### +# Determines what commands are currently disabled. Such commands will +# not appear in command lists, etc. They will appear not even to exist. +# +# Default value: +### +supybot.commands.disabled: + +### +# Determines whether the bot will defend itself against command- +# flooding. +# +# Default value: True +### +supybot.abuse.flood.command: True + +### +# Determines how many commands users are allowed per minute. If a user +# sends more than this many commands in any 60 second period, he or she +# will be ignored for supybot.abuse.flood.command.punishment seconds. +# +# Default value: 12 +### +supybot.abuse.flood.command.maximum: 12 + +### +# Determines how many seconds the bot will ignore users who flood it +# with commands. +# +# Default value: 300 +### +supybot.abuse.flood.command.punishment: 300 + +### +# Determines whether the bot will defend itself against invalid command- +# flooding. +# +# Default value: True +### +supybot.abuse.flood.command.invalid: True + +### +# Determines how many invalid commands users are allowed per minute. If +# a user sends more than this many invalid commands in any 60 second +# period, he or she will be ignored for +# supybot.abuse.flood.command.invalid.punishment seconds. Typically, +# this value is lower than supybot.abuse.flood.command.maximum, since +# it's far less likely (and far more annoying) for users to flood with +# invalid commands than for them to flood with valid commands. +# +# Default value: 5 +### +supybot.abuse.flood.command.invalid.maximum: 5 + +### +# Determines how many seconds the bot will ignore users who flood it +# with invalid commands. Typically, this value is higher than +# supybot.abuse.flood.command.punishment, since it's far less likely +# (and far more annoying) for users to flood witih invalid commands than +# for them to flood with valid commands. +# +# Default value: 600 +### +supybot.abuse.flood.command.invalid.punishment: 600 + +### +# Determines the default length of time a driver should block waiting +# for input. +# +# Default value: 1.0 +### +supybot.drivers.poll: 1.0 + +### +# Determines what driver module the bot will use. Socket, a simple +# driver based on timeout sockets, is used by default because it's +# simple and stable. Twisted is very stable and simple, and if you've +# got Twisted installed, is probably your best bet. If this setting is +# left as default and Twisted-support is detected, the Twisted driver +# will be used in favor of the Socket driver. +# +# Default value: default +### +supybot.drivers.module: default + +### +# Determines the maximum time the bot will wait before attempting to +# reconnect to an IRC server. The bot may, of course, reconnect earlier +# if possible. +# +# Default value: 300.0 +### +supybot.drivers.maxReconnectWait: 300.0 + +### +# Determines what directory configuration data is put into. +# +# Default value: conf +### +supybot.directories.conf: /home/yang/.supybot/conf + +### +# Determines what directory data is put into. +# +# Default value: data +### +supybot.directories.data: /home/yang/.supybot/data + +### +# Determines what directory temporary files are put into. +# +# Default value: tmp +### +supybot.directories.data.tmp: /home/yang/.supybot/data/tmp + +### +# Determines what directory backup data is put into. +# +# Default value: backup +### +supybot.directories.backup: /home/yang/.supybot/backup + +### +# Determines what directories the bot will look for plugins in. Accepts +# a comma-separated list of strings. This means that to add another +# directory, you can nest the former value and add a new one. E.g. you +# can say: bot: 'config supybot.directories.plugins [config +# supybot.directories.plugins], newPluginDirectory'. +# +# Default value: /var/lib/python-support/python2.5/supybot/plugins +### +supybot.directories.plugins: /var/lib/python-support/python2.5/supybot/plugins, /home/yang/.supybot/plugins + +### +# Determines what directory the bot will store its logfiles in. +# +# Default value: logs +### +supybot.directories.log: /home/yang/.supybot/logs + +### +# Determines what plugins will be loaded. +# +# Default value: +### +supybot.plugins: ChannelStats Admin ChannelLogger Misc User Config Channel + +### +# Determines whether this plugin is loaded by default. +### +supybot.plugins.Admin: True + +### +# Determines whether this plugin is publicly visible. +# +# Default value: True +### +supybot.plugins.Admin.public: True + +### +# Determines whether this plugin is loaded by default. +### +supybot.plugins.Channel: True + +### +# Determines whether this plugin is publicly visible. +# +# Default value: True +### +supybot.plugins.Channel.public: True + +### +# Determines whether the bot will always try to rejoin a channel +# whenever it's kicked from the channel. +# +# Default value: True +### +supybot.plugins.Channel.alwaysRejoin: True + +### +# Determines what will be used as the default banmask style. +# +# Default value: host user +### +supybot.plugins.Channel.banmask: host user + +### +# Determines whether this plugin is loaded by default. +### +supybot.plugins.ChannelLogger: True + +### +# Determines whether this plugin is publicly visible. +# +# Default value: True +### +supybot.plugins.ChannelLogger.public: True + +### +# Determines whether channel logfiles will be flushed anytime they're +# written to, rather than being buffered by the operating system. +# +# Default value: False +### +supybot.plugins.ChannelLogger.flushImmediately: False + +### +# Determines whether formatting characters (such as bolding, color, +# etc.) are removed when writing the logs to disk. +# +# Default value: True +### +supybot.plugins.ChannelLogger.stripFormatting: True + +### +# Determines whether the logs for this channel are timestamped with the +# timestamp in supybot.log.timestampFormat. +# +# Default value: True +### +supybot.plugins.ChannelLogger.timestamp: True + +### +# Determines what string a message should be prefixed with in order not +# to be logged. If you don't want any such prefix, just set it to the +# empty string. +# +# Default value: [nolog] +### +supybot.plugins.ChannelLogger.noLogPrefix: [nolog] + +### +# Determines whether the bot will automatically rotate the logs for this +# channel. The bot will rotate logs when the timestamp for the log +# changes. The timestamp is set according to the 'filenameTimestamp' +# configuration variable. +# +# Default value: False +### +supybot.plugins.ChannelLogger.rotateLogs: False + +### +# Determines how to represent the timestamp used for the filename in +# rotated logs. When this timestamp changes, the old logfiles will be +# closed and a new one started. The format characters for the timestamp +# are in the time.strftime docs at python.org. In order for your logs to +# be rotated, you'll also have to enable +# supybot.plugins.ChannelLogger.rotateLogs. +# +# Default value: %d-%a-%Y +### +supybot.plugins.ChannelLogger.filenameTimestamp: %d-%a-%Y + +### +# Determines whether the bot will partition its channel logs into +# separate directories based on different criteria. +# +# Default value: True +### +supybot.plugins.ChannelLogger.directories: True + +### +# Determines whether the bot will use a network directory if using +# directories. +# +# Default value: True +### +supybot.plugins.ChannelLogger.directories.network: True + +### +# Determines whether the bot will use a channel directory if using +# directories. +# +# Default value: True +### +supybot.plugins.ChannelLogger.directories.channel: True + +### +# Determines whether the bot will use a timestamp (determined by +# supybot.plugins.ChannelLogger.directories.timestamp.format) if using +# directories. +# +# Default value: False +### +supybot.plugins.ChannelLogger.directories.timestamp: False + +### +# Determines what timestamp format will be used in the directory +# stucture for channel logs if +# supybot.plugins.ChannelLogger.directories.timestamp is True. +# +# Default value: %B +### +supybot.plugins.ChannelLogger.directories.timestamp.format: %B + +### +# Determines whether this plugin is loaded by default. +### +supybot.plugins.ChannelStats: False + +### +# Determines whether this plugin is publicly visible. +# +# Default value: True +### +supybot.plugins.ChannelStats.public: True + +### +# Determines whether the bot will keep channel statistics on itself, +# possibly skewing the channel stats (especially in cases where the bot +# is relaying between channels on a network). +# +# Default value: True +### +supybot.plugins.ChannelStats.selfStats: True + +### +# Determines what words (i.e., pieces of text with no spaces in them) +# are considered 'smileys' for the purposes of stats-keeping. +# +# Default value: :) ;) ;] :-) :-D :D :P :p (= =) +### +supybot.plugins.ChannelStats.smileys: :) ;) ;] :-) :-D :D :P :p (= =) + +### +# Determines what words (i.e., pieces of text with no spaces in them ) +# are considered 'frowns' for the purposes of stats-keeping. +# +# Default value: :| :-/ :-\ :\ :/ :( :-( :'( +### +supybot.plugins.ChannelStats.frowns: :| :-/ :-\\ :\\ :/ :( :-( :'( + +### +# Determines whether this plugin is loaded by default. +### +supybot.plugins.Config: True + +### +# Determines whether this plugin is publicly visible. +# +# Default value: True +### +supybot.plugins.Config.public: True + +### +# Determines whether this plugin is loaded by default. +### +supybot.plugins.Misc: True + +### +# Determines whether this plugin is publicly visible. +# +# Default value: True +### +supybot.plugins.Misc.public: True + +### +# Determines whether the bot will list private plugins with the list +# command if given the --private switch. If this is disabled, non-owner +# users should be unable to see what private plugins are loaded. +# +# Default value: True +### +supybot.plugins.Misc.listPrivatePlugins: True + +### +# Determines the format string for timestamps in the Misc.last command. +# Refer to the Python documentation for the time module to see what +# formats are accepted. If you set this variable to the empty string, +# the timestamp will not be shown. +# +# Default value: [%H:%M:%S] +### +supybot.plugins.Misc.timestampFormat: [%H:%M:%S] + +### +# Determines whether or not the timestamp will be included in the output +# of last when it is part of a nested command +# +# Default value: False +### +supybot.plugins.Misc.last.nested.includeTimestamp: False + +### +# Determines whether or not the nick will be included in the output of +# last when it is part of a nested command +# +# Default value: False +### +supybot.plugins.Misc.last.nested.includeNick: False + +### +# Determines whether this plugin is loaded by default. +### +supybot.plugins.User: True + +### +# Determines whether this plugin is publicly visible. +# +# Default value: True +### +supybot.plugins.User.public: True + +### +# Determines whether the bot will always load important plugins (Admin, +# Channel, Config, Misc, Owner, and User) regardless of what their +# configured state is. Generally, if these plugins are configured not to +# load, you didn't do it on purpose, and you still want them to load. +# Users who don't want to load these plugins are smart enough to change +# the value of this variable appropriately :) +# +# Default value: True +### +supybot.plugins.alwaysLoadImportant: True + +### +# Determines what databases are available for use. If this value is not +# configured (that is, if its value is empty) then sane defaults will be +# provided. +# +# Default value: anydbm cdb flat pickle +### +supybot.databases: + +### +# Determines what filename will be used for the users database. This +# file will go into the directory specified by the +# supybot.directories.conf variable. +# +# Default value: users.conf +### +supybot.databases.users.filename: users.conf + +### +# Determines how long it takes identification to time out. If the value +# is less than or equal to zero, identification never times out. +# +# Default value: 0 +### +supybot.databases.users.timeoutIdentification: 0 + +### +# Determines whether the bot will allow users to unregister their users. +# This can wreak havoc with already-existing databases, so by default we +# don't allow it. Enable this at your own risk. (Do also note that this +# does not prevent the owner of the bot from using the unregister +# command.) +# +# Default value: False +### +supybot.databases.users.allowUnregistration: False + +### +# Determines what filename will be used for the ignores database. This +# file will go into the directory specified by the +# supybot.directories.conf variable. +# +# Default value: ignores.conf +### +supybot.databases.ignores.filename: ignores.conf + +### +# Determines what filename will be used for the channels database. This +# file will go into the directory specified by the +# supybot.directories.conf variable. +# +# Default value: channels.conf +### +supybot.databases.channels.filename: channels.conf + +### +# Determines whether database-based plugins that can be channel-specific +# will be so. This can be overridden by individual channels. Do note +# that the bot needs to be restarted immediately after changing this +# variable or your db plugins may not work for your channel; also note +# that you may wish to set +# supybot.databases.plugins.channelSpecific.link appropriately if you +# wish to share a certain channel's databases globally. +# +# Default value: True +### +supybot.databases.plugins.channelSpecific: True + +### +# Determines what channel global (non-channel-specific) databases will +# be considered a part of. This is helpful if you've been running +# channel-specific for awhile and want to turn the databases for your +# primary channel into global databases. If +# supybot.databases.plugins.channelSpecific.link.allow prevents linking, +# the current channel will be used. Do note that the bot needs to be +# restarted immediately after changing this variable or your db plugins +# may not work for your channel. +# +# Default value: # +### +supybot.databases.plugins.channelSpecific.link: # + +### +# Determines whether another channel's global (non-channel-specific) +# databases will be allowed to link to this channel's databases. Do note +# that the bot needs to be restarted immediately after changing this +# variable or your db plugins may not work for your channel. +# +# Default value: True +### +supybot.databases.plugins.channelSpecific.link.allow: True + +### +# Determines whether CDB databases will be allowed as a database +# implementation. +# +# Default value: True +### +supybot.databases.types.cdb: True + +### +# Determines how often CDB databases will have their modifications +# flushed to disk. When the number of modified records is greater than +# this part of the number of unmodified records, the database will be +# entirely flushed to disk. +# +# Default value: 0.5 +### +supybot.databases.types.cdb.maximumModifications: 0.5 + +### +# Determines whether the bot will strictly follow the RFC; currently +# this only affects what strings are considered to be nicks. If you're +# using a server or a network that requires you to message a nick such +# as ser...@th...rver then you you should set this to False. +# +# Default value: False +### +supybot.protocols.irc.strictRfc: False + +### +# Determines what user modes the bot will request from the server when +# it first connects. Many people might choose +i; some networks allow +# +x, which indicates to the auth services on those networks that you +# should be given a fake host. +# +# Default value: +### +supybot.protocols.irc.umodes: + +### +# Determines what vhost the bot will bind to before connecting to the +# IRC server. +# +# Default value: +### +supybot.protocols.irc.vhost: + +### +# Determines how many old messages the bot will keep around in its +# history. Changing this variable will not take effect until the bot is +# restarted. +# +# Default value: 1000 +### +supybot.protocols.irc.maxHistoryLength: 1000 + +### +# A floating point number of seconds to throttle queued messages -- that +# is, messages will not be sent faster than once per throttleTime +# seconds. +# +# Default value: 1.0 +### +supybot.protocols.irc.throttleTime: 1.0 + +### +# Determines whether the bot will send PINGs to the server it's +# connected to in order to keep the connection alive and discover +# earlier when it breaks. Really, this option only exists for debugging +# purposes: you always should make it True unless you're testing some +# strange server issues. +# +# Default value: True +### +supybot.protocols.irc.ping: True + +### +# Determines the number of seconds between sending pings to the server, +# if pings are being sent to the server. +# +# Default value: 120 +### +supybot.protocols.irc.ping.interval: 120 + +### +# Determines whether the bot will refuse duplicate messages to be queued +# for delivery to the server. This is a safety mechanism put in place to +# prevent plugins from sending the same message multiple times; most of +# the time it doesn't matter, unless you're doing certain kinds of +# plugin hacking. +# +# Default value: False +### +supybot.protocols.irc.queuing.duplicates: False + +### +# Determines how many seconds must elapse between JOINs sent to the +# server. +# +# Default value: 0.0 +### +supybot.protocols.irc.queuing.rateLimit.join: 0.0 + +### +# Determines how many bytes the bot will 'peek' at when looking through +# a URL for a doctype or title or something similar. It'll give up after +# it reads this many bytes, even if it hasn't found what it was looking +# for. +# +# Default value: 4096 +### +supybot.protocols.http.peekSize: 4096 + +### +# Determines what proxy all HTTP requests should go through. The value +# should be of the form 'host:port'. +# +# Default value: +### +supybot.protocols.http.proxy: + +### +# Determines whether the bot will ignore unregistered users by default. +# Of course, that'll make it particularly hard for those users to +# register or identify with the bot, but that's your problem to solve. +# +# Default value: False +### +supybot.defaultIgnore: False + +### +# A string that is the external IP of the bot. If this is the empty +# string, the bot will attempt to find out its IP dynamically (though +# sometimes that doesn't work, hence this variable). +# +# Default value: +### +supybot.externalIP: + +### +# Determines what the default timeout for socket objects will be. This +# means that *all* sockets will timeout when this many seconds has gone +# by (unless otherwise modified by the author of the code that uses the +# sockets). +# +# Default value: 10 +### +supybot.defaultSocketTimeout: 10 + +### +# Determines what file the bot should write its PID (Process ID) to, so +# you can kill it more easily. If it's left unset (as is the default) +# then no PID file will be written. A restart is required for changes to +# this variable to take effect. +# +# Default value: +### +supybot.pidFile: + +### +# Determines whether the bot will automatically thread all commands. +# +# Default value: False +### +supybot.debug.threadAllCommands: False + +### +# Determines whether the bot will automatically flush all flushers +# *very* often. Useful for debugging when you don't know what's breaking +# or when, but think that it might be logged. +# +# Default value: False +### +supybot.debug.flushVeryOften: False + +### +# Determines what the bot's logging format will be. The relevant +# documentation on the available formattings is Python's documentation +# on its logging module. +# +# Default value: %(levelname)s %(asctime)s %(name)s %(message)s +### +supybot.log.format: %(levelname)s %(asctime)s %(name)s %(message)s + +### +# Determines what the minimum priority level logged will be. Valid +# values are DEBUG, INFO, WARNING, ERROR, and CRITICAL, in order of +# increasing priority. +# +# Default value: INFO +### +supybot.log.level: INFO + +### +# Determines the format string for timestamps in logfiles. Refer to the +# Python documentation for the time module to see what formats are +# accepted. If you set this variable to the empty string, times will be +# logged in a simple seconds-since-epoch format. +# +# Default value: %Y-%m-%dT%H:%M:%S +### +supybot.log.timestampFormat: %Y-%m-%dT%H:%M:%S + +### +# Determines whether the bot will log to stdout. +# +# Default value: True +### +supybot.log.stdout: True + +### +# Determines whether the bot's logs to stdout (if enabled) will be +# colorized with ANSI color. +# +# Default value: False +### +supybot.log.stdout.colorized: False + +### +# Determines whether the bot will wrap its logs when they're output to +# stdout. +# +# Default value: True +### +supybot.log.stdout.wrap: True + +### +# Determines what the bot's logging format will be. The relevant +# documentation on the available formattings is Python's documentation +# on its logging module. +# +# Default value: %(levelname)s %(asctime)s %(message)s +### +supybot.log.stdout.format: %(levelname)s %(asctime)s %(message)s + +### +# Determines what the minimum priority level logged will be. Valid +# values are DEBUG, INFO, WARNING, ERROR, and CRITICAL, in order of +# increasing priority. +# +# Default value: INFO +### +supybot.log.stdout.level: INFO + +### +# Determines whether the bot will separate plugin logs into their own +# individual logfiles. +# +# Default value: False +### +supybot.log.plugins.individualLogfiles: False + +### +# Determines what the bot's logging format will be. The relevant +# documentation on the available formattings is Python's documentation +# on its logging module. +# +# Default value: %(levelname)s %(asctime)s %(message)s +### +supybot.log.plugins.format: %(levelname)s %(asctime)s %(message)s + +### +# These are the capabilities that are given to everyone by default. If +# they are normal capabilities, then the user will have to have the +# appropriate anti-capability if you want to override these +# capabilities; if they are anti-capabilities, then the user will have +# to have the actual capability to override these capabilities. See +# docs/CAPABILITIES if you don't understand why these default to what +# they do. +# +# Default value: -owner -admin -trusted +### +supybot.capabilities: -owner -admin -trusted + +### +# Determines whether the bot by default will allow users to have a +# capability. If this is disabled, a user must explicitly have the +# capability for whatever command he wishes to run. +# +# Default value: True +### +supybot.capabilities.default: True This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-07-25 02:04:17
|
Revision: 907 http://assorted.svn.sourceforge.net/assorted/?rev=907&view=rev Author: yangzhang Date: 2008-07-25 02:04:25 +0000 (Fri, 25 Jul 2008) Log Message: ----------- got longlongint test to work; added gdata demo Modified Paths: -------------- sandbox/trunk/src/cc/longlongint.cc Added Paths: ----------- sandbox/trunk/src/py/gdata_hello.py Modified: sandbox/trunk/src/cc/longlongint.cc =================================================================== --- sandbox/trunk/src/cc/longlongint.cc 2008-07-25 02:03:44 UTC (rev 906) +++ sandbox/trunk/src/cc/longlongint.cc 2008-07-25 02:04:25 UTC (rev 907) @@ -1,10 +1,10 @@ +#define __STDC_CONSTANT_MACROS + #include <iostream> #include <string> #include <typeinfo> +#include <stdint.h> -// doesn't work: doesn't give us INT64_C() -// #include <stdint.h> - using namespace std; void f(int64_t x) { cout << x << endl; } @@ -39,8 +39,7 @@ // cout << typeid(long long).name() << endl; // cout << typeid(string).name() << endl; - // doesn't work - // cout << INT64_C(0) << endl; + cout << INT64_C(0) << endl; return 0; } Added: sandbox/trunk/src/py/gdata_hello.py =================================================================== --- sandbox/trunk/src/py/gdata_hello.py (rev 0) +++ sandbox/trunk/src/py/gdata_hello.py 2008-07-25 02:04:25 UTC (rev 907) @@ -0,0 +1,19 @@ +#!/usr/bin/env python + +import gdata.docs.service +from getpass import getpass + +# Create a client class which will make HTTP requests with Google Docs server. +client = gdata.docs.service.DocsService() +# Authenticate using your Google Docs email address and password. +print 'username:', +username = raw_input() +password = getpass() +client.ClientLogin(username, password) + +# Query the server for an Atom feed containing a list of your documents. +documents_feed = client.GetDocumentListFeed() +# Loop through the feed and extract each document entry. +for document_entry in documents_feed.entry: + # Display the title of the document on the command line. + print document_entry.title.text Property changes on: sandbox/trunk/src/py/gdata_hello.py ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-07-25 02:03:35
|
Revision: 906 http://assorted.svn.sourceforge.net/assorted/?rev=906&view=rev Author: yangzhang Date: 2008-07-25 02:03:44 +0000 (Fri, 25 Jul 2008) Log Message: ----------- added symlink-tree, view-last-chats Modified Paths: -------------- shell-tools/trunk/src/bash-commons/bashrc.bash shell-tools/trunk/src/bash-commons/common.bash Modified: shell-tools/trunk/src/bash-commons/bashrc.bash =================================================================== --- shell-tools/trunk/src/bash-commons/bashrc.bash 2008-07-25 02:03:21 UTC (rev 905) +++ shell-tools/trunk/src/bash-commons/bashrc.bash 2008-07-25 02:03:44 UTC (rev 906) @@ -591,6 +591,14 @@ fgrep "$( date +%Y-%m-%d )" } +# view last chats +view-last-chats() { + for i in $( last-chats ) ; do + echo "==> $i <==" + html2markdown $i | tail + done | less +} + #function set_title() { # if [ $# -eq 0 ] ; then # eval set -- "$PWD" Modified: shell-tools/trunk/src/bash-commons/common.bash =================================================================== --- shell-tools/trunk/src/bash-commons/common.bash 2008-07-25 02:03:21 UTC (rev 905) +++ shell-tools/trunk/src/bash-commons/common.bash 2008-07-25 02:03:44 UTC (rev 906) @@ -459,6 +459,14 @@ done } +symlink-tree() { + local src="$1" dst="$2" + find "$src" -type d -printf '%P\0' | + xargs -0 -I_ mkdir -p "$dst/_" + find "$src" -not -type d -printf '%P\0' | + xargs -0 -I_ ln -s "$( realpath "$src" )/_" "$dst/_" +} + #if ! is_declared indent ; then # noindent #else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-07-25 02:03:12
|
Revision: 905 http://assorted.svn.sourceforge.net/assorted/?rev=905&view=rev Author: yangzhang Date: 2008-07-25 02:03:21 +0000 (Fri, 25 Jul 2008) Log Message: ----------- got project-wide settings to work Modified Paths: -------------- configs/trunk/src/vim/plugin/_yang.vim Modified: configs/trunk/src/vim/plugin/_yang.vim =================================================================== --- configs/trunk/src/vim/plugin/_yang.vim 2008-07-24 16:25:42 UTC (rev 904) +++ configs/trunk/src/vim/plugin/_yang.vim 2008-07-25 02:03:21 UTC (rev 905) @@ -39,16 +39,14 @@ - - -function ProjectDir() - let dir = expand('%:h') +function! ProjectDir() + let dir = expand('%:p:h') if (dir =~ "^$") let dir = getcwd() endif - while isdirectory(dir) && + while isdirectory(dir) && \dir !~ '^/*$' && - \glob(dir . "/.project.vim") !~ "^$" + \glob(dir . "/.project.vim") =~ "^$" let dir = fnamemodify(dir, ":h") endwhile if glob(dir . "/.project.vim") =~ "^$" @@ -57,7 +55,7 @@ return dir endfunction -" XXX Why doesn't this work the first time if I directly load a file from the command line, eg "vim foo.cc"? +" XXX This doesn't work for setting options on the triggering buffer. " XXX This is highly insecure; should only allow the same things allowed in modelines. autocmd BufNewFile,BufRead * if glob(ProjectDir() . "/.project.vim") !~ "^$" | execute "source " . ProjectDir() . "/.project.vim" | endif @@ -194,7 +192,7 @@ au BufNewFile,BufRead *.map setf map " temporaries autocmd BufNewFile,BufRead *.{lzz,tt,tcc} setlocal filetype=cpp -autocmd BufNewFile,BufRead *.{c,cc,cpp,cxx,h,lzz,tt,tcc} setlocal cindent expandtab softtabstop=2 shiftwidth=2 tabstop=8 +"autocmd BufNewFile,BufRead *.{c,cc,cpp,cxx,h,lzz,tt,tcc} setlocal cindent expandtab softtabstop=2 shiftwidth=2 tabstop=8 autocmd BufNewFile,BufRead *.java setlocal cindent noexpandtab softtabstop=4 shiftwidth=4 tabstop=4 autocmd BufNewFile,BufRead *.lzx setlocal filetype=lzx " autocmd GDB This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-07-24 16:25:33
|
Revision: 904 http://assorted.svn.sourceforge.net/assorted/?rev=904&view=rev Author: yangzhang Date: 2008-07-24 16:25:42 +0000 (Thu, 24 Jul 2008) Log Message: ----------- added streams Added Paths: ----------- cpp-commons/trunk/src/commons/streams.h Added: cpp-commons/trunk/src/commons/streams.h =================================================================== --- cpp-commons/trunk/src/commons/streams.h (rev 0) +++ cpp-commons/trunk/src/commons/streams.h 2008-07-24 16:25:42 UTC (rev 904) @@ -0,0 +1,24 @@ +#ifndef COMMONS_STREAMS_H +#define COMMONS_STREAMS_H + +#include <ostream> +#include <vector> + +namespace commons { + + using namespace std; + + // Pretty-prints a vector of ostreamables. + template <typename T> + ostream& operator<<(ostream& out, const vector<T> &v) { + out << "["; + if (!v.empty()) { + for (typename vector<T>::size_type i = 0; i < v.size() - 1; i++) + out << v[i] << ", "; + out << v.back(); + } + return out << "]"; + } +} + +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-07-21 16:15:31
|
Revision: 903 http://assorted.svn.sourceforge.net/assorted/?rev=903&view=rev Author: yangzhang Date: 2008-07-21 16:15:40 +0000 (Mon, 21 Jul 2008) Log Message: ----------- added cmpvec Added Paths: ----------- sandbox/trunk/src/cc/cmpvec.cc Added: sandbox/trunk/src/cc/cmpvec.cc =================================================================== --- sandbox/trunk/src/cc/cmpvec.cc (rev 0) +++ sandbox/trunk/src/cc/cmpvec.cc 2008-07-21 16:15:40 UTC (rev 903) @@ -0,0 +1,25 @@ +// Vectors are comparable. I get: 0 1 0, as expected. +#include <vector> +#include <iostream> +using namespace std; +int main() { + { + vector<int> xs, ys; + xs.push_back(0); + ys.push_back(0); + cout << (xs < ys) << endl;; + } + { + vector<int> xs, ys; + xs.push_back(0); + ys.push_back(1); + cout << (xs < ys) << endl;; + } + { + vector<int> xs, ys; + xs.push_back(1); + ys.push_back(0); + cout << (xs < ys) << endl;; + } + return 0; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |