Mercurial > hg > aimc
comparison trunk/src/Support/FileList.cc @ 398:3ee03a6b95a0
- All \t to two spaces (style guide compliance)
author | tomwalters |
---|---|
date | Fri, 15 Oct 2010 05:46:53 +0000 |
parents | 30dde71d0230 |
children |
comparison
equal
deleted
inserted
replaced
397:7a573750b186 | 398:3ee03a6b95a0 |
---|---|
31 namespace aimc { | 31 namespace aimc { |
32 vector<pair<string, string> > FileList::Load(string filename) { | 32 vector<pair<string, string> > FileList::Load(string filename) { |
33 FILE* file_handle; | 33 FILE* file_handle; |
34 vector<pair<string, string> > file_list; | 34 vector<pair<string, string> > file_list; |
35 if ((file_handle = fopen(filename.c_str(), "r"))==NULL) { | 35 if ((file_handle = fopen(filename.c_str(), "r"))==NULL) { |
36 LOG_ERROR(_T("Couldn't open file '%s' for reading."), filename.c_str()); | 36 LOG_ERROR(_T("Couldn't open file '%s' for reading."), filename.c_str()); |
37 return file_list; | 37 return file_list; |
38 } | 38 } |
39 | 39 |
40 string out_1; | 40 string out_1; |
41 string out_2; | 41 string out_2; |
42 char n1[PATH_MAX]; | 42 char n1[PATH_MAX]; |
43 char n2[PATH_MAX]; | 43 char n2[PATH_MAX]; |
44 while (fscanf(file_handle, "%s\t%s", n1, n2) != EOF) { | 44 while (fscanf(file_handle, "%s\t%s", n1, n2) != EOF) { |
45 out_1 = n1; | 45 out_1 = n1; |
46 out_2 = n2; | 46 out_2 = n2; |
47 file_list.push_back(make_pair(out_1, out_2)); | 47 file_list.push_back(make_pair(out_1, out_2)); |
48 } | 48 } |
49 fclose(file_handle); | 49 fclose(file_handle); |
50 return file_list; | 50 return file_list; |
51 } | 51 } |
52 } // namespace aimc | 52 } // namespace aimc |