env['LIBS'] = ['ncurses', 'cds']
env['LIBPATH'] += ['./build']
env['CPPPATH'] += Dir['modules/data-structures/source/**/']
- env['CFLAGS'] += ['-Wall', '-Werror', '-pedantic', '--std=c99']
+ env['CFLAGS'] += ['-Wall', '-Wextra',
+ #'-Werror', #commented out until mike fixes his shit.
+ '-pedantic', '--std=c99']
# Platform-Specific Defines and Options
# -------------------------------------
}
void frame_draw_files(Frame_T* frame){
- int file_i, frame_i = FrameTopBuffer;
- int rows, cols;
+ unsigned int file_i, frame_i = FrameTopBuffer;
+ unsigned int rows, cols;
getmaxyx(frame->p_win, rows, cols);
frame_scroll(frame);
file_i = frame->top_index;
bool more_matches = false;
bool match_found = false;
size_t num_entries = (sizeof(Default_Bindings) / sizeof(binding_t));
- int len = strlen(Key_Buffer);
+ unsigned int len = strlen(Key_Buffer);
/* If no more room then reset the buffer */
if (len+1 >= 16) {
/* If we got a valid key then process it */
if((char)ERR != ch) {
- int i;
+ unsigned int i;
/* Put the key in the buffer */
len++;
Key_Buffer[len-1] = ch;
/* If the binding we're looking at matches a substring but has more chars
* make note of it so we can wait for the next char */
- if((strlen(seq) > len) && (0 == strncmp(seq, Key_Buffer, len)))
- {
+ if((strlen(seq) > len) && (0 == strncmp(seq, Key_Buffer, len))) {
more_matches = true;
}
/* If the current string matches exactly then execute it's handler */
- if (0 == strcmp(Key_Buffer, seq))
- {
+ if (0 == strcmp(Key_Buffer, seq)) {
binding.callback();
Key_Buffer[0] = '\0';
match_found = true;
#include "screen.h"
void handle_signal(int sig) {
+ (void) sig;
state_set_screen_dirty(true);
state_set_screen_resized(true);
}
void handle_alarm(int sig) {
+ (void) sig;
state_set_screen_dirty(true);
alarm(1);
}
-int main(int argc, char** argv) {
+int main() {
/* Handle terminal resizing */
signal(SIGWINCH, handle_signal);
signal(SIGALRM, handle_alarm);
frame_set_highlighting(state_get_focused_frame(), false, false);
wd->idx = idx;
if(idx < 0) wd->idx = 0;
- else if(idx >= vec_size(wd->vfiles))
+ else if((unsigned int)idx >= vec_size(wd->vfiles))
wd->idx = vec_size(wd->vfiles)-1;
frame_set_highlighting(state_get_focused_frame(), true, true);
}
}
void workdir_seek(WorkDir_T* wd, char* search){
- int i = 0;
+ unsigned int i = 0;
if(strcmp(((File_T*)vec_at(wd->vfiles, 0))->name, "..") == 0) i++;
while(i < vec_size(wd->vfiles) && strcmp(((File_T*)vec_at(wd->vfiles, i))->name, search) < 0) i++;
workdir_set_idx(wd, i);