Commit 85d87033 authored by Axel Auweter's avatar Axel Auweter
Browse files

Implemented parameter parsing for FileSpewer.

Added some more Eclipse config files. Will need discussion whether they
actually belong into the repository.
parent 0f99dc81
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<?fileVersion 4.0.0?>
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="cdt.managedbuild.toolchain.gnu.base.663838804">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.base.663838804" moduleId="org.eclipse.cdt.core.settings" name="Default">
......@@ -22,14 +24,141 @@
<tool id="cdt.managedbuild.tool.gnu.archiver.base.2072471468" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.265454218" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
<option id="gnu.cpp.compiler.option.include.paths.122623253" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="/usr/include/c++/4.7"/>
<listOptionValue builtIn="false" value="/usr/include"/>
<listOptionValue builtIn="false" value="/usr/include/c++/4.7"/>
<listOptionValue builtIn="false" value="../../../mosquitto-1.1/lib"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1504183510" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.base.1073502011" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base">
<option id="gnu.c.compiler.option.include.paths.1512580429" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="/usr/include"/>
<listOptionValue builtIn="false" value="/usr/include/c++/4.2.1"/>
<listOptionValue builtIn="false" value="../../../mosquitto-1.1/lib"/>
</option>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.859532441" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="__x86_64=1"/>
<listOptionValue builtIn="false" value="__FLT_EVAL_METHOD__=0"/>
<listOptionValue builtIn="false" value="__LITTLE_ENDIAN__=1"/>
<listOptionValue builtIn="false" value="__NO_MATH_INLINES=1"/>
<listOptionValue builtIn="false" value="__DEC64_MANT_DIG__=16"/>
<listOptionValue builtIn="false" value="__FLT_EPSILON__=1.19209290e-7F"/>
<listOptionValue builtIn="false" value="__FLT_MAX_EXP__=128"/>
<listOptionValue builtIn="false" value="__DBL_MIN__=2.2250738585072014e-308"/>
<listOptionValue builtIn="false" value="__LDBL_EPSILON__=1.08420217248550443401e-19L"/>
<listOptionValue builtIn="false" value="__DEC64_MIN__=1E-383DD"/>
<listOptionValue builtIn="false" value="__SCHAR_MAX__=127"/>
<listOptionValue builtIn="false" value="__strong"/>
<listOptionValue builtIn="false" value="_LP64=1"/>
<listOptionValue builtIn="false" value="__DEC128_MANT_DIG__=34"/>
<listOptionValue builtIn="false" value="__DBL_MIN_10_EXP__=(-307)"/>
<listOptionValue builtIn="false" value="__DBL_DENORM_MIN__=4.9406564584124654e-324"/>
<listOptionValue builtIn="false" value="__REGISTER_PREFIX__"/>
<listOptionValue builtIn="false" value="__SHRT_MAX__=32767"/>
<listOptionValue builtIn="false" value="__DBL_HAS_DENORM__=1"/>
<listOptionValue builtIn="false" value="__DEC32_MAX__=9.999999E96DF"/>
<listOptionValue builtIn="false" value="__LDBL_HAS_QUIET_NAN__=1"/>
<listOptionValue builtIn="false" value="__FLT_MIN_EXP__=(-125)"/>
<listOptionValue builtIn="false" value="__LDBL_MANT_DIG__=64"/>
<listOptionValue builtIn="false" value="__DEC32_EPSILON__=1E-6DF"/>
<listOptionValue builtIn="false" value="__FLT_DENORM_MIN__=1.40129846e-45F"/>
<listOptionValue builtIn="false" value="__LDBL_DIG__=18"/>
<listOptionValue builtIn="false" value="__APPLE__=1"/>
<listOptionValue builtIn="false" value="__MACH__=1"/>
<listOptionValue builtIn="false" value="__DEC128_MAX__=9.999999999999999999999999999999999E6144DL"/>
<listOptionValue builtIn="false" value="__DEC32_MIN_EXP__=(-95)"/>
<listOptionValue builtIn="false" value="__LDBL_DENORM_MIN__=3.64519953188247460253e-4951L"/>
<listOptionValue builtIn="false" value="__block=__attribute__((__blocks__(byref)))"/>
<listOptionValue builtIn="false" value="__FLT_MIN_10_EXP__=(-37)"/>
<listOptionValue builtIn="false" value="OBJC_NEW_PROPERTIES=1"/>
<listOptionValue builtIn="false" value="__WCHAR_MAX__=2147483647"/>
<listOptionValue builtIn="false" value="__LDBL_HAS_DENORM__=1"/>
<listOptionValue builtIn="false" value="__GNUC_PATCHLEVEL__=1"/>
<listOptionValue builtIn="false" value="__PIC__=2"/>
<listOptionValue builtIn="false" value="__GXX_ABI_VERSION=1002"/>
<listOptionValue builtIn="false" value="__SSE2_MATH__=1"/>
<listOptionValue builtIn="false" value="__DBL_MIN_EXP__=(-1021)"/>
<listOptionValue builtIn="false" value="__LDBL_HAS_INFINITY__=1"/>
<listOptionValue builtIn="false" value="__FLT_MAX_10_EXP__=38"/>
<listOptionValue builtIn="false" value="__tune_core2__=1"/>
<listOptionValue builtIn="false" value="__DEC64_MIN_EXP__=(-383)"/>
<listOptionValue builtIn="false" value="__DEC128_DEN__=0.000000000000000000000000000000001E-6143DL"/>
<listOptionValue builtIn="false" value="__DEC32_MIN__=1E-95DF"/>
<listOptionValue builtIn="false" value="__MMX__=1"/>
<listOptionValue builtIn="false" value="__LDBL_MIN_10_EXP__=(-4931)"/>
<listOptionValue builtIn="false" value="__APPLE_CC__=5658"/>
<listOptionValue builtIn="false" value="__x86_64__=1"/>
<listOptionValue builtIn="false" value="__DEC64_MAX_EXP__=384"/>
<listOptionValue builtIn="false" value="__llvm__=1"/>
<listOptionValue builtIn="false" value="__FLT_MIN__=1.17549435e-38F"/>
<listOptionValue builtIn="false" value="__DBL_EPSILON__=2.2204460492503131e-16"/>
<listOptionValue builtIn="false" value="__DEC128_MAX_EXP__=6144"/>
<listOptionValue builtIn="false" value="__LDBL_MAX_EXP__=16384"/>
<listOptionValue builtIn="false" value="__k8__=1"/>
<listOptionValue builtIn="false" value="__DBL_DIG__=15"/>
<listOptionValue builtIn="false" value="__FLT_MANT_DIG__=24"/>
<listOptionValue builtIn="false" value="__SSE__=1"/>
<listOptionValue builtIn="false" value="__FLT_RADIX__=2"/>
<listOptionValue builtIn="false" value="__GNUC_MINOR__=2"/>
<listOptionValue builtIn="false" value="__DEC64_MAX__=9.999999999999999E384DD"/>
<listOptionValue builtIn="false" value="&quot;__INTMAX_TYPE__=long int&quot;"/>
<listOptionValue builtIn="false" value="__FLT_DIG__=6"/>
<listOptionValue builtIn="false" value="__pic__=2"/>
<listOptionValue builtIn="false" value="__LDBL_MIN_EXP__=(-16381)"/>
<listOptionValue builtIn="false" value="__INT_MAX__=2147483647"/>
<listOptionValue builtIn="false" value="__DEC64_EPSILON__=1E-15DD"/>
<listOptionValue builtIn="false" value="__LONG_LONG_MAX__=9223372036854775807LL"/>
<listOptionValue builtIn="false" value="__amd64=1"/>
<listOptionValue builtIn="false" value="__DBL_HAS_INFINITY__=1"/>
<listOptionValue builtIn="false" value="__FLT_HAS_QUIET_NAN__=1"/>
<listOptionValue builtIn="false" value="__DBL_MAX_10_EXP__=308"/>
<listOptionValue builtIn="false" value="__STDC__=1"/>
<listOptionValue builtIn="false" value="__FLT_HAS_DENORM__=1"/>
<listOptionValue builtIn="false" value="__LDBL_MIN__=3.36210314311209350626e-4932L"/>
<listOptionValue builtIn="false" value="__NO_INLINE__=1"/>
<listOptionValue builtIn="false" value="__SSE2__=1"/>
<listOptionValue builtIn="false" value="__DEC128_EPSILON__=1E-33DL"/>
<listOptionValue builtIn="false" value="__GNUC__=4"/>
<listOptionValue builtIn="false" value="__SSE3__=1"/>
<listOptionValue builtIn="false" value="__CONSTANT_CFSTRINGS__=1"/>
<listOptionValue builtIn="false" value="__INTMAX_MAX__=9223372036854775807L"/>
<listOptionValue builtIn="false" value="__DEC32_MAX_EXP__=96"/>
<listOptionValue builtIn="false" value="&quot;__VERSION__=&quot;4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)&quot;"/>
<listOptionValue builtIn="false" value="__k8=1"/>
<listOptionValue builtIn="false" value="__DEC128_MIN_EXP__=(-6143)"/>
<listOptionValue builtIn="false" value="__USER_LABEL_PREFIX__=_"/>
<listOptionValue builtIn="false" value="__weak=__attribute__((objc_gc(weak)))"/>
<listOptionValue builtIn="false" value="__LONG_MAX__=9223372036854775807L"/>
<listOptionValue builtIn="false" value="__SSP__=1"/>
<listOptionValue builtIn="false" value="&quot;__PTRDIFF_TYPE__=long int&quot;"/>
<listOptionValue builtIn="false" value="__CHAR_BIT__=8"/>
<listOptionValue builtIn="false" value="__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__=1082"/>
<listOptionValue builtIn="false" value="__DBL_HAS_QUIET_NAN__=1"/>
<listOptionValue builtIn="false" value="__SSE_MATH__=1"/>
<listOptionValue builtIn="false" value="__DEC64_DEN__=0.000000000000001E-383DD"/>
<listOptionValue builtIn="false" value="__DBL_MAX_EXP__=1024"/>
<listOptionValue builtIn="false" value="__WINT_TYPE__=int"/>
<listOptionValue builtIn="false" value="__DEC_EVAL_METHOD__=2"/>
<listOptionValue builtIn="false" value="__amd64__=1"/>
<listOptionValue builtIn="false" value="__DBL_MANT_DIG__=53"/>
<listOptionValue builtIn="false" value="__FLT_MAX__=3.40282347e+38F"/>
<listOptionValue builtIn="false" value="__BLOCKS__=1"/>
<listOptionValue builtIn="false" value="__DEC128_MIN__=1E-6143DL"/>
<listOptionValue builtIn="false" value="__GNUC_GNU_INLINE__=1"/>
<listOptionValue builtIn="false" value="&quot;__SIZE_TYPE__=long unsigned int&quot;"/>
<listOptionValue builtIn="false" value="__FLT_HAS_INFINITY__=1"/>
<listOptionValue builtIn="false" value="__DEC32_MANT_DIG__=7"/>
<listOptionValue builtIn="false" value="__DYNAMIC__=1"/>
<listOptionValue builtIn="false" value="__STDC_HOSTED__=1"/>
<listOptionValue builtIn="false" value="__DECIMAL_DIG__=21"/>
<listOptionValue builtIn="false" value="__DEC32_DEN__=0.000001E-95DF"/>
<listOptionValue builtIn="false" value="__LDBL_MAX_10_EXP__=4932"/>
<listOptionValue builtIn="false" value="__DBL_MAX__=1.7976931348623157e+308"/>
<listOptionValue builtIn="false" value="&quot;__UINTMAX_TYPE__=long unsigned int&quot;"/>
<listOptionValue builtIn="false" value="__LDBL_MAX__=1.18973149535723176502e+4932L"/>
<listOptionValue builtIn="false" value="__FINITE_MATH_ONLY__=0"/>
<listOptionValue builtIn="false" value="__WCHAR_TYPE__=int"/>
<listOptionValue builtIn="false" value="__LP64__=1"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1213695693" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
......@@ -42,8 +171,7 @@
</tool>
<tool id="cdt.managedbuild.tool.gnu.assembler.base.2036029009" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base">
<option id="gnu.both.asm.option.include.paths.1033764067" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="/usr/include"/>
<listOptionValue builtIn="false" value="/usr/include/c++/4.7"/>
<listOptionValue builtIn="false" value="../../../mosquitto-1.1/lib"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1248959187" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
......@@ -59,19 +187,35 @@
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
<storageModule moduleId="refreshScope" versionNumber="2">
<configuration configurationName="Linux"/>
<configuration configurationName="Default">
<resource resourceType="PROJECT" workspacePath="/FileSpewer"/>
</configuration>
<configuration configurationName="MacOS">
<resource resourceType="PROJECT" workspacePath="/FileSpewer"/>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.663838804.1398159741;cdt.managedbuild.toolchain.gnu.base.663838804.1398159741.;cdt.managedbuild.tool.gnu.cpp.compiler.base.183629864;cdt.managedbuild.tool.gnu.cpp.compiler.input.2074651315">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.663838804.1398159741;cdt.managedbuild.toolchain.gnu.base.663838804.1398159741.;cdt.managedbuild.tool.gnu.cpp.compiler.macosx.base.515863718;cdt.managedbuild.tool.gnu.cpp.compiler.input.1226695332">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.663838804;cdt.managedbuild.toolchain.gnu.base.663838804.1282410455;cdt.managedbuild.tool.gnu.c.compiler.base.1073502011;cdt.managedbuild.tool.gnu.c.compiler.input.1213695693">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.663838804;cdt.managedbuild.toolchain.gnu.base.663838804.1282410455;cdt.managedbuild.tool.gnu.cpp.compiler.base.265454218;cdt.managedbuild.tool.gnu.cpp.compiler.input.1504183510">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.663838804.1398159741;cdt.managedbuild.toolchain.gnu.base.663838804.1398159741.;cdt.managedbuild.tool.gnu.c.compiler.macosx.base.120728969;cdt.managedbuild.tool.gnu.c.compiler.input.122327123">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.663838804.1398159741;cdt.managedbuild.toolchain.gnu.base.663838804.1398159741.;cdt.managedbuild.tool.gnu.c.compiler.base.1145809322;cdt.managedbuild.tool.gnu.c.compiler.input.100757895">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="refreshScope" versionNumber="2">
<configuration configurationName="Default">
<resource resourceType="PROJECT" workspacePath="/FileSpewer"/>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
</cproject>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project>
<configuration id="cdt.managedbuild.toolchain.gnu.base.663838804" name="Default">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser" keep-relative-paths="false" name="CDT GCC Build Output Parser" parameter="(gcc)|([gc]\+\+)|(clang)" prefer-non-shared="true"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
</extension>
</configuration>
</project>
eclipse.preferences.version=1
org.eclipse.cdt.core.formatter.alignment_for_arguments_in_method_invocation=16
org.eclipse.cdt.core.formatter.alignment_for_assignment=16
org.eclipse.cdt.core.formatter.alignment_for_base_clause_in_type_declaration=80
org.eclipse.cdt.core.formatter.alignment_for_binary_expression=16
org.eclipse.cdt.core.formatter.alignment_for_compact_if=16
org.eclipse.cdt.core.formatter.alignment_for_conditional_expression=34
org.eclipse.cdt.core.formatter.alignment_for_conditional_expression_chain=18
org.eclipse.cdt.core.formatter.alignment_for_constructor_initializer_list=0
org.eclipse.cdt.core.formatter.alignment_for_declarator_list=16
org.eclipse.cdt.core.formatter.alignment_for_enumerator_list=48
org.eclipse.cdt.core.formatter.alignment_for_expression_list=0
org.eclipse.cdt.core.formatter.alignment_for_expressions_in_array_initializer=16
org.eclipse.cdt.core.formatter.alignment_for_member_access=0
org.eclipse.cdt.core.formatter.alignment_for_overloaded_left_shift_chain=16
org.eclipse.cdt.core.formatter.alignment_for_parameters_in_method_declaration=16
org.eclipse.cdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
org.eclipse.cdt.core.formatter.brace_position_for_array_initializer=next_line_shifted
org.eclipse.cdt.core.formatter.brace_position_for_block=next_line_shifted
org.eclipse.cdt.core.formatter.brace_position_for_block_in_case=next_line_shifted
org.eclipse.cdt.core.formatter.brace_position_for_method_declaration=next_line
org.eclipse.cdt.core.formatter.brace_position_for_namespace_declaration=next_line
org.eclipse.cdt.core.formatter.brace_position_for_switch=next_line_shifted
org.eclipse.cdt.core.formatter.brace_position_for_type_declaration=next_line
org.eclipse.cdt.core.formatter.comment.min_distance_between_code_and_line_comment=1
org.eclipse.cdt.core.formatter.comment.never_indent_line_comments_on_first_column=true
org.eclipse.cdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=true
org.eclipse.cdt.core.formatter.compact_else_if=true
org.eclipse.cdt.core.formatter.continuation_indentation=2
org.eclipse.cdt.core.formatter.continuation_indentation_for_array_initializer=2
org.eclipse.cdt.core.formatter.format_guardian_clause_on_one_line=false
org.eclipse.cdt.core.formatter.indent_access_specifier_compare_to_type_header=false
org.eclipse.cdt.core.formatter.indent_access_specifier_extra_spaces=0
org.eclipse.cdt.core.formatter.indent_body_declarations_compare_to_access_specifier=true
org.eclipse.cdt.core.formatter.indent_body_declarations_compare_to_namespace_header=true
org.eclipse.cdt.core.formatter.indent_breaks_compare_to_cases=true
org.eclipse.cdt.core.formatter.indent_declaration_compare_to_template_header=true
org.eclipse.cdt.core.formatter.indent_empty_lines=false
org.eclipse.cdt.core.formatter.indent_statements_compare_to_block=true
org.eclipse.cdt.core.formatter.indent_statements_compare_to_body=true
org.eclipse.cdt.core.formatter.indent_switchstatements_compare_to_cases=true
org.eclipse.cdt.core.formatter.indent_switchstatements_compare_to_switch=false
org.eclipse.cdt.core.formatter.indentation.size=8
org.eclipse.cdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
org.eclipse.cdt.core.formatter.insert_new_line_after_template_declaration=insert
org.eclipse.cdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
org.eclipse.cdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
org.eclipse.cdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
org.eclipse.cdt.core.formatter.insert_new_line_before_colon_in_constructor_initializer_list=do not insert
org.eclipse.cdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
org.eclipse.cdt.core.formatter.insert_new_line_before_identifier_in_function_declaration=insert
org.eclipse.cdt.core.formatter.insert_new_line_before_while_in_do_statement=insert
org.eclipse.cdt.core.formatter.insert_new_line_in_empty_block=insert
org.eclipse.cdt.core.formatter.insert_space_after_assignment_operator=insert
org.eclipse.cdt.core.formatter.insert_space_after_binary_operator=insert
org.eclipse.cdt.core.formatter.insert_space_after_closing_angle_bracket_in_template_arguments=insert
org.eclipse.cdt.core.formatter.insert_space_after_closing_angle_bracket_in_template_parameters=insert
org.eclipse.cdt.core.formatter.insert_space_after_closing_brace_in_block=insert
org.eclipse.cdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
org.eclipse.cdt.core.formatter.insert_space_after_colon_in_base_clause=insert
org.eclipse.cdt.core.formatter.insert_space_after_colon_in_case=insert
org.eclipse.cdt.core.formatter.insert_space_after_colon_in_conditional=insert
org.eclipse.cdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_base_types=insert
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_declarator_list=insert
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_expression_list=insert
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_template_arguments=insert
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_template_parameters=insert
org.eclipse.cdt.core.formatter.insert_space_after_opening_angle_bracket_in_template_arguments=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_opening_angle_bracket_in_template_parameters=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
org.eclipse.cdt.core.formatter.insert_space_after_opening_bracket=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_exception_specification=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_postfix_operator=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_prefix_operator=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_question_in_conditional=insert
org.eclipse.cdt.core.formatter.insert_space_after_semicolon_in_for=insert
org.eclipse.cdt.core.formatter.insert_space_after_unary_operator=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_assignment_operator=insert
org.eclipse.cdt.core.formatter.insert_space_before_binary_operator=insert
org.eclipse.cdt.core.formatter.insert_space_before_closing_angle_bracket_in_template_arguments=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_closing_angle_bracket_in_template_parameters=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
org.eclipse.cdt.core.formatter.insert_space_before_closing_bracket=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_exception_specification=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_colon_in_base_clause=insert
org.eclipse.cdt.core.formatter.insert_space_before_colon_in_case=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_colon_in_conditional=insert
org.eclipse.cdt.core.formatter.insert_space_before_colon_in_default=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_base_types=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_declarator_list=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_expression_list=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_template_arguments=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_template_parameters=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_angle_bracket_in_template_arguments=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_angle_bracket_in_template_parameters=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_block=insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_namespace_declaration=insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_bracket=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_exception_specification=insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_for=insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_if=insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_while=insert
org.eclipse.cdt.core.formatter.insert_space_before_postfix_operator=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_prefix_operator=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_question_in_conditional=insert
org.eclipse.cdt.core.formatter.insert_space_before_semicolon=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_unary_operator=do not insert
org.eclipse.cdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
org.eclipse.cdt.core.formatter.insert_space_between_empty_brackets=do not insert
org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_exception_specification=do not insert
org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
org.eclipse.cdt.core.formatter.join_wrapped_lines=true
org.eclipse.cdt.core.formatter.keep_else_statement_on_same_line=false
org.eclipse.cdt.core.formatter.keep_empty_array_initializer_on_one_line=false
org.eclipse.cdt.core.formatter.keep_imple_if_on_one_line=false
org.eclipse.cdt.core.formatter.keep_then_statement_on_same_line=false
org.eclipse.cdt.core.formatter.lineSplit=80
org.eclipse.cdt.core.formatter.number_of_empty_lines_to_preserve=1
org.eclipse.cdt.core.formatter.put_empty_statement_on_new_line=true
org.eclipse.cdt.core.formatter.tabulation.char=space
org.eclipse.cdt.core.formatter.tabulation.size=2
org.eclipse.cdt.core.formatter.use_tabs_only_for_leading_indentations=false
eclipse.preferences.version=1
formatter_profile=org.eclipse.cdt.ui.default.gnu_profile
formatter_settings_version=1
......@@ -9,10 +9,27 @@
#include <cstdio>
#include <cstdlib>
#include <unistd.h>
#include "Settings.h"
#include "mosquitto.h"
Settings* mySettings;
void spew() {
int mosqMajor, mosqMinor, mosqRevision;
/* Print mosquitto version and initialize library */
mosquitto_lib_version(&mosqMajor, &mosqMinor, &mosqRevision);
printf("Initializing Mosquitto Library Version %d.%d.%d\n", mosqMajor, mosqMinor, mosqRevision);
mosquitto_lib_init();
/* Cleanup mosquitto library */
mosquitto_lib_cleanup();
}
void usage() {
printf("Usage: FileSpewer [-i <interval>] [-h <host>] <filename>\n\n");
printf("FileSpewer will send the contents of <filename> every <interval> milliseconds\n");
......@@ -20,7 +37,7 @@ void usage() {
printf("the default <host> is localhost.\n");
}
int main(int argc, const char* argv[]) {
int main(int argc, char * const argv[]) {
/* Check command line */
mySettings = new Settings(argc, argv);
......@@ -29,8 +46,12 @@ int main(int argc, const char* argv[]) {
case USAGE:
usage();
break;
default:
case SPEW:
spew();
break;
case ABORT:
default:
exit(EXIT_FAILURE);
}
/* Clean up */
......
CXXFLAGS = -O2 -g -Wall -Werror -fmessage-length=0
CXXFLAGS = -O2 -g -Wall -Werror -fmessage-length=0 -I../../mosquitto-1.1/lib/
OBJS = FileSpewer.o Settings.o
LIBS =
LIBS = -L../../mosquitto-1.1/lib/ -lmosquitto
TARGET = FileSpewer
$(TARGET): $(OBJS)
$(CXX) -o $(TARGET) $(OBJS) $(LIBS)
$(CXX) -o $(TARGET) $(OBJS) $(LIBS) $(INCLUDES)
all: $(TARGET)
clean:
......
......@@ -6,18 +6,54 @@
*/
#include <cstdio>
#include <cstdlib>
#include <unistd.h>
#include "Settings.h"
Settings::Settings(int argc, const char* argv[]) : argc_(argc), argv_(argv)
Settings::Settings(int argc, char* const argv[]) : argc_(argc), argv_(argv)
{
/* Parse command line */
/* Assume defaults */
interval_ = DEFAULT_INTERVAL;
targetHost_ = DEFAULT_TARGETHOST;
/* Return usage info when called without parameters */
if (argc <= 1) {
mode_ = USAGE;
}
else {
/* TODO */
mode_ = ABORT;
/* Parse command line */
int ret;
while ((ret=getopt(argc_, argv_, "i:h:"))!=-1) {
switch(ret) {
case 'i':
if (sscanf(optarg, "%u", &interval_) != 1) {
fprintf(stderr, "Error: \"%s\" is an invalid interval.\n", optarg);
exit(EXIT_FAILURE);
}
break;
case 'h':
targetHost_ = optarg;
break;
case '?':
default:
mode_ = ABORT;
return;
}
};
/* Fail if no filename to spew was given */
if (argc<=optind) {
printf("Error: Missing filename.\n");
mode_ = ABORT;
return;
}
clientId_ = argv[optind];
/* No failure, so we're good to go */
mode_ = SPEW;
}
}
......
......@@ -5,20 +5,29 @@
* Author: Axel Auweter
*/
#include <string>
#ifndef SETTINGS_H_
#define SETTINGS_H_
#define DEFAULT_INTERVAL 1000
#define DEFAULT_TARGETHOST "localhost"
typedef enum {USAGE, ABORT, SPEW} UsageMode;
class Settings {
protected:
int argc_;
const char** argv_;
char* const *argv_;
UsageMode mode_;
unsigned int interval_;
std::string targetHost_;
std::string clientId_;
public:
Settings(int argc, const char* argv[]);
Settings(int argc, char * const argv[]);
UsageMode getMode();
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment