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

Unified Diff: third_party/crashpad/crashpad/third_party/getopt/getopt.h

Issue 1505213004: Copy Crashpad into the Chrome tree instead of importing it via DEPS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments, update README.chromium Created 5 years 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 side-by-side diff with in-line comments
Download patch
Index: third_party/crashpad/crashpad/third_party/getopt/getopt.h
diff --git a/third_party/crashpad/crashpad/third_party/getopt/getopt.h b/third_party/crashpad/crashpad/third_party/getopt/getopt.h
new file mode 100644
index 0000000000000000000000000000000000000000..282a489e8e15422bc1de691bb617bd8eae0dcb66
--- /dev/null
+++ b/third_party/crashpad/crashpad/third_party/getopt/getopt.h
@@ -0,0 +1,63 @@
+/*
+Copyright (C) 1997 Gregory Pietsch
+
+[These files] are hereby placed in the public domain without restrictions. Just
+give the author credit, don't claim you wrote it or prevent anyone else from
+using it.
+*/
+
+#ifndef GETOPT_H
+#define GETOPT_H
+
+/* include files needed by this include file */
+
+/* macros defined by this include file */
+#define no_argument 0
+#define required_argument 1
+#define OPTIONAL_ARG 2
+
+/* types defined by this include file */
+
+namespace crashpad {
+
+/* GETOPT_LONG_OPTION_T: The type of long option */
+typedef struct GETOPT_LONG_OPTION_T
+{
+ const char *name; /* the name of the long option */
+ int has_arg; /* one of the above macros */
+ int *flag; /* determines if getopt_long() returns a
+ * value for a long option; if it is
+ * non-NULL, 0 is returned as a function
+ * value and the value of val is stored in
+ * the area pointed to by flag. Otherwise,
+ * val is returned. */
+ int val; /* determines the value to return if flag is
+ * NULL. */
+} GETOPT_LONG_OPTION_T;
+
+typedef GETOPT_LONG_OPTION_T option;
+
+/* externally-defined variables */
+extern char *optarg;
+extern int optind;
+extern int opterr;
+extern int optopt;
+
+/* function prototypes */
+int getopt(int argc, char** argv, char* optstring);
+int getopt_long(int argc,
+ char** argv,
+ const char* shortopts,
+ const GETOPT_LONG_OPTION_T* longopts,
+ int* longind);
+int getopt_long_only(int argc,
+ char** argv,
+ const char* shortopts,
+ const GETOPT_LONG_OPTION_T* longopts,
+ int* longind);
+
+} // namespace crashpad
+
+#endif /* GETOPT_H */
+
+/* END OF FILE getopt.h */

Powered by Google App Engine
This is Rietveld 408576698