started on functionality related to the game of life

This commit is contained in:
Sheldon Lee 2020-06-14 02:55:02 +01:00
parent d48e580938
commit 72435a2319
3 changed files with 339 additions and 320 deletions

20
grid.c
View File

@ -1,6 +1,13 @@
#include <stdlib.h> #include <stdlib.h>
#include "grid.h" #include "grid.h"
void initGrid(Grid* grid, unsigned int width, unsigned int height)
{
grid->size = width*height;
grid->width = width;
grid->arr = (bool*)malloc(sizeof(bool)*grid->size);
}
// maps x, y coordinate to array index of grid // maps x, y coordinate to array index of grid
unsigned int toIndex(Grid* grid, int x, int y) unsigned int toIndex(Grid* grid, int x, int y)
{ {
@ -12,11 +19,16 @@ void clearGrid(Grid* grid)
for (int i = 0; i < grid->size; i++) grid->arr[i]=false; for (int i = 0; i < grid->size; i++) grid->arr[i]=false;
} }
void initGrid(Grid* grid, unsigned int width, unsigned int height) void updateGrid(Grid* grid)
{ {
grid->size = width*height; unsigned int width = grid->width;
grid->width = width; unsigned int height = grid->size/width;
grid->arr = (bool*)malloc(sizeof(bool)*grid->size);
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
}
}
} }
void putPixel(Grid* grid, int x, int y) void putPixel(Grid* grid, int x, int y)

4
grid.h
View File

