aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser.cpp
diff options
context:
space:
mode:
authorGravatar Siteshwar Vashisht <siteshwar@gmail.com>2012-02-28 21:20:09 +0530
committerGravatar Siteshwar Vashisht <siteshwar@gmail.com>2012-02-28 21:20:09 +0530
commit392232246e9ea7539d331299a518ef63bab22483 (patch)
tree90b9f6e86d262ba479b7a2e0f0aa128b4e2846e5 /parser.cpp
parentcf54ad8242056ae6d686fa6455b24427f4411e18 (diff)
Fixed compilation on Linux with some minor changes.
Diffstat (limited to 'parser.cpp')
-rw-r--r--parser.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/parser.cpp b/parser.cpp
index 01dbb627..a92e026c 100644
--- a/parser.cpp
+++ b/parser.cpp
@@ -18,6 +18,7 @@ The fish parser. Contains functions for parsing and evaluating code.
#include <pwd.h>
#include <dirent.h>
#include <signal.h>
+#include <algorithm>
#include "fallback.h"
#include "util.h"
@@ -1244,7 +1245,7 @@ bool parser_t::job_remove( job_t *j )
void parser_t::job_promote(job_t *job)
{
- job_list_t::iterator loc = find(my_job_list.begin(), my_job_list.end(), job);
+ job_list_t::iterator loc = std::find(my_job_list.begin(), my_job_list.end(), job);
assert(loc != my_job_list.end());
/* Move the job to the beginning */
@@ -2308,7 +2309,7 @@ void parser_t::eval_job( tokenizer *tok )
if( job_start_pos < tok_get_pos( tok ) )
{
int stop_pos = tok_get_pos( tok );
- wchar_t *newline = wcschr( tok_string(tok)+start_pos,
+ const wchar_t *newline = wcschr( tok_string(tok)+start_pos,
L'\n' );
if( newline )
stop_pos = mini( stop_pos, newline - tok_string(tok) );