aboutsummaryrefslogtreecommitdiffhomepage
path: root/expand.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-03-08 23:21:07 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-03-08 23:21:07 -0800
commitd173bb6e0a13863e23c606f1454c35788b3a6cf6 (patch)
tree7ace61ece41660f3744eb4d606d6d85a09fdbec4 /expand.cpp
parentce859c9e92cc50f9b4ff20edfec8e905c298d29a (diff)
A bunch of changes working towards eliminating all memory allocation after fork()
Diffstat (limited to 'expand.cpp')
-rw-r--r--expand.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/expand.cpp b/expand.cpp
index 4b201195..047d02e1 100644
--- a/expand.cpp
+++ b/expand.cpp
@@ -348,14 +348,14 @@ static int find_process( const wchar_t *proc,
while ((j = jobs.next()))
{
wchar_t jid[16];
- if( j->command.size() == 0 )
+ if( j->command_is_empty() )
continue;
swprintf( jid, 16, L"%d", j->job_id );
if( wcsncmp( proc, jid, wcslen(proc ) )==0 )
{
- wcstring desc_buff = format_string(COMPLETE_JOB_DESC_VAL, j->command_cstr());
+ wcstring desc_buff = format_string(COMPLETE_JOB_DESC_VAL, j->command_wcstr());
completion_allocate( out,
jid+wcslen(proc),
desc_buff,
@@ -375,7 +375,7 @@ static int find_process( const wchar_t *proc,
if( jid > 0 && !errno && !*end )
{
j = job_get( jid );
- if( (j != 0) && (j->command_cstr() != 0 ) )
+ if( (j != 0) && (j->command_wcstr() != 0 ) )
{
{
@@ -395,15 +395,15 @@ static int find_process( const wchar_t *proc,
{
int offset;
- if( j->command_cstr() == 0 )
+ if( j->command_wcstr() == 0 )
continue;
- if( match_pid( j->command_cstr(), proc, flags, &offset ) )
+ if( match_pid( j->command_wcstr(), proc, flags, &offset ) )
{
if( flags & ACCEPT_INCOMPLETE )
{
completion_allocate( out,
- j->command_cstr() + offset + wcslen(proc),
+ j->command_wcstr() + offset + wcslen(proc),
COMPLETE_JOB_DESC,
0 );
}
@@ -425,7 +425,7 @@ static int find_process( const wchar_t *proc,
while ((j = jobs.next()))
{
process_t *p;
- if( j->command.size() == 0 )
+ if( j->command_is_empty() )
continue;
for( p=j->first_process; p; p=p->next )
{