@ -12,8 +12,12 @@ typedef struct Grid {
void initGrid(Grid* grid, unsigned int width, unsigned int height); void initGrid(Grid* grid, unsigned int width, unsigned int height);
unsigned int toIndex(Grid* grid, int x, int y);
void clearGrid(Grid* grid); void clearGrid(Grid* grid);
void updateGrid(Grid* grid);
void putPixel(Grid* grid, int x, int y); void putPixel(Grid* grid, int x, int y);
void drawGrid(Grid* grid); void drawGrid(Grid* grid);

View File

@ -14,14 +14,16 @@ set backspace=indent,eol,start
set backupdir=~/.cache/vim/backup// set backupdir=~/.cache/vim/backup//
set directory=~/.cache/vim/swap// set directory=~/.cache/vim/swap//
set ruler set ruler
set shiftwidth=4
set smartindent set smartindent
set suffixes=.bak,~,.o,.info,.swp,.aux,.bbl,.blg,.brf,.cb,.dvi,.idx,.ilg,.ind,.inx,.jpg,.log,.out,.png,.toc set suffixes=.bak,~,.o,.info,.swp,.aux,.bbl,.blg,.brf,.cb,.dvi,.idx,.ilg,.ind,.inx,.jpg,.log,.out,.png,.toc
set tabstop=4
set undodir=~/.cache/vim/undo// set undodir=~/.cache/vim/undo//
let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0 let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0
let v:this_session=expand("<sfile>:p") let v:this_session=expand("<sfile>:p")
silent only silent only
silent tabonly silent tabonly
cd ~/dev/ncurses_test cd ~/dev/ncurses_gameoflife
if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == '' if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == ''
let s:wipebuf = bufnr('%') let s:wipebuf = bufnr('%')
endif endif
@ -31,11 +33,156 @@ argglobal
$argadd grid.c $argadd grid.c
$argadd main.c $argadd main.c
$argadd vect.c $argadd vect.c
$argadd grid.h
$argadd vect.h
set stal=2 set stal=2
tabnew tabnew
tabnew tabnew
tabnew tabnew
tabnew
tabnew
tabrewind tabrewind
edit grid.c
set splitbelow splitright
set nosplitbelow
set nosplitright
wincmd t
set winminheight=0
set winheight=1
set winminwidth=0
set winwidth=1
argglobal
setlocal keymap=
setlocal noarabic
setlocal autoindent
setlocal backupcopy=
setlocal balloonexpr=
setlocal nobinary
setlocal nobreakindent
setlocal breakindentopt=
setlocal bufhidden=
setlocal buflisted
setlocal buftype=
setlocal nocindent
setlocal cinkeys=0{,0},0),0],:,0#,!^F,o,O,e
setlocal cinoptions=
setlocal cinwords=if,else,while,do,for,switch
setlocal colorcolumn=
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
setlocal commentstring=/*%s*/
setlocal complete=.,w,b,u,t,i
setlocal concealcursor=
setlocal conceallevel=0
setlocal completefunc=
setlocal nocopyindent
setlocal cryptmethod=
setlocal nocursorbind
setlocal nocursorcolumn
setlocal nocursorline
setlocal cursorlineopt=both
setlocal define=^\\s*#\\s*define
setlocal dictionary=
setlocal nodiff
setlocal equalprg=
setlocal errorformat=
setlocal noexpandtab
if &filetype != 'c'
setlocal filetype=c
endif
setlocal fixendofline
setlocal foldcolumn=0
setlocal foldenable
setlocal foldexpr=0
setlocal foldignore=#
setlocal foldlevel=0
setlocal foldmarker={{{,}}}
setlocal foldmethod=manual
setlocal foldminlines=1
setlocal foldnestmax=20
setlocal foldtext=foldtext()
setlocal formatexpr=
setlocal formatoptions=croql
setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s*
setlocal formatprg=
setlocal grepprg=
setlocal iminsert=0
setlocal imsearch=-1
setlocal include=^\\s*#\\s*include
setlocal includeexpr=
setlocal indentexpr=
setlocal indentkeys=0{,0},0),0],:,0#,!^F,o,O,e
setlocal noinfercase
setlocal iskeyword=@,48-57,_,192-255
setlocal keywordprg=
setlocal nolinebreak
setlocal nolisp
setlocal lispwords=
setlocal nolist
setlocal makeencoding=
setlocal makeprg=
setlocal matchpairs=(:),{:},[:]
setlocal modeline
setlocal modifiable
setlocal nrformats=bin,octal,hex
set number
setlocal number
setlocal numberwidth=4
setlocal omnifunc=ccomplete#Complete
setlocal path=
setlocal nopreserveindent
setlocal nopreviewwindow
setlocal quoteescape=\\
setlocal noreadonly
set relativenumber
setlocal relativenumber
setlocal norightleft
setlocal rightleftcmd=search
setlocal noscrollbind
setlocal scrolloff=-1
setlocal shiftwidth=4
setlocal noshortname
setlocal showbreak=
setlocal sidescrolloff=-1
setlocal signcolumn=auto
setlocal smartindent
setlocal softtabstop=0
setlocal nospell
setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+
setlocal spellfile=
setlocal spelllang=en
setlocal statusline=
setlocal suffixesadd=
setlocal swapfile
setlocal synmaxcol=3000
if &syntax != 'c'
setlocal syntax=c
endif
setlocal tabstop=4
setlocal tagcase=
setlocal tagfunc=
setlocal tags=
setlocal termwinkey=
setlocal termwinscroll=10000
setlocal termwinsize=
setlocal textwidth=0
setlocal thesaurus=
setlocal noundofile
setlocal undolevels=-123456
setlocal varsofttabstop=
setlocal vartabstop=
setlocal wincolor=
setlocal nowinfixheight
setlocal nowinfixwidth
setlocal wrap
setlocal wrapmargin=0
silent! normal! zE
let s:l = 29 - ((28 * winheight(0) + 27) / 54)
if s:l < 1 | let s:l = 1 | endif
exe s:l
normal! zt
29
normal! 0
tabnext
edit main.c edit main.c
set splitbelow splitright set splitbelow splitright
set nosplitbelow set nosplitbelow
@ -134,7 +281,7 @@ setlocal norightleft
setlocal rightleftcmd=search setlocal rightleftcmd=search
setlocal noscrollbind setlocal noscrollbind
setlocal scrolloff=-1 setlocal scrolloff=-1
setlocal shiftwidth=8 setlocal shiftwidth=4
setlocal noshortname setlocal noshortname
setlocal showbreak= setlocal showbreak=
setlocal sidescrolloff=-1 setlocal sidescrolloff=-1
@ -152,7 +299,7 @@ setlocal synmaxcol=3000
if &syntax != 'c' if &syntax != 'c'
setlocal syntax=c setlocal syntax=c
endif endif
setlocal tabstop=8 setlocal tabstop=4
setlocal tagcase= setlocal tagcase=
setlocal tagfunc= setlocal tagfunc=
setlocal tags= setlocal tags=
@ -171,304 +318,15 @@ setlocal nowinfixwidth
setlocal wrap setlocal wrap
setlocal wrapmargin=0 setlocal wrapmargin=0
silent! normal! zE silent! normal! zE
let s:l = 15 - ((14 * winheight(0) + 27) / 55) let s:l = 1 - ((0 * winheight(0) + 27) / 54)
if s:l < 1 | let s:l = 1 | endif if s:l < 1 | let s:l = 1 | endif
exe s:l exe s:l
normal! zt normal! zt
15 1
normal! 0 normal! 0
tabnext tabnext
edit grid.c
set splitbelow splitright
wincmd _ | wincmd |
vsplit
1wincmd h
wincmd w
set nosplitbelow
set nosplitright
wincmd t
set winminheight=0
set winheight=1
set winminwidth=0
set winwidth=1
exe 'vert 1resize ' . ((&columns * 116 + 119) / 238)
exe 'vert 2resize ' . ((&columns * 121 + 119) / 238)
argglobal
1argu
setlocal keymap=
setlocal noarabic
setlocal autoindent
setlocal backupcopy=
setlocal balloonexpr=
setlocal nobinary
setlocal nobreakindent
setlocal breakindentopt=
setlocal bufhidden=
setlocal buflisted
setlocal buftype=
setlocal nocindent
setlocal cinkeys=0{,0},0),0],:,0#,!^F,o,O,e
setlocal cinoptions=
setlocal cinwords=if,else,while,do,for,switch
setlocal colorcolumn=
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
setlocal commentstring=/*%s*/
setlocal complete=.,w,b,u,t,i
setlocal concealcursor=
setlocal conceallevel=0
setlocal completefunc=
setlocal nocopyindent
setlocal cryptmethod=
setlocal nocursorbind
setlocal nocursorcolumn
setlocal nocursorline
setlocal cursorlineopt=both
setlocal define=^\\s*#\\s*define
setlocal dictionary=
setlocal nodiff
setlocal equalprg=
setlocal errorformat=
setlocal noexpandtab
if &filetype != 'c'
setlocal filetype=c
endif
setlocal fixendofline
setlocal foldcolumn=0
setlocal foldenable
setlocal foldexpr=0
setlocal foldignore=#
setlocal foldlevel=0
setlocal foldmarker={{{,}}}
setlocal foldmethod=manual
setlocal foldminlines=1
setlocal foldnestmax=20
setlocal foldtext=foldtext()
setlocal formatexpr=
setlocal formatoptions=croql
setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s*
setlocal formatprg=
setlocal grepprg=
setlocal iminsert=0
setlocal imsearch=-1
setlocal include=^\\s*#\\s*include
setlocal includeexpr=
setlocal indentexpr=
setlocal indentkeys=0{,0},0),0],:,0#,!^F,o,O,e
setlocal noinfercase
setlocal iskeyword=@,48-57,_,192-255
setlocal keywordprg=
setlocal nolinebreak
setlocal nolisp
setlocal lispwords=
setlocal nolist
setlocal makeencoding=
setlocal makeprg=
setlocal matchpairs=(:),{:},[:]
setlocal modeline
setlocal modifiable
setlocal nrformats=bin,octal,hex
set number
setlocal number
setlocal numberwidth=4
setlocal omnifunc=ccomplete#Complete
setlocal path=
setlocal nopreserveindent
setlocal nopreviewwindow
setlocal quoteescape=\\
setlocal noreadonly
set relativenumber
setlocal relativenumber
setlocal norightleft
setlocal rightleftcmd=search
setlocal noscrollbind
setlocal scrolloff=-1
setlocal shiftwidth=8
setlocal noshortname
setlocal showbreak=
setlocal sidescrolloff=-1
setlocal signcolumn=auto
setlocal smartindent
setlocal softtabstop=0
setlocal nospell
setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+
setlocal spellfile=
setlocal spelllang=en
setlocal statusline=
setlocal suffixesadd=
setlocal swapfile
setlocal synmaxcol=3000
if &syntax != 'c'
setlocal syntax=c
endif
setlocal tabstop=8
setlocal tagcase=
setlocal tagfunc=
setlocal tags=
setlocal termwinkey=
setlocal termwinscroll=10000
setlocal termwinsize=
setlocal textwidth=0
setlocal thesaurus=
setlocal noundofile
setlocal undolevels=-123456
setlocal varsofttabstop=
setlocal vartabstop=
setlocal wincolor=
setlocal nowinfixheight
setlocal nowinfixwidth
setlocal wrap
setlocal wrapmargin=0
silent! normal! zE
let s:l = 3 - ((2 * winheight(0) + 27) / 54)
if s:l < 1 | let s:l = 1 | endif
exe s:l
normal! zt
3
normal! 0
wincmd w
argglobal
1argu
if bufexists("grid.h") | buffer grid.h | else | edit grid.h | endif
setlocal keymap=
setlocal noarabic
setlocal autoindent
setlocal backupcopy=
setlocal balloonexpr=
setlocal nobinary
setlocal nobreakindent
setlocal breakindentopt=
setlocal bufhidden=
setlocal buflisted
setlocal buftype=
setlocal nocindent
setlocal cinkeys=0{,0},0),0],:,0#,!^F,o,O,e
setlocal cinoptions=
setlocal cinwords=if,else,while,do,for,switch
setlocal colorcolumn=
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
setlocal commentstring=/*%s*/
setlocal complete=.,w,b,u,t,i
setlocal concealcursor=
setlocal conceallevel=0
setlocal completefunc=
setlocal nocopyindent
setlocal cryptmethod=
setlocal nocursorbind
setlocal nocursorcolumn
setlocal nocursorline
setlocal cursorlineopt=both
setlocal define=^\\s*#\\s*define
setlocal dictionary=
setlocal nodiff
setlocal equalprg=
setlocal errorformat=
setlocal noexpandtab
if &filetype != 'cpp'
setlocal filetype=cpp
endif
setlocal fixendofline
setlocal foldcolumn=0
setlocal foldenable
setlocal foldexpr=0
setlocal foldignore=#
setlocal foldlevel=0
setlocal foldmarker={{{,}}}
setlocal foldmethod=manual
setlocal foldminlines=1
setlocal foldnestmax=20
setlocal foldtext=foldtext()
setlocal formatexpr=
setlocal formatoptions=croql
setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s*
setlocal formatprg=
setlocal grepprg=
setlocal iminsert=0
setlocal imsearch=-1
setlocal include=^\\s*#\\s*include
setlocal includeexpr=
setlocal indentexpr=
setlocal indentkeys=0{,0},0),0],:,0#,!^F,o,O,e
setlocal noinfercase
setlocal iskeyword=@,48-57,_,192-255
setlocal keywordprg=
setlocal nolinebreak
setlocal nolisp
setlocal lispwords=
setlocal nolist
setlocal makeencoding=
setlocal makeprg=
setlocal matchpairs=(:),{:},[:]
setlocal modeline
setlocal modifiable
setlocal nrformats=bin,octal,hex
set number
setlocal number
setlocal numberwidth=4
setlocal omnifunc=ccomplete#Complete
setlocal path=
setlocal nopreserveindent
setlocal nopreviewwindow
setlocal quoteescape=\\
setlocal noreadonly
set relativenumber
setlocal relativenumber
setlocal norightleft
setlocal rightleftcmd=search
setlocal noscrollbind
setlocal scrolloff=-1
setlocal shiftwidth=8
setlocal noshortname
setlocal showbreak=
setlocal sidescrolloff=-1
setlocal signcolumn=auto
setlocal smartindent
setlocal softtabstop=0
setlocal nospell
setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+
setlocal spellfile=
setlocal spelllang=en
setlocal statusline=
setlocal suffixesadd=
setlocal swapfile
setlocal synmaxcol=3000
if &syntax != 'cpp'
setlocal syntax=cpp
endif
setlocal tabstop=8
setlocal tagcase=
setlocal tagfunc=
setlocal tags=
setlocal termwinkey=
setlocal termwinscroll=10000
setlocal termwinsize=
setlocal textwidth=0
setlocal thesaurus=
setlocal noundofile
setlocal undolevels=-123456
setlocal varsofttabstop=
setlocal vartabstop=
setlocal wincolor=
setlocal nowinfixheight
setlocal nowinfixwidth
setlocal wrap
setlocal wrapmargin=0
silent! normal! zE
let s:l = 11 - ((0 * winheight(0) + 27) / 54)
if s:l < 1 | let s:l = 1 | endif
exe s:l
normal! zt
11
normal! 05|
wincmd w
exe 'vert 1resize ' . ((&columns * 116 + 119) / 238)
exe 'vert 2resize ' . ((&columns * 121 + 119) / 238)
tabnext
edit vect.c edit vect.c
set splitbelow splitright set splitbelow splitright
wincmd _ | wincmd |
vsplit
1wincmd h
wincmd w
set nosplitbelow set nosplitbelow
set nosplitright set nosplitright
wincmd t wincmd t
@ -476,8 +334,6 @@ set winminheight=0
set winheight=1 set winheight=1
set winminwidth=0 set winminwidth=0
set winwidth=1 set winwidth=1
exe 'vert 1resize ' . ((&columns * 115 + 119) / 238)
exe 'vert 2resize ' . ((&columns * 122 + 119) / 238)
argglobal argglobal
3argu 3argu
setlocal keymap= setlocal keymap=
@ -567,7 +423,7 @@ setlocal norightleft
setlocal rightleftcmd=search setlocal rightleftcmd=search
setlocal noscrollbind setlocal noscrollbind
setlocal scrolloff=-1 setlocal scrolloff=-1
setlocal shiftwidth=8 setlocal shiftwidth=4
setlocal noshortname setlocal noshortname
setlocal showbreak= setlocal showbreak=
setlocal sidescrolloff=-1 setlocal sidescrolloff=-1
@ -585,7 +441,7 @@ setlocal synmaxcol=3000
if &syntax != 'c' if &syntax != 'c'
setlocal syntax=c setlocal syntax=c
endif endif
setlocal tabstop=8 setlocal tabstop=4
setlocal tagcase= setlocal tagcase=
setlocal tagfunc= setlocal tagfunc=
setlocal tags= setlocal tags=
@ -610,10 +466,18 @@ exe s:l
normal! zt normal! zt
1 1
normal! 0 normal! 0
wincmd w tabnext
edit grid.h
set splitbelow splitright
set nosplitbelow
set nosplitright
wincmd t
set winminheight=0
set winheight=1
set winminwidth=0
set winwidth=1
argglobal argglobal
3argu 4argu
if bufexists("vect.h") | buffer vect.h | else | edit vect.h | endif
setlocal keymap= setlocal keymap=
setlocal noarabic setlocal noarabic
setlocal autoindent setlocal autoindent
@ -701,7 +565,7 @@ setlocal norightleft
setlocal rightleftcmd=search setlocal rightleftcmd=search
setlocal noscrollbind setlocal noscrollbind
setlocal scrolloff=-1 setlocal scrolloff=-1
setlocal shiftwidth=8 setlocal shiftwidth=4
setlocal noshortname setlocal noshortname
setlocal showbreak= setlocal showbreak=
setlocal sidescrolloff=-1 setlocal sidescrolloff=-1
@ -719,7 +583,149 @@ setlocal synmaxcol=3000
if &syntax != 'cpp' if &syntax != 'cpp'
setlocal syntax=cpp setlocal syntax=cpp
endif endif
setlocal tabstop=8 setlocal tabstop=4
setlocal tagcase=
setlocal tagfunc=
setlocal tags=
setlocal termwinkey=
setlocal termwinscroll=10000
setlocal termwinsize=
setlocal textwidth=0
setlocal thesaurus=
setlocal noundofile
setlocal undolevels=-123456
setlocal varsofttabstop=
setlocal vartabstop=
setlocal wincolor=
setlocal nowinfixheight
setlocal nowinfixwidth
setlocal wrap
setlocal wrapmargin=0
silent! normal! zE
let s:l = 1 - ((0 * winheight(0) + 27) / 54)
if s:l < 1 | let s:l = 1 | endif
exe s:l
normal! zt
1
normal! 0
tabnext
edit vect.h
set splitbelow splitright
set nosplitbelow
set nosplitright
wincmd t
set winminheight=0
set winheight=1
set winminwidth=0
set winwidth=1
argglobal
5argu
setlocal keymap=
setlocal noarabic
setlocal autoindent
setlocal backupcopy=
setlocal balloonexpr=
setlocal nobinary
setlocal nobreakindent
setlocal breakindentopt=
setlocal bufhidden=
setlocal buflisted
setlocal buftype=
setlocal nocindent
setlocal cinkeys=0{,0},0),0],:,0#,!^F,o,O,e
setlocal cinoptions=
setlocal cinwords=if,else,while,do,for,switch
setlocal colorcolumn=
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
setlocal commentstring=/*%s*/
setlocal complete=.,w,b,u,t,i
setlocal concealcursor=
setlocal conceallevel=0
setlocal completefunc=
setlocal nocopyindent
setlocal cryptmethod=
setlocal nocursorbind
setlocal nocursorcolumn
setlocal nocursorline
setlocal cursorlineopt=both
setlocal define=^\\s*#\\s*define
setlocal dictionary=
setlocal nodiff
setlocal equalprg=
setlocal errorformat=
setlocal noexpandtab
if &filetype != 'cpp'
setlocal filetype=cpp
endif
setlocal fixendofline
setlocal foldcolumn=0
setlocal foldenable
setlocal foldexpr=0
setlocal foldignore=#
setlocal foldlevel=0
setlocal foldmarker={{{,}}}
setlocal foldmethod=manual
setlocal foldminlines=1
setlocal foldnestmax=20
setlocal foldtext=foldtext()
setlocal formatexpr=
setlocal formatoptions=croql
setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s*
setlocal formatprg=
setlocal grepprg=
setlocal iminsert=0
setlocal imsearch=-1
setlocal include=^\\s*#\\s*include
setlocal includeexpr=
setlocal indentexpr=
setlocal indentkeys=0{,0},0),0],:,0#,!^F,o,O,e
setlocal noinfercase
setlocal iskeyword=@,48-57,_,192-255
setlocal keywordprg=
setlocal nolinebreak
setlocal nolisp
setlocal lispwords=
setlocal nolist
setlocal makeencoding=
setlocal makeprg=
setlocal matchpairs=(:),{:},[:]
setlocal modeline
setlocal modifiable
setlocal nrformats=bin,octal,hex
set number
setlocal number
setlocal numberwidth=4
setlocal omnifunc=ccomplete#Complete
setlocal path=
setlocal nopreserveindent
setlocal nopreviewwindow
setlocal quoteescape=\\
setlocal noreadonly
set relativenumber
setlocal relativenumber
setlocal norightleft
setlocal rightleftcmd=search
setlocal noscrollbind
setlocal scrolloff=-1
setlocal shiftwidth=4
setlocal noshortname
setlocal showbreak=
setlocal sidescrolloff=-1
setlocal signcolumn=auto
setlocal smartindent
setlocal softtabstop=0
setlocal nospell
setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+
setlocal spellfile=
setlocal spelllang=en
setlocal statusline=
setlocal suffixesadd=
setlocal swapfile
setlocal synmaxcol=3000
if &syntax != 'cpp'
setlocal syntax=cpp
endif
setlocal tabstop=4
setlocal tagcase= setlocal tagcase=
setlocal tagfunc= setlocal tagfunc=
setlocal tags= setlocal tags=
@ -744,9 +750,6 @@ exe s:l
normal! zt normal! zt
1 1
normal! 0 normal! 0
wincmd w
exe 'vert 1resize ' . ((&columns * 115 + 119) / 238)
exe 'vert 2resize ' . ((&columns * 122 + 119) / 238)
tabnext tabnext
edit makefile edit makefile
set splitbelow splitright set splitbelow splitright
@ -758,7 +761,6 @@ set winheight=1
set winminwidth=0 set winminwidth=0
set winwidth=1 set winwidth=1
argglobal argglobal
1argu
if bufexists("makefile") | buffer makefile | else | edit makefile | endif if bufexists("makefile") | buffer makefile | else | edit makefile | endif
setlocal keymap= setlocal keymap=
setlocal noarabic setlocal noarabic
@ -847,7 +849,7 @@ setlocal norightleft
setlocal rightleftcmd=search setlocal rightleftcmd=search
setlocal noscrollbind setlocal noscrollbind
setlocal scrolloff=-1 setlocal scrolloff=-1
setlocal shiftwidth=8 setlocal shiftwidth=4
setlocal noshortname setlocal noshortname
setlocal showbreak= setlocal showbreak=
setlocal sidescrolloff=-1 setlocal sidescrolloff=-1
@ -865,7 +867,7 @@ setlocal synmaxcol=3000
if &syntax != 'make' if &syntax != 'make'
setlocal syntax=make setlocal syntax=make
endif endif
setlocal tabstop=8 setlocal tabstop=4
setlocal tagcase= setlocal tagcase=
setlocal tagfunc= setlocal tagfunc=
setlocal tags= setlocal tags=
@ -884,20 +886,20 @@ setlocal nowinfixwidth
setlocal wrap setlocal wrap
setlocal wrapmargin=0 setlocal wrapmargin=0
silent! normal! zE silent! normal! zE
let s:l = 3 - ((2 * winheight(0) + 27) / 55) let s:l = 1 - ((0 * winheight(0) + 27) / 54)
if s:l < 1 | let s:l = 1 | endif if s:l < 1 | let s:l = 1 | endif
exe s:l exe s:l
normal! zt normal! zt
3 1
normal! 0 normal! 0
tabnext 1 tabnext 1
set stal=1 set stal=1
badd +1 grid.c badd +1 grid.c
badd +1 main.c badd +0 main.c
badd +1 vect.c badd +0 vect.c
badd +1 makefile badd +0 grid.h
badd +1 grid.h badd +0 vect.h
badd +1 vect.h badd +0 makefile
if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0
silent exe 'bwipe ' . s:wipebuf silent exe 'bwipe ' . s:wipebuf
endif endif
@ -909,6 +911,7 @@ if filereadable(s:sx)
exe "source " . fnameescape(s:sx) exe "source " . fnameescape(s:sx)
endif endif
let &so = s:so_save | let &siso = s:siso_save let &so = s:so_save | let &siso = s:siso_save
nohlsearch
doautoall SessionLoadPost doautoall SessionLoadPost
unlet SessionLoad unlet SessionLoad
" vim: set ft=vim : " vim: set ft=vim :