/[weechat]/weechat/src/common/history.c
ViewVC logotype

Diff of /weechat/src/common/history.c

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

revision 1.8 by flashcode, Sat Jan 1 12:31:19 2005 UTC revision 1.9 by flashcode, Mon Jan 31 23:33:59 2005 UTC
# Line 136  history_add (void *buffer, char *string) Line 136  history_add (void *buffer, char *string)
136          }          }
137      }      }
138  }  }
139    
140    /*
141     * history_general_free: free general history
142     */
143    
144    void
145    history_general_free ()
146    {
147        t_history *ptr_history;
148        
149        while (history_general)
150        {
151            ptr_history = history_general->next_history;
152            if (history_general->text)
153                free (history_general->text);
154            free (history_general);
155            history_general = ptr_history;
156        }
157        history_general = NULL;
158        history_general_last = NULL;
159        history_general_ptr = NULL;
160        num_history_general = 0;
161    }
162    
163    
164    /*
165     * history_buffer_free: free history for a buffer
166     */
167    
168    void
169    history_buffer_free (void *buffer)
170    {
171        t_history *ptr_history;
172        
173        while (((t_gui_buffer *)(buffer))->history)
174        {
175            ptr_history = ((t_gui_buffer *)(buffer))->history->next_history;
176            if (((t_gui_buffer *)(buffer))->history->text)
177                free (((t_gui_buffer *)(buffer))->history->text);
178            free (((t_gui_buffer *)(buffer))->history);
179            ((t_gui_buffer *)(buffer))->history = ptr_history;
180        }
181        ((t_gui_buffer *)(buffer))->history = NULL;
182        ((t_gui_buffer *)(buffer))->last_history = NULL;
183        ((t_gui_buffer *)(buffer))->ptr_history = NULL;
184        ((t_gui_buffer *)(buffer))->num_history = 0;
185    }

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26