]> git.mdlowis.com Git - archive/afm.git/commitdiff
no need for retain
authorMichael D. Lowis <mike@mdlowis.com>
Sat, 26 Jul 2014 02:08:24 +0000 (22:08 -0400)
committerMichael D. Lowis <mike@mdlowis.com>
Sat, 26 Jul 2014 02:08:24 +0000 (22:08 -0400)
source/screen.c
source/workdir.c

index 2402c44b1c3af845c71a8f8bec13a000134b566f..5cc024d53547d944bbbb7192b414d78be282df0e 100644 (file)
@@ -33,7 +33,7 @@ void screen_init(void) {
 }
 
 void screen_deinit(void) {
-       fprintf(stderr, "deinitializing screen\n");
+    fprintf(stderr, "deinitializing screen\n");
     mem_release(Screen_List);
 }
 
@@ -108,11 +108,11 @@ static void screen_place_windows(void) {
 //get the curent directory and copy it into a ref-counted memory block
 //return a pointer to the new block
 char* pwd(){
-       char* dir = getcwd(NULL, 0);
-       char* rid = mem_allocate(sizeof(char)*(1+strlen(dir)), NULL);
-       strcpy(rid, dir);
-       free(dir);
-       return rid;
+    char* dir = getcwd(NULL, 0);
+    char* rid = mem_allocate(sizeof(char)*(1+strlen(dir)), NULL);
+    strcpy(rid, dir);
+    free(dir);
+    return rid;
 }
 
 static frame_t* screen_frame_new(void) {
@@ -124,7 +124,7 @@ static frame_t* screen_frame_new(void) {
 }
 
 static void screen_frame_free(void* p_frame_ptr) {
-       fprintf(stderr, "freeing frame\n");
+    fprintf(stderr, "freeing frame\n");
     frame_t* p_frame = (frame_t*)p_frame_ptr;
     wclear(p_frame->p_win);
     wborder(p_frame->p_win, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ');
index da8989c4de1564f7ddf576c4bb8b77137fe661bd..1f5812483628151d6aeefbe0ca7db13b26f1cae8 100644 (file)
@@ -28,7 +28,6 @@ WorkDir_T* workdir_new(char* path){
     WorkDir_T* wd = mem_allocate(sizeof(WorkDir_T), &workdir_free);
     wd->idx = 0;
     wd->path = path;
-    mem_retain(path);
     wd->vfiles = vec_new(0);
     workdir_ls(wd);
     wd->top_index = 0;