Mercurial > trustbridge
comparison cinst/main.c @ 1157:fd7d04bb37cb
(issue36) Add encoding aware port_fopen function and use it
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Thu, 18 Sep 2014 15:43:22 +0200 |
parents | 1e429faf7c84 |
children | 2a1206932f53 |
comparison
equal
deleted
inserted
replaced
1156:e986d3d4705f | 1157:fd7d04bb37cb |
---|---|
48 #include "listutil.h" | 48 #include "listutil.h" |
49 #include "logging.h" | 49 #include "logging.h" |
50 #include "errorcodes.h" | 50 #include "errorcodes.h" |
51 #include "windowsstore.h" | 51 #include "windowsstore.h" |
52 #include "nssstore.h" | 52 #include "nssstore.h" |
53 #include "portpath.h" | |
53 | 54 |
54 /* The certificate list + choices may only be so long as | 55 /* The certificate list + choices may only be so long as |
55 * twice the accepted certificatelist size */ | 56 * twice the accepted certificatelist size */ |
56 #define MAX_INPUT_SIZE MAX_LINE_LENGTH * MAX_LINES * 2 | 57 #define MAX_INPUT_SIZE MAX_LINE_LENGTH * MAX_LINES * 2 |
57 | 58 |
88 { | 89 { |
89 ERRORPRINTF ("Error invalid parameters.\n"); | 90 ERRORPRINTF ("Error invalid parameters.\n"); |
90 return -1; | 91 return -1; |
91 } | 92 } |
92 | 93 |
93 f = fopen (file_name, "rb"); | 94 f = port_fopen_rb(file_name, false); |
94 if (f == NULL) | 95 if (f == NULL) |
95 { | 96 { |
96 ERRORPRINTF ("Failed to open file: %s\n", file_name); | 97 ERRORPRINTF ("Failed to open file: %s\n", file_name); |
97 return ERR_NO_INSTRUCTIONS; | 98 return ERR_NO_INSTRUCTIONS; |
98 } | 99 } |