Use halloc in a few more places, including the highlight code

darcs-hash:20060612141233-ac50b-1c44411dd31cdc31d6ccb226f567c308c4fc0f55.gz
This commit is contained in:
axel
2006-06-13 00:12:33 +10:00
parent 038dcca143
commit d32751df13
8 changed files with 84 additions and 72 deletions

14
kill.c
View File

@@ -30,6 +30,7 @@
#include "env.h"
#include "exec.h"
#include "parser.h"
#include "halloc.h"
/**
Maximum entries in killring
@@ -48,14 +49,11 @@ static wchar_t *cut_buffer=0;
*/
static int has_xsel()
{
wchar_t *path = get_filename( L"xsel" );
if( path)
{
free(path);
return 1;
}
else
return 0;
void *context = halloc(0, 0);
wchar_t *path = parser_get_filename( context, L"xsel" );
int res = !!path;
halloc_free( context );
return res;
}