Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: src/shared/platform/win/port_win.c

Issue 1706613002: Fix getopt signature in port_win.h (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/include/win/port_win.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2008 The Native Client Authors. All rights reserved. 2 * Copyright 2008 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /* 7 /*
8 * Misc functions missing from windows. 8 * Misc functions missing from windows.
9 */ 9 */
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 63
64 /* 64 /*
65 * Based on code by Hans Dietrich 65 * Based on code by Hans Dietrich
66 * see http://www.codeproject.com/KB/cpp/xgetopt.aspx 66 * see http://www.codeproject.com/KB/cpp/xgetopt.aspx
67 */ 67 */
68 68
69 char *optarg; /* global argument pointer */ 69 char *optarg; /* global argument pointer */
70 int optind = 0; /* global argv index */ 70 int optind = 0; /* global argv index */
71 71
72 int getopt(int argc, char *argv[], char *optstring) { 72 int getopt(int argc, char *argv[], const char *optstring) {
73 char c, *cp; 73 char c, *cp;
74 static char *next = NULL; 74 static char *next = NULL;
75 if (optind == 0) 75 if (optind == 0)
76 next = NULL; 76 next = NULL;
77 77
78 optarg = NULL; 78 optarg = NULL;
79 79
80 if (next == NULL || *next == ('\0')) { 80 if (next == NULL || *next == ('\0')) {
81 if (optind == 0) 81 if (optind == 0)
82 optind++; 82 optind++;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } else if (optind < argc) { 117 } else if (optind < argc) {
118 optarg = argv[optind]; 118 optarg = argv[optind];
119 optind++; 119 optind++;
120 } else { 120 } else {
121 return ('?'); 121 return ('?');
122 } 122 }
123 } 123 }
124 124
125 return c; 125 return c;
126 } 126 }
OLDNEW
« no previous file with comments | « src/include/win/port_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698