Compare commits
63
Commits
c38a4e2090
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6857d28b1 | ||
|
|
923049e6a1 | ||
|
|
7f836d6689 | ||
|
|
77c0ef9e04 | ||
|
|
fc0ecd6b27 | ||
|
|
d48bacbae7 | ||
|
|
6da144e049 | ||
|
|
7b6de3d556 | ||
|
|
dc6284a432 | ||
|
|
6eb4e0e658 | ||
|
|
ae3b8a086e | ||
|
|
3408eeeb49 | ||
|
|
1d16bb3625 | ||
|
|
c0160343e0 | ||
|
|
685bf9837c | ||
|
|
2c14751863 | ||
|
|
9242c7e4a0 | ||
|
|
445e541ddc | ||
|
|
7f99fb7eee | ||
|
|
268160d975 | ||
|
|
fd62edac6b | ||
|
|
d1ea8cc429 | ||
|
|
f0606db4f5 | ||
|
|
4d9f0b6e84 | ||
|
|
0d2d19d0db | ||
|
|
28ff2d1464 | ||
|
|
fa1fd42f64 | ||
|
|
25a2dcb701 | ||
|
|
f79916a848 | ||
|
|
262bb31354 | ||
|
|
2b748acdf5 | ||
|
|
97d3228fcf | ||
|
|
ebc9ac45db | ||
|
|
8d2fe6fc9c | ||
|
|
48ba00f7bb | ||
|
|
50d0fcdb6d | ||
|
|
4afea8953f | ||
|
|
99e900e4d3 | ||
|
|
ca112eb051 | ||
|
|
f98e5f7133 | ||
|
|
37ce336e00 | ||
|
|
75ac0db969 | ||
|
|
1e42ebe41d | ||
|
|
87d918809b | ||
|
|
17f9c02ac5 | ||
|
|
bbada12891 | ||
|
|
1c5c7f639c | ||
|
|
e447b81fd6 | ||
|
|
6e6f5f7b08 | ||
|
|
18d90499ac | ||
|
|
555fabfbbd | ||
|
|
6da5d3161d | ||
|
|
1b666bc625 | ||
|
|
6f61d0981a | ||
|
|
3acc28eeb2 | ||
|
|
7f0df4d9ff | ||
|
|
b6baa0e20f | ||
|
|
06e75a4a78 | ||
|
|
dfed94d1a4 | ||
|
|
0b7c3ba42d | ||
|
|
965836e8de | ||
|
|
694f8ce9f4 | ||
|
|
9078f481c7 |
No files matched your search
Generated
+8
@@ -0,0 +1,8 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
||||||
Generated
+580
@@ -0,0 +1,580 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="BackendCodeEditorSettings">
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSmartPointerVsMakeFunction/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSmartPointerVsMakeFunction/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCStyleCast/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCStyleCast/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionalStyleCast/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionalStyleCast/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReinterpretCastFromVoidPtr/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReinterpretCastFromVoidPtr/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExplicitConvertingConstructor/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExplicitConvertingConstructor/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExplicitConversionOperator/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExplicitConversionOperator/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDiscardedPostfixOperatorResult/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDiscardedPostfixOperatorResult/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConstValueFunctionReturnType/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConstValueFunctionReturnType/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberFunctionMayBeConst/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberFunctionMayBeConst/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberFunctionMayBeStatic/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberFunctionMayBeStatic/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableMayBeConst/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableMayBeConst/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterMayBeConst/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterMayBeConst/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVariableCanBeMadeConstexpr/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVariableCanBeMadeConstexpr/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterMayBeConstPtrOrRef/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterMayBeConstPtrOrRef/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPassValueParameterByConstReference/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPassValueParameterByConstReference/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppThrowExpressionCanBeReplacedWithRethrow/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppThrowExpressionCanBeReplacedWithRethrow/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppZeroConstantCanBeReplacedWithNullptr/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppZeroConstantCanBeReplacedWithNullptr/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCompileTimeConstantCanBeReplacedWithBooleanConstant/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCompileTimeConstantCanBeReplacedWithBooleanConstant/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIfCanBeReplacedByConstexprIf/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIfCanBeReplacedByConstexprIf/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=IfStdIsConstantEvaluatedCanBeReplaced/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=IfStdIsConstantEvaluatedCanBeReplaced/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=StdIsConstantEvaluatedWillAlwaysEvaluateToConstant/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=StdIsConstantEvaluatedWillAlwaysEvaluateToConstant/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConstevalIfIsAlwaysConstant/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConstevalIfIsAlwaysConstant/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassCanBeFinal/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassCanBeFinal/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseStructuredBinding/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseStructuredBinding/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseTypeTraitAlias/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseTypeTraitAlias/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAlgorithmWithCount/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAlgorithmWithCount/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseRangeAlgorithm/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseRangeAlgorithm/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseElementsView/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseElementsView/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseStdSize/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseStdSize/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppForLoopCanBeReplacedWithWhile/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppForLoopCanBeReplacedWithWhile/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppJoinDeclarationAndAssignment/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppJoinDeclarationAndAssignment/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReplaceTieWithStructuredBinding/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReplaceTieWithStructuredBinding/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReplaceMemsetWithZeroInitialization/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReplaceMemsetWithZeroInitialization/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAssociativeContains/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAssociativeContains/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseEraseAlgorithm/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseEraseAlgorithm/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseFamiliarTemplateSyntaxForGenericLambdas/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseFamiliarTemplateSyntaxForGenericLambdas/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTooWideScope/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTooWideScope/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTooWideScopeInitStatement/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTooWideScopeInitStatement/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantNamespaceDefinition/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantNamespaceDefinition/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonInlineFunctionDefinitionInHeaderFile/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonInlineFunctionDefinitionInHeaderFile/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonInlineVariableDefinitionInHeaderFile/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonInlineVariableDefinitionInHeaderFile/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionIsNotImplemented/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionIsNotImplemented/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrivateSpecialMemberFunctionIsNotImplemented/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrivateSpecialMemberFunctionIsNotImplemented/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHiddenFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHiddenFunction/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHidingFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHidingFunction/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPolymorphicClassWithNonVirtualPublicDestructor/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPolymorphicClassWithNonVirtualPublicDestructor/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractClassWithoutSpecifier/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractClassWithoutSpecifier/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIncompleteSwitchStatement/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIncompleteSwitchStatement/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultCaseNotHandledInSwitchStatement/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultCaseNotHandledInSwitchStatement/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyErroneousEmptyStatements/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyErroneousEmptyStatements/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppExpressionWithoutSideEffects/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppExpressionWithoutSideEffects/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNoDiscardExpression/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNoDiscardExpression/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionResultShouldBeUsed/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionResultShouldBeUsed/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMissingKeywordThrow/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMissingKeywordThrow/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDependentTypeWithoutTypenameKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDependentTypeWithoutTypenameKeyword/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDependentTemplateWithoutTemplateKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDependentTemplateWithoutTemplateKeyword/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppImplicitDefaultConstructorNotAvailable/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppImplicitDefaultConstructorNotAvailable/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassNeedsConstructorBecauseOfUninitializedMember/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassNeedsConstructorBecauseOfUninitializedMember/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUninitializedNonStaticDataMember/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUninitializedNonStaticDataMember/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRangeBasedForIncompatibleReference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRangeBasedForIncompatibleReference/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppZeroValuedExpressionUsedAsNullPointer/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppZeroValuedExpressionUsedAsNullPointer/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyUnintendedObjectSlicing/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyUnintendedObjectSlicing/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyUninitializedMember/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyUninitializedMember/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorDisambiguatedAsFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorDisambiguatedAsFunction/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVirtualFunctionInFinalClass/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVirtualFunctionInFinalClass/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMustBePublicVirtualToImplementInterface/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMustBePublicVirtualToImplementInterface/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationSpecifierWithoutDeclarators/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationSpecifierWithoutDeclarators/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEmptyDeclaration/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEmptyDeclaration/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationHidesLocal/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationHidesLocal/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationHidesUncapturedLocal/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationHidesUncapturedLocal/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMismatchedClassTags/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMismatchedClassTags/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUsingResultOfAssignmentAsCondition/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUsingResultOfAssignmentAsCondition/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIntegralToPointerConversion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIntegralToPointerConversion/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPointerToIntegralConversion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPointerToIntegralConversion/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIncompatiblePointerConversion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIncompatiblePointerConversion/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPointerConversionDropsQualifiers/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPointerConversionDropsQualifiers/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStringLiteralToCharPointerConversion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStringLiteralToCharPointerConversion/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExceptionSafeResourceAcquisition/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExceptionSafeResourceAcquisition/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVirtualFunctionCallInsideCtor/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVirtualFunctionCallInsideCtor/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractVirtualFunctionCallInCtor/@EntryIndexedValue" value="ERROR" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractVirtualFunctionCallInCtor/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppInvalidLineContinuation/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppInvalidLineContinuation/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfBadFormat/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfBadFormat/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfRiskyFormat/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfRiskyFormat/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfMissedArg/@EntryIndexedValue" value="ERROR" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfMissedArg/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfExtraArg/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfExtraArg/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatBadCode/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatBadCode/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatLegacyCode/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatLegacyCode/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatMixedArgs/@EntryIndexedValue" value="ERROR" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatMixedArgs/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatTooFewArgs/@EntryIndexedValue" value="ERROR" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatTooFewArgs/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatTooManyArgs/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatTooManyArgs/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeprecatedEntity/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeprecatedEntity/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMissingIncludeGuard/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMissingIncludeGuard/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenSyntaxError/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenSyntaxError/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenUnresolvedReference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenUnresolvedReference/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenUndocumentedParameter/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenUndocumentedParameter/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeletingVoidPointer/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeletingVoidPointer/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBooleanIncrementExpression/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBooleanIncrementExpression/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeprecatedRegisterStorageClassSpecifier/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeprecatedRegisterStorageClassSpecifier/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIdenticalOperandsInBinaryExpression/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIdenticalOperandsInBinaryExpression/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEqualOperandsInBinaryExpression/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEqualOperandsInBinaryExpression/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedefinitionOfDefaultArgumentInOverrideFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedefinitionOfDefaultArgumentInOverrideFunction/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnnamedNamespaceInHeaderFile/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnnamedNamespaceInHeaderFile/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterNamesMismatch/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterNamesMismatch/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultedSpecialMemberFunctionIsImplicitlyDeleted/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultedSpecialMemberFunctionIsImplicitlyDeleted/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNodiscardFunctionWithoutReturnValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNodiscardFunctionWithoutReturnValue/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantComplexityInComparison/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantComplexityInComparison/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractFinalClass/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractFinalClass/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSpecialFunctionWithoutNoexceptSpecification/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSpecialFunctionWithoutNoexceptSpecification/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnsignedZeroComparison/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnsignedZeroComparison/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMultiCharacterLiteral/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMultiCharacterLiteral/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMultiCharacterWideLiteral/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMultiCharacterWideLiteral/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantQualifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantQualifier/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantAccessSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantAccessSpecifier/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAccessSpecifierWithNoDeclarations/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAccessSpecifierWithNoDeclarations/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTypenameKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTypenameKeyword/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTemplateKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTemplateKeyword/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElseKeyword/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElseKeyword/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElseKeywordInsideCompoundStatement/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElseKeywordInsideCompoundStatement/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantControlFlowJump/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantControlFlowJump/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantEmptyStatement/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantEmptyStatement/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantEmptyDeclaration/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantEmptyDeclaration/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantParentheses/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantParentheses/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantLambdaParameterList/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantLambdaParameterList/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantCastExpression/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantCastExpression/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHeaderHasBeenAlreadyIncluded/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHeaderHasBeenAlreadyIncluded/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateArgumentsCanBeDeduced/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateArgumentsCanBeDeduced/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTemplateArguments/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTemplateArguments/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticSpecifierOnAnonymousNamespaceMember/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticSpecifierOnAnonymousNamespaceMember/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantStaticSpecifierOnMemberAllocationFunction/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantStaticSpecifierOnMemberAllocationFunction/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantStaticSpecifierOnThreadLocalLocalVariable/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantStaticSpecifierOnThreadLocalLocalVariable/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBaseClassAccessSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBaseClassAccessSpecifier/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantInlineSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantInlineSpecifier/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantConstSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantConstSpecifier/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBooleanExpressionArgument/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBooleanExpressionArgument/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantVoidArgumentList/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantVoidArgumentList/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantMemberInitializer/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantMemberInitializer/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBaseClassInitializer/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBaseClassInitializer/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConstParameterInDeclaration/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConstParameterInDeclaration/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVolatileParameterInDeclaration/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVolatileParameterInDeclaration/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFinalFunctionInFinalClass/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFinalFunctionInFinalClass/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFinalNonOverridingVirtualFunction/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFinalNonOverridingVirtualFunction/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElaboratedTypeSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElaboratedTypeSpecifier/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantDereferencingAndTakingAddress/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantDereferencingAndTakingAddress/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantConditionalExpression/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantConditionalExpression/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConditionalExpressionCanBeSimplified/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConditionalExpressionCanBeSimplified/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantExportKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantExportKeyword/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantZeroInitializerInAggregateInitialization/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantZeroInitializerInAggregateInitialization/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUserDefinedLiteralSuffixDoesNotStartWithUnderscore/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUserDefinedLiteralSuffixDoesNotStartWithUnderscore/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassIsIncomplete/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassIsIncomplete/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateParameterShadowing/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateParameterShadowing/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMutableSpecifierOnReferenceMember/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMutableSpecifierOnReferenceMember/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultInitializationWithNoUserConstructor/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultInitializationWithNoUserConstructor/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppExplicitSpecializationInNonNamespaceScope/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppExplicitSpecializationInNonNamespaceScope/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnionMemberOfReferenceType/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnionMemberOfReferenceType/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUninitializedDependentBaseClass/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUninitializedDependentBaseClass/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrecompiledHeaderIsNotIncluded/@EntryIndexedValue" value="ERROR" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrecompiledHeaderIsNotIncluded/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrecompiledHeaderNotFound/@EntryIndexedValue" value="ERROR" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrecompiledHeaderNotFound/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCoroutineCallResolveError/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCoroutineCallResolveError/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAwaiterTypeIsNotClass/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAwaiterTypeIsNotClass/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppOutParameterMustBeWritten/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppOutParameterMustBeWritten/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWarningDirective/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWarningDirective/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticAssertFailure/@EntryIndexedValue" value="ERROR" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticAssertFailure/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEvaluationFailure/@EntryIndexedValue" value="ERROR" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEvaluationFailure/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorNeverUsed/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTypeAliasNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTypeAliasNeverUsed/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConceptNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConceptNeverUsed/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassNeverUsed/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnumeratorNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnumeratorNeverUsed/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLambdaCaptureNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLambdaCaptureNeverUsed/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableWithNonTrivialDtorIsNeverUsed/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableWithNonTrivialDtorIsNeverUsed/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterNeverUsed/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterNeverUsed/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateParameterNeverUsed/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateParameterNeverUsed/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEntityAssignedButNoRead/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEntityAssignedButNoRead/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEntityUsedOnlyInUnevaluatedContext/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEntityUsedOnlyInUnevaluatedContext/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableMightNotBeInitialized/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableMightNotBeInitialized/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppObjectMemberMightNotBeInitialized/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppObjectMemberMightNotBeInitialized/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSomeObjectMembersMightNotBeInitialized/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSomeObjectMembersMightNotBeInitialized/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorUsedBeforeInitialization/@EntryIndexedValue" value="ERROR" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorUsedBeforeInitialization/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnusedIncludeDirective/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnusedIncludeDirective/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNotAllPathsReturnValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNotAllPathsReturnValue/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CDeclarationWithImplicitIntType/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CDeclarationWithImplicitIntType/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionDoesntReturnValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionDoesntReturnValue/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReturnNoValueInNonVoidFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReturnNoValueInNonVoidFunction/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCVQualifierCanNotBeAppliedToReference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCVQualifierCanNotBeAppliedToReference/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDereferenceOperatorLimitExceeded/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDereferenceOperatorLimitExceeded/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppForwardEnumDeclarationWithoutUnderlyingType/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppForwardEnumDeclarationWithoutUnderlyingType/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnmatchedPragmaRegionDirective/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnmatchedPragmaRegionDirective/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnmatchedPragmaEndRegionDirective/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnmatchedPragmaEndRegionDirective/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticDataMemberInUnnamedStruct/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticDataMemberInUnnamedStruct/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultIsUsedAsIdentifier/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultIsUsedAsIdentifier/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLongFloat/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLongFloat/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtReinterpretCastFromNullptr/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtReinterpretCastFromNullptr/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtBindingRValueToLvalueReference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtBindingRValueToLvalueReference/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtAddressOfClassRValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtAddressOfClassRValue/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtDoubleUserConversionInCopyInit/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtDoubleUserConversionInCopyInit/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtCopyElisionInCopyInitDeclarator/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtCopyElisionInCopyInitDeclarator/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtNotInitializedStaticConstLocalVar/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtNotInitializedStaticConstLocalVar/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRemoveRedundantBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRemoveRedundantBraces/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceIfStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceIfStatementBraces/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceForStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceForStatementBraces/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceWhileStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceWhileStatementBraces/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceDoStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceDoStatementBraces/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWrongIncludesOrder/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWrongIncludesOrder/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWrongSlashesInIncludeDirective/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWrongSlashesInIncludeDirective/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceNestedNamespacesStyle/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceNestedNamespacesStyle/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceTypeAliasCodeStyle/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceTypeAliasCodeStyle/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceFunctionDeclarationStyle/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceFunctionDeclarationStyle/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberInitializersOrder/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberInitializersOrder/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceOverridingFunctionStyle/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceOverridingFunctionStyle/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceOverridingDestructorStyle/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceOverridingDestructorStyle/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAuto/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAuto/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAutoForNumeric/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAutoForNumeric/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceCVQualifiersPlacement/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceCVQualifiersPlacement/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceCVQualifiersOrder/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceCVQualifiersOrder/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnnecessaryWhitespace/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnnecessaryWhitespace/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTabsAreDisallowed/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTabsAreDisallowed/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantConditions/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantConditions/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFANullDereference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFANullDereference/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFANotInitializedField/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFANotInitializedField/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALoopConditionNotUpdated/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALoopConditionNotUpdated/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFADeletedPointer/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFADeletedPointer/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAMemoryLeak/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAMemoryLeak/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAInvalidatedMemory/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAInvalidatedMemory/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALocalValueEscapesScope/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALocalValueEscapesScope/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALocalValueEscapesFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALocalValueEscapesFunction/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantParameter/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantParameter/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantFunctionResult/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantFunctionResult/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAArrayIndexOutOfBounds/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAArrayIndexOutOfBounds/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreachableCode/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreachableCode/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreachableFunctionCall/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreachableFunctionCall/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAEndlessLoop/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAEndlessLoop/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAInfiniteRecursion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAInfiniteRecursion/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnusedValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnusedValue/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreadVariable/@EntryIndexedValue" value="WARNING" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreadVariable/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFATimeOver/@EntryIndexedValue" value="HINT" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFATimeOver/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppInconsistentNaming/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppInconsistentNaming/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=StringLiteralTypo/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=StringLiteralTypo/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CommentTypo/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CommentTypo/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=IdentifierTypo/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||||
|
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=IdentifierTypo/@EntryIndexRemoved" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppClangFormat/EnableClangFormatSupport/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/EditorConfig/EnableClangFormatSupport/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_BINARY_EXPRESSIONS_CHAIN/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_CALLS_CHAIN/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_EXPRESSION/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_FOR_STMT/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTIPLE_DECLARATION/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_TERNARY/@EntryValue" value="ALIGN_ALL" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_CLASS_DEFINITION/@EntryValue" value="1" type="int" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_BLANK_LINES_IN_DECLARATIONS/@EntryValue" value="2" type="int" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_BLANK_LINES_IN_CODE/@EntryValue" value="2" type="int" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_USER_LINEBREAKS/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_CASE_FROM_SWITCH/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_COMMENT/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INT_ALIGN_EQ/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SIMPLE_BLOCK_STYLE/@EntryValue" value="DO_NOT_CHANGE" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COMMA_IN_TEMPLATE_ARGS/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COMMA_IN_TEMPLATE_PARAMS/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_FOR_SEMICOLON/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_FOR_SEMICOLON/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_UNARY_OPERATOR/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_ARRAY_ACCESS_BRACKETS/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_CAST_EXPRESSION_PARENTHESES/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_INITIALIZER_BRACES/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_METHOD_PARENTHESES/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_INITIALIZER_BRACES/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPECIAL_ELSE_IF_TREATMENT/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_CAST_EXPRESSION_PARENTHESES/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_BINARY_OPSIGN/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_TERNARY_OPSIGNS/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/TYPE_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/OTHER_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/CASE_BLOCK_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_FUNCTION_DECLARATION/@EntryValue" value="1" type="int" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_FUNCTION_DEFINITION/@EntryValue" value="1" type="int" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_WHILE_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_ELSE_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_CATCH_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/NAMESPACE_INDENTATION/@EntryValue" value="All" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_ARGUMENT/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_EXTENDS_LIST/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_PARAMETER/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_TYPE_ARGUMENT/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_TYPE_PARAMETER/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_DECLARATIONS/@EntryValue" value="0" type="int" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_ACCESS_SPECIFIERS_FROM_CLASS/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_CLASS_MEMBERS_FROM_ACCESS_SPECIFIERS/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/LINE_BREAK_AFTER_COLON_IN_MEMBER_INITIALIZER_LISTS/@EntryValue" value="ON_SINGLE_LINE" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/MEMBER_INITIALIZER_LIST_STYLE/@EntryValue" value="DO_NOT_CHANGE" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_NAMESPACE_DEFINITIONS_ON_SAME_LINE/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COLON_IN_BITFIELD_DECLARATOR/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_COLON_IN_BITFIELD_DECLARATOR/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_EXTENDS_COLON/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_EXTENDS_COLON/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_FOR_COLON/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_FOR_COLON/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_DATA_MEMBER/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_DATA_MEMBERS/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_METHOD/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_NESTED_DECLARATOR/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_DATA_MEMBER/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_DATA_MEMBERS/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_METHOD/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_ABSTRACT_DECL/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_DATA_MEMBER/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_DATA_MEMBERS/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_METHOD/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_ABSTRACT_DECL/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_DATA_MEMBER/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_DATA_MEMBERS/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_METHOD/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_TEMPLATE_ARGS/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BETWEEN_CLOSING_ANGLE_BRACKETS_IN_TEMPLATE_ARGS/@EntryValue" value="true" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_TEMPLATE_ARGS/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_DECLARATION_PARENTHESES/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_BLOCKS/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_INVOCATION_LPAR/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_INVOCATION_LPAR/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_INVOCATION_RPAR/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_DECLARATION_LPAR/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_DECLARATION_LPAR/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_DECLARATION_RPAR/@EntryValue" value="false" type="bool" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_ARGUMENTS_STYLE/@EntryValue" value="WRAP_IF_LONG" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_PARAMETERS_STYLE/@EntryValue" value="WRAP_IF_LONG" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BREAK_TEMPLATE_DECLARATION/@EntryValue" value="LINE_BREAK" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/NAMESPACE_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/FREE_BLOCK_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INVOCABLE_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ANONYMOUS_METHOD_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INITIALIZER_BRACES/@EntryValue" value="END_OF_LINE_NO_SPACE" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_STYLE/@EntryValue" value="Space" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_SIZE/@EntryValue" value="4" type="int" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/CONTINUOUS_LINE_INDENT/@EntryValue" value="Double" type="string" />
|
||||||
|
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/TAB_WIDTH/@EntryValue" value="4" type="int" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
Generated
+8
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/Info2P5.iml" filepath="$PROJECT_DIR$/.idea/Info2P5.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
Generated
+8
@@ -0,0 +1,8 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="22.5.2" type="CppFileRunConfiguration" factoryName="CppFileRunConfiguration" folderName="New Folder" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="Info2P5" TARGET_NAME="22.5.2" CONFIG_NAME="22.5.2">
|
||||||
|
<option name="sourceFile" value="C:\Users\z004tv1b\CLionProjects\Info2P5\22.5.c" />
|
||||||
|
<method v="2">
|
||||||
|
<option name="com.jetbrains.cidr.cpp.runfile.CppFileBuildBeforeRunTaskProvider$BasicBuildBeforeRunTask" enabled="true" />
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
Generated
+6
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#define MAX 100 // Maximale Anzahl an Zahlen
|
||||||
|
|
||||||
|
// Struktur zur Speicherung einer Zahl mit Vorkomma- und Nachkommateil
|
||||||
|
typedef struct {
|
||||||
|
int vorkomma; // Ganzzahliger Teil vor dem Komma
|
||||||
|
int nachkomma; // Nachkommateil als ganze Zahl
|
||||||
|
int nachstellen; // Anzahl der Nachkommastellen
|
||||||
|
} Kommazahl;
|
||||||
|
|
||||||
|
// Funktion zur Einlesung der Zahlen
|
||||||
|
int einlesen(Kommazahl zahlen[], int max) {
|
||||||
|
char eingabe[100]; // Puffer für die Eingabezeile
|
||||||
|
int anzahl = 0; // Zählt, wie viele Zahlen eingegeben wurden
|
||||||
|
printf("Gib Deine Kommazahlen ein (Abschluss mit Leerzeile)\n");
|
||||||
|
while (fgets(eingabe, sizeof(eingabe), stdin)) { // Lies eine Zeile ein
|
||||||
|
if (eingabe[0] == '\n') break; // Wenn die Zeile leer ist, beende die Eingabe
|
||||||
|
Kommazahl z; // Neue Kommazahl-Struktur
|
||||||
|
char *komma = strchr(eingabe, ','); // Suche das Komma in der Eingabe
|
||||||
|
if (komma) { // Wenn ein Komma gefunden wurde
|
||||||
|
*komma = '\0'; // Setze das Komma auf Stringende, trennt Vorkomma ab
|
||||||
|
z.vorkomma = atoi(eingabe); // Wandelt den Vorkommateil in int um
|
||||||
|
char *nachkommaStr = komma + 1; // Zeiger auf den Nachkommateil
|
||||||
|
nachkommaStr[strcspn(nachkommaStr, "\n")] = '\0'; // Entfernt Zeilenumbruch am Ende
|
||||||
|
z.nachstellen = strlen(nachkommaStr); // Zählt die Nachkommastellen
|
||||||
|
z.nachkomma = atoi(nachkommaStr); // Wandelt Nachkommateil in int um
|
||||||
|
} else { // Wenn kein Komma gefunden wurde
|
||||||
|
z.vorkomma = atoi(eingabe); // Ganze Zahl, Vorkomma ist die Zahl
|
||||||
|
z.nachkomma = 0; // Nachkomma ist 0
|
||||||
|
z.nachstellen = 0; // Keine Nachkommastellen
|
||||||
|
}
|
||||||
|
zahlen[anzahl++] = z; // Speichere die Zahl im Array
|
||||||
|
if (anzahl >= max) break; // Wenn Maximum erreicht, abbrechen
|
||||||
|
}
|
||||||
|
return anzahl; // Gibt die Anzahl der eingegebenen Zahlen zurück
|
||||||
|
}
|
||||||
|
|
||||||
|
// Funktion zur Bestimmung der maximalen Nachkommastellen
|
||||||
|
int max_nachkommastellen(const Kommazahl zahlen[], int anzahl) {
|
||||||
|
int max_nachstellen = 0; // Startwert für Maximum
|
||||||
|
for (int i = 0; i < anzahl; i++) { // Gehe alle Zahlen durch
|
||||||
|
if (zahlen[i].nachstellen > max_nachstellen) { // Wenn mehr Nachkommastellen gefunden
|
||||||
|
max_nachstellen = zahlen[i].nachstellen; // Speichere neues Maximum
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return max_nachstellen; // Gibt das Maximum zurück
|
||||||
|
}
|
||||||
|
|
||||||
|
// Funktion zur Addition der Zahlen mit Skalierung
|
||||||
|
void addiere(const Kommazahl zahlen[], int anzahl, int max_nachstellen, int *summe_vorkomma, long long *summe_nachkomma) {
|
||||||
|
*summe_vorkomma = 0; // Setze Summe Vorkomma auf 0
|
||||||
|
*summe_nachkomma = 0; // Setze Summe Nachkomma auf 0
|
||||||
|
for (int i = 0; i < anzahl; i++) { // Gehe alle Zahlen durch
|
||||||
|
*summe_vorkomma += zahlen[i].vorkomma; // Addiere Vorkomma-Anteil
|
||||||
|
int nachkomma = zahlen[i].nachkomma; // Hole Nachkomma-Anteil
|
||||||
|
// Skaliere Nachkomma auf die maximale Stellenzahl (z.B. 3 -> 300 bei 2 Nachkommastellen)
|
||||||
|
for (int j = 0; j < max_nachstellen - zahlen[i].nachstellen; j++) {
|
||||||
|
nachkomma *= 10;
|
||||||
|
}
|
||||||
|
*summe_nachkomma += nachkomma; // Addiere skalierten Nachkomma-Anteil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Funktion zur Berechnung des Übertrags und Ausgabe
|
||||||
|
void ausgabe(int summe_vorkomma, long long summe_nachkomma, int max_nachstellen) {
|
||||||
|
int basis = 1; // Basis für Nachkommastellen (z.B. 1000 für 3 Stellen)
|
||||||
|
for (int i = 0; i < max_nachstellen; i++) basis *= 10;
|
||||||
|
summe_vorkomma += summe_nachkomma / basis; // Übertrag von Nachkomma zu Vorkomma
|
||||||
|
summe_nachkomma = summe_nachkomma % basis; // Rest bleibt als Nachkomma
|
||||||
|
// Ausgabe der Summe, Nachkomma wird mit führenden Nullen ausgegeben
|
||||||
|
printf("= %d,%0*lld\n", summe_vorkomma, max_nachstellen, summe_nachkomma);
|
||||||
|
}
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
Kommazahl zahlen[MAX]; // Array für alle eingegebenen Zahlen
|
||||||
|
int anzahl = einlesen(zahlen, MAX); // Lies Zahlen ein, gibt Anzahl zurück
|
||||||
|
int max_nachstellen = max_nachkommastellen(zahlen, anzahl); // Finde maximale Nachkommastellen
|
||||||
|
int summe_vorkomma;
|
||||||
|
long long summe_nachkomma;
|
||||||
|
addiere(zahlen, anzahl, max_nachstellen, &summe_vorkomma, &summe_nachkomma); // Addiere alle Zahlen
|
||||||
|
ausgabe(summe_vorkomma, summe_nachkomma, max_nachstellen); // Gib das Ergebnis aus
|
||||||
|
return 0; // Programmende
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
// Struktur für eine römische Ziffer und ihren Wert
|
||||||
|
typedef struct {
|
||||||
|
int wert; // Der Wert der Ziffer (z.B. 1)
|
||||||
|
const char *roemisch; // Das römische Zeichen (z.B. "I")
|
||||||
|
} RoemZahl;
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
// Tabelle der römischen Ziffern, aufsteigend sortiert (klein nach groß)
|
||||||
|
RoemZahl ziffern[] = {
|
||||||
|
{1, "I"},
|
||||||
|
{4, "IV"},
|
||||||
|
{5, "V"},
|
||||||
|
{9, "IX"},
|
||||||
|
{10, "X"},
|
||||||
|
{40, "XL"},
|
||||||
|
{50, "L"},
|
||||||
|
{90, "XC"},
|
||||||
|
{100, "C"},
|
||||||
|
{400, "CD"},
|
||||||
|
{500, "D"},
|
||||||
|
{900, "CM"},
|
||||||
|
{1000, "M"}
|
||||||
|
};
|
||||||
|
const int n = sizeof(ziffern) / sizeof(ziffern[0]);
|
||||||
|
int zahl;
|
||||||
|
|
||||||
|
// Zahl vom Benutzer einlesen
|
||||||
|
printf("Zu wandelnde Zahl: ");
|
||||||
|
scanf("%d", &zahl);
|
||||||
|
|
||||||
|
printf("... %d = ", zahl);
|
||||||
|
|
||||||
|
// Über die Ziffern von groß nach klein iterieren (von hinten nach vorne)
|
||||||
|
for (int i = n - 1; i >= 0; i--) {
|
||||||
|
// So oft wie möglich die aktuelle Ziffer abziehen und ausgeben
|
||||||
|
for (int j = 0; j < zahl / ziffern[i].wert; j++) {
|
||||||
|
printf("%s", ziffern[i].roemisch);
|
||||||
|
}
|
||||||
|
zahl %= ziffern[i].wert;
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
// Struktur für eine römische Ziffer und ihren Wert
|
||||||
|
typedef struct {
|
||||||
|
int wert;
|
||||||
|
const char *roemisch;
|
||||||
|
} RoemZahl;
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
// Array aufsteigend sortiert (klein nach groß)
|
||||||
|
RoemZahl ziffern[] = {
|
||||||
|
{1, "I"},
|
||||||
|
{4, "IV"},
|
||||||
|
{5, "V"},
|
||||||
|
{9, "IX"},
|
||||||
|
{10, "X"},
|
||||||
|
{40, "XL"},
|
||||||
|
{49, "IL"}, // 50 - 1
|
||||||
|
{50, "L"},
|
||||||
|
{90, "XC"},
|
||||||
|
{99, "IC"}, // 100 - 1
|
||||||
|
{100, "C"},
|
||||||
|
{400, "CD"},
|
||||||
|
{499, "ID"}, // 500 - 1
|
||||||
|
{500, "D"},
|
||||||
|
{900, "CM"},
|
||||||
|
{990, "XM"}, // 1000 - 10
|
||||||
|
{999, "IM"}, // 1000 - 1
|
||||||
|
{1000, "M"}
|
||||||
|
};
|
||||||
|
const int n = sizeof(ziffern) / sizeof(ziffern[0]);
|
||||||
|
int zahl;
|
||||||
|
|
||||||
|
printf("Zu wandelnde Zahl: ");
|
||||||
|
scanf("%d", &zahl);
|
||||||
|
|
||||||
|
printf("... %d = ", zahl);
|
||||||
|
|
||||||
|
// Von groß nach klein durch das aufsteigende Array
|
||||||
|
for (int i = n - 1; i >= 0; i--) {
|
||||||
|
for (int j = 0; j < zahl / ziffern[i].wert; j++) {
|
||||||
|
printf("%s", ziffern[i].roemisch);
|
||||||
|
}
|
||||||
|
zahl %= ziffern[i].wert;
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
typedef struct Schueler {
|
||||||
|
char name[30];
|
||||||
|
char vorname[30];
|
||||||
|
int note;
|
||||||
|
} Schueler_t;
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
Schueler_t *klasse = NULL; // Dynamisches Array für Schüler
|
||||||
|
int anzahl = 0; // Aktuelle Anzahl der Schüler
|
||||||
|
int kapazitaet = 0; // Aktuelle Kapazität des Arrays
|
||||||
|
int summe = 0;
|
||||||
|
int haeufigkeit[6] = {0}; // Notenspiegel
|
||||||
|
|
||||||
|
while (1) {
|
||||||
|
// Speicher vergrößern, falls nötig
|
||||||
|
if (anzahl >= kapazitaet) {
|
||||||
|
kapazitaet = kapazitaet == 0 ? 10 : kapazitaet * 2;
|
||||||
|
Schueler_t *tmp = realloc(klasse, kapazitaet * sizeof(Schueler_t));
|
||||||
|
if (!tmp) {
|
||||||
|
printf("Speicherfehler!\n");
|
||||||
|
free(klasse);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
klasse = tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("\n----Eingabe des %d. Schuelers----\n", anzahl + 1);
|
||||||
|
|
||||||
|
printf("Name (oder ENTER zum Beenden): ");
|
||||||
|
if (fgets(klasse[anzahl].name, sizeof(klasse[anzahl].name), stdin) == NULL)
|
||||||
|
break;
|
||||||
|
klasse[anzahl].name[strcspn(klasse[anzahl].name, "\n")] = 0;
|
||||||
|
if (klasse[anzahl].name[0] == '\0')
|
||||||
|
break;
|
||||||
|
|
||||||
|
printf("Vorname: ");
|
||||||
|
if (fgets(klasse[anzahl].vorname, sizeof(klasse[anzahl].vorname), stdin) == NULL)
|
||||||
|
break;
|
||||||
|
klasse[anzahl].vorname[strcspn(klasse[anzahl].vorname, "\n")] = 0;
|
||||||
|
|
||||||
|
do {
|
||||||
|
printf("Note (1-6): ");
|
||||||
|
if (scanf("%d", &klasse[anzahl].note) != 1) {
|
||||||
|
while (getchar() != '\n');
|
||||||
|
printf("Ungültige Eingabe. Abbruch.\n");
|
||||||
|
free(klasse);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
} while (klasse[anzahl].note < 1 || klasse[anzahl].note > 6);
|
||||||
|
|
||||||
|
// Eingabepuffer leeren (wegen scanf)
|
||||||
|
while (getchar() != '\n');
|
||||||
|
|
||||||
|
summe += klasse[anzahl].note;
|
||||||
|
haeufigkeit[klasse[anzahl].note - 1]++;
|
||||||
|
anzahl++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (anzahl == 0) {
|
||||||
|
printf("Keine Schüler eingegeben.\n");
|
||||||
|
free(klasse);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Übersicht ausgeben
|
||||||
|
printf("\n%-4s %-15s %-15s %-5s\n", "Nr.", "Name", "Vorname", "Note");
|
||||||
|
for (int i = 0; i < anzahl; i++) {
|
||||||
|
printf("%-4d %-15s %-15s %-5d\n", i + 1, klasse[i].name, klasse[i].vorname, klasse[i].note);
|
||||||
|
}
|
||||||
|
// Durchschnittsnote
|
||||||
|
double durchschnitt = (double)summe / anzahl;
|
||||||
|
printf("\n....Durchschnittsnote: %.2f\n", durchschnitt);
|
||||||
|
// Notenspiegel
|
||||||
|
printf("....Notenspiegel\n");
|
||||||
|
for (int i = 0; i < 6; i++) {
|
||||||
|
printf("Note %d: ", i + 1);
|
||||||
|
for (int j = 0; j < haeufigkeit[i]; j++) {
|
||||||
|
printf("*");
|
||||||
|
}
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
free(klasse);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
// Definition einer Struktur zur Speicherung von Zeitangaben
|
||||||
|
struct zeit {
|
||||||
|
int tag; // Tage
|
||||||
|
int std; // Stunden
|
||||||
|
int min; // Minuten
|
||||||
|
int sek; // Sekunden
|
||||||
|
};
|
||||||
|
|
||||||
|
// Funktion: Wandelt eine Zeitstruktur in die Gesamtanzahl an Sekunden um
|
||||||
|
unsigned long zeit_in_sek(struct zeit z) {
|
||||||
|
// 1 Tag = 86400 Sekunden, 1 Stunde = 3600 Sekunden, 1 Minute = 60 Sekunden
|
||||||
|
return z.tag * 86400 + z.std * 3600 + z.min * 60 + z.sek;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Funktion: Wandelt eine Anzahl von Sekunden in eine Zeitstruktur um
|
||||||
|
struct zeit sek_in_zeit(unsigned long sek) {
|
||||||
|
struct zeit z;
|
||||||
|
z.tag = sek / 86400; // Ganze Tage berechnen
|
||||||
|
sek %= 86400; // Restsekunden nach Tagen
|
||||||
|
z.std = sek / 3600; // Ganze Stunden berechnen
|
||||||
|
sek %= 3600; // Restsekunden nach Stunden
|
||||||
|
z.min = sek / 60; // Ganze Minuten berechnen
|
||||||
|
z.sek = sek % 60; // Restsekunden nach Minuten
|
||||||
|
return z;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
struct zeit z1, z2, summe; // Zeitstrukturen für die beiden Eingaben und die Summe
|
||||||
|
unsigned long s1, s2, sgesamt; // Variablen für die Sekundenwerte
|
||||||
|
|
||||||
|
// Eingabe der ersten Zeit im Format tt.hh.mm.ss
|
||||||
|
printf("Gib 1. Zeit ein (tt.hh.mm.ss): ");
|
||||||
|
scanf("%d.%d.%d.%d", &z1.tag, &z1.std, &z1.min, &z1.sek);
|
||||||
|
|
||||||
|
// Eingabe der zweiten Zeit im gleichen Format
|
||||||
|
printf("Gib 2. Zeit ein (tt.hh.mm.ss): ");
|
||||||
|
scanf("%d.%d.%d.%d", &z2.tag, &z2.std, &z2.min, &z2.sek);
|
||||||
|
|
||||||
|
// Umwandlung der beiden Zeiten in Sekunden
|
||||||
|
s1 = zeit_in_sek(z1);
|
||||||
|
s2 = zeit_in_sek(z2);
|
||||||
|
|
||||||
|
// Addition der Sekundenwerte
|
||||||
|
sgesamt = s1 + s2;
|
||||||
|
|
||||||
|
// Umwandlung der Gesamtsumme der Sekunden zurück in eine Zeitstruktur
|
||||||
|
summe = sek_in_zeit(sgesamt);
|
||||||
|
|
||||||
|
// Ausgabe des Ergebnisses in Tagen, Stunden, Minuten, Sekunden und Gesamtsekunden
|
||||||
|
printf("= %d Tage, %d:%d:%d; %lu Gesamtsekunden\n",
|
||||||
|
summe.tag, summe.std, summe.min, summe.sek, sgesamt);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
|
#define MAXWORD 100 // Maximale Wortlänge
|
||||||
|
|
||||||
|
// Definition eines Baumknotens für ein Wort
|
||||||
|
typedef struct TreeNode {
|
||||||
|
char *word; // Das gespeicherte Wort
|
||||||
|
int count; // Wie oft das Wort vorkam
|
||||||
|
struct TreeNode *left; // Linker Teilbaum (Wörter, die alphabetisch davor kommen)
|
||||||
|
struct TreeNode *right; // Rechter Teilbaum (Wörter, die alphabetisch danach kommen)
|
||||||
|
} TreeNode_t;
|
||||||
|
|
||||||
|
// Funktion zum Einfügen eines Wortes in den Baum
|
||||||
|
// Falls das Wort schon existiert, wird der Zähler erhöht
|
||||||
|
TreeNode_t* insert(TreeNode_t *root, const char *word) {
|
||||||
|
if (root == NULL) {
|
||||||
|
// Neuer Knoten, falls das Wort noch nicht im Baum ist
|
||||||
|
TreeNode_t *newNode = malloc(sizeof(TreeNode_t));
|
||||||
|
if (!newNode) {
|
||||||
|
perror("Speicherfehler");
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
newNode->word = strdup(word); // Wort kopieren und speichern
|
||||||
|
newNode->count = 1; // Erstes Vorkommen
|
||||||
|
newNode->left = newNode->right = NULL; // Noch keine Kinder
|
||||||
|
return newNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
int cmp = strcmp(word, root->word); // Alphabetischer Vergleich
|
||||||
|
if (cmp == 0) {
|
||||||
|
// Wort schon vorhanden: Zähler erhöhen
|
||||||
|
root->count++;
|
||||||
|
} else if (cmp < 0) {
|
||||||
|
// Wort ist alphabetisch VOR dem aktuellen Knoten: links einfügen
|
||||||
|
root->left = insert(root->left, word);
|
||||||
|
} else {
|
||||||
|
// Wort ist alphabetisch NACH dem aktuellen Knoten: rechts einfügen
|
||||||
|
root->right = insert(root->right, word);
|
||||||
|
}
|
||||||
|
return root;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Inorder-Ausgabe: Gibt die Wörter alphabetisch sortiert mit Häufigkeit aus
|
||||||
|
void printTree(TreeNode_t *root) {
|
||||||
|
if (root == NULL)
|
||||||
|
return;
|
||||||
|
printTree(root->left); // Erst linker Teilbaum
|
||||||
|
printf("%-12s : %d\n", root->word, root->count); // Dann aktueller Knoten
|
||||||
|
printTree(root->right); // Dann rechter Teilbaum
|
||||||
|
}
|
||||||
|
|
||||||
|
// Gibt den belegten Speicher des Baumes wieder frei
|
||||||
|
void freeTree(TreeNode_t *root) {
|
||||||
|
if (root == NULL)
|
||||||
|
return;
|
||||||
|
freeTree(root->left); // Erst linker Teilbaum
|
||||||
|
freeTree(root->right); // Dann rechter Teilbaum
|
||||||
|
free(root->word); // Erst das Wort freigeben
|
||||||
|
free(root); // Dann den Knoten selbst
|
||||||
|
}
|
||||||
|
|
||||||
|
// Prüft, ob ein Zeichen ein Buchstabe ist (a-z, A-Z)
|
||||||
|
int isLetter(char c) {
|
||||||
|
return isalpha((unsigned char)c);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Liest Wörter aus stdin, zählt sie und gibt die Statistik aus
|
||||||
|
void readTextAndPrintStats() {
|
||||||
|
char word[MAXWORD]; // Zwischenspeicher für das aktuelle Wort
|
||||||
|
int index = 0; // Position im Wort
|
||||||
|
int c; // Aktuelles Zeichen
|
||||||
|
TreeNode_t *tree = NULL; // Wurzel des Baumes
|
||||||
|
|
||||||
|
// Zeichenweise Einlesen bis Dateiende (EOF)
|
||||||
|
while ((c = getchar()) != EOF) {
|
||||||
|
if (isLetter(c)) {
|
||||||
|
// Nur Buchstaben werden akzeptiert, alles in Kleinbuchstaben
|
||||||
|
if (index < MAXWORD - 1)
|
||||||
|
word[index++] = tolower(c);
|
||||||
|
} else if (index > 0) {
|
||||||
|
// Wortende erreicht (kein Buchstabe mehr)
|
||||||
|
word[index] = '\0'; // String abschließen
|
||||||
|
tree = insert(tree, word); // Wort in Baum einfügen
|
||||||
|
index = 0; // Für das nächste Wort zurücksetzen
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Falls am Ende noch ein Wort übrig ist (z.B. Datei endet ohne Leerzeichen)
|
||||||
|
if (index > 0) {
|
||||||
|
word[index] = '\0';
|
||||||
|
tree = insert(tree, word);
|
||||||
|
}
|
||||||
|
|
||||||
|
printTree(tree); // Statistik ausgeben (alphabetisch sortiert)
|
||||||
|
freeTree(tree); // Speicher aufräumen
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hauptfunktion: Startet das Programm
|
||||||
|
int main() {
|
||||||
|
readTextAndPrintStats();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Kompilieren: gcc -o 28.6.3_wortstat 28.6.3_wortstat.c
|
||||||
|
|
||||||
|
// Ausführen: 28.6.3_wortstat.exe < test.txt
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
// Definition von Aufzählungstypen (enum) für Laugen und Säuren
|
||||||
|
typedef enum { NATRIUMLAUGE, KALILAUGE, KALKWASSER, ANZ_LAUGEN } Lauge;
|
||||||
|
typedef enum { SALZSAEURE, SCHWEFELSAEURE, SALPETERSAEURE, KOHLENSAEURE, ANZ_SAEUREN } Saeure;
|
||||||
|
// Tabelle der Namen (für Anzeige)
|
||||||
|
const char* laugen_namen[ANZ_LAUGEN] = {
|
||||||
|
"Natronlauge", "Kalilauge", "Kalkwasser"
|
||||||
|
};
|
||||||
|
const char* saeure_namen[ANZ_SAEUREN] = {
|
||||||
|
"Salzsäure", "Schwefelsäure", "Salpetersäure", "Kohlensäure"
|
||||||
|
};
|
||||||
|
// Produktmatrix: Salze für Kombinationen von Lauge x Säure
|
||||||
|
const char* produkte[ANZ_LAUGEN][ANZ_SAEUREN] = {
|
||||||
|
// Natronlauge
|
||||||
|
{ "Natriumchlorid", "Natriumsulfat", "Natriumnitrat", "Natriumcarbonat" },
|
||||||
|
// Kalilauge
|
||||||
|
{ "Kaliumchlorid", "Kaliumsulfat", "Kaliumnitrat", "Kaliumcarbonat" },
|
||||||
|
// Kalkwasser
|
||||||
|
{ "Calciumchlorid", "Calciumsulfat", "Calciumnitrat", "Calciumcarbonat" }
|
||||||
|
};
|
||||||
|
int main() {
|
||||||
|
// Überschrift ausgeben
|
||||||
|
printf(" |");
|
||||||
|
for (int s = 0; s < ANZ_SAEUREN; s++) {
|
||||||
|
printf(" %-16s |", saeure_namen[s]); // Spaltenköpfe für Säuren
|
||||||
|
}
|
||||||
|
printf("\n");
|
||||||
|
// Tabelle ausgeben
|
||||||
|
for (int l = 0; l < ANZ_LAUGEN; l++) {
|
||||||
|
printf("%-14s |", laugen_namen[l]); // Zeilenköpfe für Laugen
|
||||||
|
for (int s = 0; s < ANZ_SAEUREN; s++) {
|
||||||
|
printf(" %-16s |", produkte[l][s]); // Reaktionsprodukte
|
||||||
|
}
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -0,0 +1,193 @@
|
|||||||
|
/**********************************************************************\
|
||||||
|
* Kurzbeschreibung: automat.c
|
||||||
|
* Stellt Funktionen zur Realisierung eines Automaten zur Verf�gung,
|
||||||
|
* die �ber die in der automat.h vorgegebene C-Schnittstelle
|
||||||
|
* mit einer grafischen Schnittstelle kommunizieren.
|
||||||
|
*
|
||||||
|
* Datum: Autor: Grund der Aenderung:
|
||||||
|
*
|
||||||
|
*
|
||||||
|
\**********************************************************************/
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "automat.h"
|
||||||
|
|
||||||
|
typedef enum {A=0,B,C,D,E,F,G,H,I} state_t;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
|
||||||
|
int input;
|
||||||
|
|
||||||
|
int mask;
|
||||||
|
|
||||||
|
state_t nxtstate;
|
||||||
|
|
||||||
|
} fsm_state_t;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
|
||||||
|
const fsm_state_t * transitions;
|
||||||
|
|
||||||
|
int nrOfTransitions;
|
||||||
|
|
||||||
|
state_t defaultNxtState;
|
||||||
|
|
||||||
|
} fsm_full_state_t;
|
||||||
|
|
||||||
|
#define SIZE_OF(a) (sizeof((a))/ sizeof(*(a)))
|
||||||
|
|
||||||
|
#define NR_OF_STATES (I-A + 1)
|
||||||
|
|
||||||
|
static state_t s_curstate = A;
|
||||||
|
|
||||||
|
static const fsm_state_t s_transitions_A[] = {
|
||||||
|
|
||||||
|
{0x002, ~0x004, B},
|
||||||
|
|
||||||
|
{0x003, ~0x004, C}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
static const fsm_state_t s_transitions_B[] = {
|
||||||
|
|
||||||
|
{0x002, ~0x004, C},
|
||||||
|
|
||||||
|
{0x003, ~0x004, D}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
static const fsm_state_t s_transitions_C[] = {
|
||||||
|
|
||||||
|
{0x002, ~0x004, D},
|
||||||
|
|
||||||
|
{0x003, ~0x000, F},
|
||||||
|
|
||||||
|
{0x007, ~0x000, H}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
static const fsm_state_t s_transitions_D[] = {
|
||||||
|
|
||||||
|
{0x002, ~0x000, F},
|
||||||
|
|
||||||
|
{0x003, ~0x004, E},
|
||||||
|
|
||||||
|
{0x006, ~0x000, H}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
static const fsm_state_t s_transitions_E[] = {
|
||||||
|
|
||||||
|
{0x006, ~0x000, H},
|
||||||
|
|
||||||
|
{0x002, ~0x004, F},
|
||||||
|
|
||||||
|
{0x003, ~0x004, G}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
static const fsm_state_t s_transitions_F[] = {
|
||||||
|
|
||||||
|
{0x006, ~0x000, H}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
static const fsm_state_t s_transitions_G[] = {
|
||||||
|
|
||||||
|
{0x006, ~0x000, I}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
static const fsm_state_t s_transitions_H[] = {
|
||||||
|
|
||||||
|
{0x000, ~0x000, A}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
static const fsm_state_t s_transitions_I[] = {
|
||||||
|
|
||||||
|
{0x000, ~0x000, A}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
static const fsm_full_state_t s_state_table[NR_OF_STATES] = {
|
||||||
|
|
||||||
|
{ s_transitions_A, SIZE_OF(s_transitions_A), A },
|
||||||
|
|
||||||
|
{ s_transitions_B, SIZE_OF(s_transitions_B), B },
|
||||||
|
|
||||||
|
{ s_transitions_C, SIZE_OF(s_transitions_C), C },
|
||||||
|
|
||||||
|
{ s_transitions_D, SIZE_OF(s_transitions_D), D },
|
||||||
|
|
||||||
|
{ s_transitions_E, SIZE_OF(s_transitions_E), E },
|
||||||
|
|
||||||
|
{ s_transitions_F, SIZE_OF(s_transitions_F), F },
|
||||||
|
|
||||||
|
{ s_transitions_G, SIZE_OF(s_transitions_G), G },
|
||||||
|
|
||||||
|
{ s_transitions_H, SIZE_OF(s_transitions_H), H },
|
||||||
|
|
||||||
|
{ s_transitions_I, SIZE_OF(s_transitions_I), I }
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
static const fsm_action_t s_out_table[NR_OF_STATES] = {
|
||||||
|
|
||||||
|
{ false, false, false, 0, "Warten" }, // A
|
||||||
|
|
||||||
|
{ false, false, false, 1, "1 Euro" }, // B
|
||||||
|
|
||||||
|
{ false, false, false, 2, "2 Euro" }, // C
|
||||||
|
|
||||||
|
{ false, false, false, 3, "3 Euro" }, // D
|
||||||
|
|
||||||
|
{ true, false, false, 3, "3 Euro + M" }, // E
|
||||||
|
|
||||||
|
{ true, false, false, 4, "4 Euro" }, // F
|
||||||
|
|
||||||
|
{ true, true, false, 4, "4 Euro + M" }, // G
|
||||||
|
|
||||||
|
{ true, false, true, 4, "Kaffee" }, // H
|
||||||
|
|
||||||
|
{ false, false, false, 0, "Kaffee + M" } // I
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
void automat_reset(void) {
|
||||||
|
|
||||||
|
s_curstate = A;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void automat_transition(BOOL becher, BOOL muenze, BOOL muenz_wert) {
|
||||||
|
|
||||||
|
int input = ((becher & 0x1) << 2) | ((muenze & 0x1) << 1) | (muenz_wert & 0x1);
|
||||||
|
|
||||||
|
const fsm_full_state_t *current = &s_state_table[s_curstate];
|
||||||
|
|
||||||
|
for (int i = 0; i < current->nrOfTransitions; ++i) {
|
||||||
|
|
||||||
|
if ((input & ~current->transitions[i].mask) == (current->transitions[i].input & ~current->transitions[i].mask)) {
|
||||||
|
|
||||||
|
s_curstate = current->transitions[i].nxtstate;
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
s_curstate = current->defaultNxtState;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
fsm_action_t automat_output(void) {
|
||||||
|
|
||||||
|
return s_out_table[s_curstate];
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
/**********************************************************************\
|
||||||
|
* Kurzbeschreibung: automat.h
|
||||||
|
* Stellt Funktionen zur Realisierung eines Automaten zur Verfügung,
|
||||||
|
* die über die in der automat.h vorgegebene C-Schnittstelle
|
||||||
|
* mit einer grafischen Schnittstelle kommunizieren.
|
||||||
|
*
|
||||||
|
* Datum: Autor: Grund der Aenderung:
|
||||||
|
*
|
||||||
|
*
|
||||||
|
\**********************************************************************/
|
||||||
|
#ifndef AUTOMAT_H
|
||||||
|
#define AUTOMAT_H
|
||||||
|
#define true 1
|
||||||
|
#define false 0
|
||||||
|
typedef int BOOL;
|
||||||
|
typedef struct {
|
||||||
|
BOOL display;
|
||||||
|
BOOL muenz_rueck;
|
||||||
|
BOOL kaffee_los;
|
||||||
|
int guthaben;
|
||||||
|
const char * display_string;
|
||||||
|
} fsm_action_t;
|
||||||
|
extern void automat_reset(void);
|
||||||
|
extern void automat_transition(BOOL becher, BOOL muenze, BOOL muenz_wert);
|
||||||
|
extern fsm_action_t automat_output(void);
|
||||||
|
#endif /* AUTOMAT_H */
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||||
|
<CodeBlocks_project_file>
|
||||||
|
<FileVersion major="1" minor="6" />
|
||||||
|
<Project>
|
||||||
|
<Option title="kaffee_automat" />
|
||||||
|
<Option pch_mode="2" />
|
||||||
|
<Option compiler="gcc" />
|
||||||
|
<Build>
|
||||||
|
<Target title="Debug">
|
||||||
|
<Option output="bin/Debug/kaffee_automat" prefix_auto="1" extension_auto="1" />
|
||||||
|
<Option object_output="obj/Debug/" />
|
||||||
|
<Option type="1" />
|
||||||
|
<Option compiler="gcc" />
|
||||||
|
<Compiler>
|
||||||
|
<Add option="-g" />
|
||||||
|
</Compiler>
|
||||||
|
</Target>
|
||||||
|
</Build>
|
||||||
|
<Compiler>
|
||||||
|
<Add option="-Wall" />
|
||||||
|
</Compiler>
|
||||||
|
<Linker>
|
||||||
|
<Add option="-Llib -lkaffee_automat" />
|
||||||
|
<Add option="-Lbin/Debug -lQt5Core -lQt5Gui -lQt5Widgets -pthread" />
|
||||||
|
<Add option="-lstdc++-6 -lgcc_s_dw2-1" />
|
||||||
|
</Linker>
|
||||||
|
<Unit filename="automat.c">
|
||||||
|
<Option compilerVar="CC" />
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="automat.h" />
|
||||||
|
<Extensions>
|
||||||
|
<code_completion />
|
||||||
|
<envvars />
|
||||||
|
<debugger />
|
||||||
|
<lib_finder disable_auto="1" />
|
||||||
|
</Extensions>
|
||||||
|
</Project>
|
||||||
|
</CodeBlocks_project_file>
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
# Aufruf linux: make -f makefilename
|
||||||
|
# Aufruf win: mingw32-make -f makefilename
|
||||||
|
# -B: Build all; Alle Ziele ohne Bedingungen erstellen
|
||||||
|
#
|
||||||
|
automat.exe: automat.o checker.o view.o io.o main.o
|
||||||
|
gcc -o automat.exe automat.o checker.o view.o io.o main.o
|
||||||
|
|
||||||
|
automat.o: automat.c automat.h
|
||||||
|
gcc -c -Wall automat.c
|
||||||
|
|
||||||
|
checker.o: checker.c checker.h automat.h s_transaction_list.h
|
||||||
|
gcc -c -Wall checker.c
|
||||||
|
|
||||||
|
view.o: view.c view.h automat.h io.h
|
||||||
|
gcc -c -Wall view.c
|
||||||
|
|
||||||
|
io.o: io.c io.h
|
||||||
|
gcc -c -Wall io.c
|
||||||
|
|
||||||
|
main.o: main.c view.h automat.h checker.h
|
||||||
|
gcc -c -Wall main.c
|
||||||
@@ -0,0 +1,240 @@
|
|||||||
|
/**********************************************************************\
|
||||||
|
* Kurzbeschreibung: automat.c
|
||||||
|
* Stellt Funktionen zur Realisierung eines Automaten zur Verfügung,
|
||||||
|
* die über die in der automat.h vorgegebene C-Schnittstelle
|
||||||
|
* mit einer grafischen Schnittstelle kommunizieren.
|
||||||
|
*
|
||||||
|
* Datum: Autor: Grund der Aenderung:
|
||||||
|
*
|
||||||
|
*
|
||||||
|
\**********************************************************************/
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include "automat.h"
|
||||||
|
|
||||||
|
/*--- #defines -------------------------------------------------------*/
|
||||||
|
/* Macro zur Ermittlung der Array Groesse */
|
||||||
|
#define SIZE_OF(a) (sizeof((a))/ sizeof(*(a)))
|
||||||
|
|
||||||
|
#define NR_OF_STATES (I-A + 1)
|
||||||
|
|
||||||
|
/*--- Datentypen (typedef) -------------------------------------------*/
|
||||||
|
/* Definition der Zustaende */
|
||||||
|
typedef enum {A=0,B,C,D,E,F,G,H,I} state_t;
|
||||||
|
|
||||||
|
/* Definition der fsm-spezifischen Variablen */
|
||||||
|
/* Struktur zur Beschreibung eines Uebergangs mit "Don't Care"-Moeglichkeit */
|
||||||
|
typedef struct {
|
||||||
|
int input;
|
||||||
|
int mask;
|
||||||
|
state_t nxtstate;
|
||||||
|
} fsm_state_t;
|
||||||
|
|
||||||
|
/* Struktur zur Beschreibung aller Uebergaenge eines Zustands */
|
||||||
|
typedef struct {
|
||||||
|
const fsm_state_t * transitions;
|
||||||
|
int nrOfTransitions;
|
||||||
|
state_t defaultNxtState;
|
||||||
|
} fsm_full_state_t;
|
||||||
|
|
||||||
|
/*--- Modulglobale static Variablen ----------------------------------*/
|
||||||
|
/* Definition der Zustandsvariablen */
|
||||||
|
static state_t s_curstate = A; /* Initialisierung */
|
||||||
|
|
||||||
|
/* Definition aller Zustandsuebergaenge fuer jeden Zustand */
|
||||||
|
static const fsm_state_t s_transitions_A[] =
|
||||||
|
{ /* input mask nxtstate */
|
||||||
|
// Wenn 1?-Münze eingeworfen (muenze=1, muenz_wert=0), egal ob Becher steht oder nicht (weil mask ~0x004, also becher-Bit egal)
|
||||||
|
{ 0x002, ~0x004, B }, // A -> B: 1? eingeworfen
|
||||||
|
// Wenn 2?-Münze eingeworfen (muenze=1, muenz_wert=1), egal ob Becher steht oder nicht
|
||||||
|
{ 0x003, ~0x004, C } // A -> C: 2? eingeworfen
|
||||||
|
};
|
||||||
|
|
||||||
|
static const fsm_state_t s_transitions_B[] =
|
||||||
|
{ /* input mask nxtstate */
|
||||||
|
// Nochmal 1? eingeworfen (muenze=1, muenz_wert=0), becher egal
|
||||||
|
{ 0x002, ~0x004, C }, // B -> C: 1? dazu, jetzt 2?
|
||||||
|
// 2? eingeworfen (muenze=1, muenz_wert=1), becher egal
|
||||||
|
{ 0x003, ~0x004, D } // B -> D: 2? dazu, jetzt 3?
|
||||||
|
};
|
||||||
|
|
||||||
|
static const fsm_state_t s_transitions_C[] =
|
||||||
|
{ /* input mask nxtstate */
|
||||||
|
// Nochmal 1? eingeworfen (muenze=1, muenz_wert=0), becher egal
|
||||||
|
{ 0x002, ~0x004, D }, // C -> D: 1? dazu, jetzt 3?
|
||||||
|
// Becher steht (becher=1), egal was mit Münze, weil mask ~0x000 (alle Bits relevant)
|
||||||
|
{ 0x003, ~0x000, F }, // C -> F: Becher untergestellt (becher=1, muenze=1, muenz_wert=1)
|
||||||
|
// Becher steht (becher=1), muenze=1, muenz_wert=1 (also 2?), mask ~0x000
|
||||||
|
{ 0x007, ~0x000, H } // C -> H: Becher steht, 2? eingeworfen
|
||||||
|
};
|
||||||
|
|
||||||
|
static const fsm_state_t s_transitions_D[] =
|
||||||
|
{ /* input mask nxtstate */
|
||||||
|
// Becher steht (becher=1), egal was mit Münze, mask ~0x000
|
||||||
|
{ 0x002, ~0x000, F }, // D -> F: Becher untergestellt
|
||||||
|
// 2? eingeworfen (muenze=1, muenz_wert=1), becher egal
|
||||||
|
{ 0x003, ~0x004, E }, // D -> E: 2? dazu, jetzt 5? (Überzahlung)
|
||||||
|
// Becher steht (becher=1), muenze=1, muenz_wert=0 (1?), mask ~0x000
|
||||||
|
{ 0x006, ~0x000, H } // D -> H: Becher steht, 1? eingeworfen
|
||||||
|
};
|
||||||
|
|
||||||
|
static const fsm_state_t s_transitions_E[] =
|
||||||
|
{
|
||||||
|
// Becher steht (becher=1), egal was mit Münze
|
||||||
|
{ 0x002, ~0x000, F }, // E -> F: Becher untergestellt
|
||||||
|
// 2? eingeworfen, becher egal
|
||||||
|
{ 0x000, ~0x005, D }, // E bleibt E: weitere Überzahlung
|
||||||
|
// Becher steht (becher=1), muenze=1, muenz_wert=0 (1?)
|
||||||
|
{ 0x006, ~0x000, H } // E -> H: Becher steht, 1? eingeworfen
|
||||||
|
};
|
||||||
|
|
||||||
|
static const fsm_state_t s_transitions_F[] =
|
||||||
|
{
|
||||||
|
// Becher steht, 1? eingeworfen (becher=1, muenze=1, muenz_wert=0), mask ~0x001 (muenz_wert egal)
|
||||||
|
{ 0x002, ~0x001, G }, // F -> G: Becher steht, Münze eingeworfen
|
||||||
|
// Becher steht, 2? eingeworfen (becher=1, muenze=0, muenz_wert=1)
|
||||||
|
{ 0x004, ~0x001, H }, // F -> H: Becher steht, 2? eingeworfen
|
||||||
|
// Becher steht, 1? eingeworfen (becher=1, muenze=1, muenz_wert=0)
|
||||||
|
{ 0x006, ~0x001, I } // F -> I: Becher steht, 1? eingeworfen
|
||||||
|
};
|
||||||
|
|
||||||
|
static const fsm_state_t s_transitions_G[] =
|
||||||
|
{
|
||||||
|
// Becher steht, 1? eingeworfen
|
||||||
|
{ 0x000, ~0x001, F }, // G bleibt G: Becher steht, Münze eingeworfen
|
||||||
|
// Becher steht, 2? eingeworfen
|
||||||
|
{ 0x004, ~0x001, H }, // G -> H: Becher steht, 2? eingeworfen
|
||||||
|
// Becher steht, 1? eingeworfen
|
||||||
|
{ 0x006, ~0x001, I } // G -> I: Becher steht, 1? eingeworfen
|
||||||
|
};
|
||||||
|
|
||||||
|
static const fsm_state_t s_transitions_H[] =
|
||||||
|
{
|
||||||
|
// Kein Becher, keine Münze, kein Wert (alles 0)
|
||||||
|
{ 0x000, ~0x001, A }, // H -> A: Reset, alles leer
|
||||||
|
// Becher steht, keine Münze, kein Wert
|
||||||
|
{ 0x002, ~0x000, B }, // H -> B: Becher steht, 1? eingeworfen
|
||||||
|
// Becher steht, 2? eingeworfen
|
||||||
|
{ 0x003, ~0x000, C }, // H -> C: Becher steht, 2? eingeworfen
|
||||||
|
// Becher steht, 1? eingeworfen
|
||||||
|
{ 0x006, ~0x001, I } // H -> I: Becher steht, 1? eingeworfen
|
||||||
|
};
|
||||||
|
|
||||||
|
static const fsm_state_t s_transitions_I[] =
|
||||||
|
{ // Kein Becher, keine Münze, kein Wert (alles 0)
|
||||||
|
{ 0x000, ~0x001, A }, // I -> A: Reset, alles leer
|
||||||
|
// Becher steht, keine Münze, kein Wert
|
||||||
|
{ 0x002, ~0x000, B }, // I -> B: Becher steht, 1? eingeworfen
|
||||||
|
// Becher steht, 2? eingeworfen
|
||||||
|
{ 0x003, ~0x000, C }, // I -> C: Becher steht, 2? eingeworfen
|
||||||
|
// Becher steht, 1? eingeworfen
|
||||||
|
{ 0x004, ~0x001, H} // I bleibt I: Becher steht, 1? eingeworfen
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Definition der Uebergangstabelle */
|
||||||
|
/* Die Reihenfolge der Zustaende in der enum Definition muss der
|
||||||
|
* Reihenfolge der Zustaende in der Uebergangstabelle entsprechen
|
||||||
|
* [Zeile] [Spalte] */
|
||||||
|
static const fsm_full_state_t s_state_table[NR_OF_STATES] =
|
||||||
|
{
|
||||||
|
/* transitions nrOfTransitions defaultNxtState */
|
||||||
|
{ s_transitions_A, SIZE_OF(s_transitions_A), A },
|
||||||
|
{ s_transitions_B, SIZE_OF(s_transitions_B), B },
|
||||||
|
{ s_transitions_C, SIZE_OF(s_transitions_C), C },
|
||||||
|
{ s_transitions_D, SIZE_OF(s_transitions_D), D },
|
||||||
|
|
||||||
|
/* TODO */
|
||||||
|
|
||||||
|
{ s_transitions_E, SIZE_OF(s_transitions_E), E },
|
||||||
|
{ s_transitions_F, SIZE_OF(s_transitions_F), F },
|
||||||
|
{ s_transitions_G, SIZE_OF(s_transitions_G), G },
|
||||||
|
{ s_transitions_H, SIZE_OF(s_transitions_H), H },
|
||||||
|
{ s_transitions_I, SIZE_OF(s_transitions_I), I }
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Definition der Ausgaenge */
|
||||||
|
static const fsm_action_t s_out_table[NR_OF_STATES] =
|
||||||
|
{
|
||||||
|
/* display muenz_rueck kaffee_los guthaben, display_string */
|
||||||
|
{ false, false, false, 0, "Warten" }, /* state A */
|
||||||
|
{ false, false, false, 1, "1 Euro" }, /* state B */
|
||||||
|
{ false, false, false, 2, "2 Euro" }, /* state C */
|
||||||
|
{ false, false, false, 3, "3 Euro" }, /* state D */
|
||||||
|
|
||||||
|
/* TODO */
|
||||||
|
|
||||||
|
{ false, true, false, 3, "3 Euro + M" }, /* state E */
|
||||||
|
{ true, false, false, 4, "4 Euro" }, /* state F */
|
||||||
|
{ true, true, false, 4, "4 Euro + M" }, /* state G */
|
||||||
|
{ true, false, true, 0, "Kaffe kommt" }, /* state H */
|
||||||
|
{ true, true, true, 0, "Kaffe + M" } /* state I */
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
/*--- Funktionsdefinition --------------------------------------------*/
|
||||||
|
void automat_reset(void)
|
||||||
|
{
|
||||||
|
printf("---- automat_reset ----\n");
|
||||||
|
|
||||||
|
/* TODO go into IDLE state */
|
||||||
|
|
||||||
|
s_curstate = A;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*--- Funktionsdefinition --------------------------------------------*/
|
||||||
|
void automat_transition(BOOL becher, BOOL muenze, BOOL muenz_wert)
|
||||||
|
{
|
||||||
|
// Ausgabe der aktuellen Eingabewerte zur Fehlersuche
|
||||||
|
printf("---- automat_transition becher(%0d) muenze(%0d) muenz_wert(%0d) ----\n",
|
||||||
|
becher, muenze, muenz_wert);
|
||||||
|
|
||||||
|
// Kombiniere die Eingabewerte zu einem einzigen Integer mittels Bitoperationen.
|
||||||
|
// Die Eingaben werden wie folgt kombiniert:
|
||||||
|
// - 'becher' wird um 2 Bits nach links verschoben (belegt die dritte Bitposition)
|
||||||
|
// - 'muenze' wird um 1 Bit nach links verschoben (belegt die zweite Bitposition)
|
||||||
|
// - 'muenz_wert' bleibt in der ersten Bitposition
|
||||||
|
// Dies ergibt einen 3-Bit-Integer, der den aktuellen Eingabestatus darstellt.
|
||||||
|
int in = (becher << 2) | (muenze << 1) | (muenz_wert << 0);
|
||||||
|
|
||||||
|
// Hole die Übergangsinformationen des aktuellen Zustands aus der Zustandstabelle.
|
||||||
|
// 's_curstate' enthält den aktuellen Zustand, und 's_state_table' liefert die
|
||||||
|
// Übergangsdetails für jeden Zustand.
|
||||||
|
const fsm_full_state_t * full_transition = &s_state_table[s_curstate];
|
||||||
|
|
||||||
|
// Hole das Array der Übergänge für den aktuellen Zustand.
|
||||||
|
// Jeder Übergang spezifiziert eine Eingabebedingung, eine Maske und einen Folgezustand.
|
||||||
|
const fsm_state_t * transition = full_transition->transitions;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
// Iteriere über alle definierten Übergänge für den aktuellen Zustand.
|
||||||
|
for(i = 0; i < full_transition->nrOfTransitions; i++)
|
||||||
|
{
|
||||||
|
// Überprüfe, ob die aktuelle Eingabe die Übergangsbedingung erfüllt.
|
||||||
|
// Die Bedingung ist erfüllt, wenn die Eingabe, maskiert durch die Übergangsmaske,
|
||||||
|
// dem spezifizierten Eingabewert des Übergangs entspricht.
|
||||||
|
if(transition[i].input == (in & transition[i].mask))
|
||||||
|
{
|
||||||
|
// Wenn ein passender Übergang gefunden wird, aktualisiere den aktuellen Zustand
|
||||||
|
// auf den im Übergang spezifizierten Folgezustand.
|
||||||
|
s_curstate = transition[i].nxtstate;
|
||||||
|
// Beende die Schleife, da der Übergang erfolgreich angewendet wurde.
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wenn nach Überprüfung aller Übergänge kein passender Übergang gefunden wurde,
|
||||||
|
// setze den aktuellen Zustand auf den Standard-Folgezustand für den aktuellen Zustand.
|
||||||
|
// Dies behandelt Fälle, in denen die Eingabe keinem spezifischen Übergang entspricht.
|
||||||
|
if(i == full_transition->nrOfTransitions)
|
||||||
|
{
|
||||||
|
s_curstate = full_transition->defaultNxtState;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*--- Funktionsdefinition --------------------------------------------*/
|
||||||
|
fsm_action_t automat_output(void)
|
||||||
|
{
|
||||||
|
return s_out_table[s_curstate];
|
||||||
|
}
|
||||||
|
|
||||||
|
//gcc automat.c view.c main.c io.c checker.c -o console_automat
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
/**********************************************************************\
|
||||||
|
* Kurzbeschreibung: automat.h
|
||||||
|
* Stellt Funktionen zur Realisierung eines Automaten zur Verfügung,
|
||||||
|
* die über die in der automat.h vorgegebene C-Schnittstelle
|
||||||
|
* mit einer grafischen Schnittstelle kommunizieren.
|
||||||
|
*
|
||||||
|
* Datum: Autor: Grund der Aenderung:
|
||||||
|
*
|
||||||
|
*
|
||||||
|
\**********************************************************************/
|
||||||
|
#ifndef AUTOMAT_H
|
||||||
|
#define AUTOMAT_H
|
||||||
|
|
||||||
|
/*--- #defines -------------------------------------------------------*/
|
||||||
|
#define true 1
|
||||||
|
#define false 0
|
||||||
|
/*--- Datentypen (typedef) -------------------------------------------*/
|
||||||
|
typedef int BOOL;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
BOOL display;
|
||||||
|
BOOL muenz_rueck;
|
||||||
|
BOOL kaffee_los;
|
||||||
|
int guthaben;
|
||||||
|
const char * display_string;
|
||||||
|
} fsm_action_t;
|
||||||
|
|
||||||
|
/*--- Prototypen globaler Funktionen ---------------------------------*/
|
||||||
|
/*--------------------------------------------------------------------*
|
||||||
|
* Setzt den Automat in IDLE state *
|
||||||
|
*--------------------------------------------------------------------*/
|
||||||
|
extern void automat_reset(void);
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------*
|
||||||
|
* Fuehrt Zustandsuebergaenge durch *
|
||||||
|
*--------------------------------------------------------------------*/
|
||||||
|
extern void automat_transition(BOOL becher, BOOL muenze, BOOL muenz_wert);
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------*
|
||||||
|
* Gibt Informationen ueber aktuellen Zustand zurueck *
|
||||||
|
*--------------------------------------------------------------------*/
|
||||||
|
extern fsm_action_t automat_output(void);
|
||||||
|
|
||||||
|
#endif /* AUTOMAT_H */
|
||||||
@@ -0,0 +1,123 @@
|
|||||||
|
#include "checker.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
BOOL reset;
|
||||||
|
BOOL muenz_wert;
|
||||||
|
BOOL muenze;
|
||||||
|
BOOL becher;
|
||||||
|
} fsm_input_t;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
fsm_input_t input;
|
||||||
|
fsm_action_t output;
|
||||||
|
} fsm_transaction_t;
|
||||||
|
|
||||||
|
#include "s_transaction_list.h"
|
||||||
|
|
||||||
|
static const int s_transaction_list_size =
|
||||||
|
sizeof(s_transaction_list) / sizeof(*s_transaction_list);
|
||||||
|
|
||||||
|
#define ERROR_STRING_SIZE 1000
|
||||||
|
static char s_error_string[ERROR_STRING_SIZE] = { 0 };
|
||||||
|
|
||||||
|
static void checker_propagate_input(fsm_input_t input);
|
||||||
|
static BOOL checker_compare(fsm_action_t o1, fsm_action_t o2);
|
||||||
|
static void checker_write_error_string(
|
||||||
|
fsm_action_t current, fsm_input_t input,
|
||||||
|
fsm_action_t actual, fsm_action_t expected);
|
||||||
|
static void checker_clear_error_string(void);
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* implementation of extern functions ****************************************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
BOOL checker_check()
|
||||||
|
{
|
||||||
|
fsm_action_t last_out;
|
||||||
|
fsm_action_t new_out;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
automat_reset();
|
||||||
|
|
||||||
|
for (i = 0; i < s_transaction_list_size; i++) {
|
||||||
|
|
||||||
|
last_out = automat_output();
|
||||||
|
|
||||||
|
checker_propagate_input(s_transaction_list[i].input);
|
||||||
|
|
||||||
|
new_out = automat_output();
|
||||||
|
|
||||||
|
if (!checker_compare(new_out, s_transaction_list[i].output)) {
|
||||||
|
checker_write_error_string(last_out, s_transaction_list[i].input,
|
||||||
|
new_out, s_transaction_list[i].output);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
checker_clear_error_string();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char * checker_error_string() { return s_error_string; }
|
||||||
|
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* implementation of static functions ****************************************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void checker_propagate_input(fsm_input_t input)
|
||||||
|
{
|
||||||
|
if (input.reset) automat_reset();
|
||||||
|
else automat_transition(input.becher, input.muenze, input.muenz_wert);
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL checker_compare(fsm_action_t o1, fsm_action_t o2)
|
||||||
|
{
|
||||||
|
return o1.display == o2.display &&
|
||||||
|
o1.muenz_rueck == o2.muenz_rueck &&
|
||||||
|
o1.kaffee_los == o2.kaffee_los &&
|
||||||
|
o1.guthaben == o2.guthaben;
|
||||||
|
}
|
||||||
|
|
||||||
|
void checker_write_error_string(
|
||||||
|
fsm_action_t current, fsm_input_t input,
|
||||||
|
fsm_action_t actual, fsm_action_t expected)
|
||||||
|
{
|
||||||
|
if (input.reset) {
|
||||||
|
/* actually wanna use snprintf, but it's defined in c99 */
|
||||||
|
sprintf(s_error_string,
|
||||||
|
"Ausgangsvektor enthält nicht die erwarteten Werte:\n"
|
||||||
|
"Letzter Zustand: disp:%d rueck:%d los:%d guthaben:%d \"%s\"\n"
|
||||||
|
"Eingang: Reset\n"
|
||||||
|
"Ausgang: disp:%d rueck:%d los:%d guthaben:%d \"%s\"\n"
|
||||||
|
"Erwartet: disp:%d rueck:%d los:%d guthaben:%d",
|
||||||
|
current.display, current.muenz_rueck, current.kaffee_los,
|
||||||
|
current.guthaben, current.display_string,
|
||||||
|
actual.display, actual.muenz_rueck, actual.kaffee_los,
|
||||||
|
actual.guthaben, actual.display_string,
|
||||||
|
expected.display, expected.muenz_rueck, expected.kaffee_los,
|
||||||
|
expected.guthaben);
|
||||||
|
} else {
|
||||||
|
/* actually wanna use snprintf, but it's defined in c99 */
|
||||||
|
sprintf(s_error_string,
|
||||||
|
"Ausgangsvektor enthält nicht die erwarteten Werte:\n"
|
||||||
|
"Letzter Zustand: disp:%d rueck:%d los:%d guthaben:%d \"%s\"\n"
|
||||||
|
"Eingang: becher:%d muenze:%d muenz_wert:%d\n"
|
||||||
|
"Ausgang: disp:%d rueck:%d los:%d guthaben:%d \"%s\"\n"
|
||||||
|
"Erwartet: disp:%d rueck:%d los:%d guthaben:%d",
|
||||||
|
current.display, current.muenz_rueck, current.kaffee_los,
|
||||||
|
current.guthaben, current.display_string,
|
||||||
|
input.becher, input.muenze, input.muenz_wert,
|
||||||
|
actual.display, actual.muenz_rueck, actual.kaffee_los,
|
||||||
|
actual.guthaben, actual.display_string,
|
||||||
|
expected.display, expected.muenz_rueck, expected.kaffee_los,
|
||||||
|
expected.guthaben);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void checker_clear_error_string()
|
||||||
|
{
|
||||||
|
s_error_string[0] = '\0';
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
#ifndef __CHECKER_H__
|
||||||
|
#define __CHECKER_H__
|
||||||
|
|
||||||
|
#include "automat.h"
|
||||||
|
|
||||||
|
extern BOOL checker_check(void);
|
||||||
|
extern const char * checker_error_string(void);
|
||||||
|
|
||||||
|
#endif /* __CHECKER_H__ */
|
||||||
+80
@@ -0,0 +1,80 @@
|
|||||||
|
#include "io.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/* Module intern macros *******************************************************/
|
||||||
|
/******************************************************************************/
|
||||||
|
/* unfortunatly can't write this code as function, because of stack management
|
||||||
|
* => use makro instead */
|
||||||
|
#define DO_PRINTING(output_str) \
|
||||||
|
do { \
|
||||||
|
if (output_str != NULL) { \
|
||||||
|
va_list args; \
|
||||||
|
va_start(args, output_str); \
|
||||||
|
vprintf(output_str, args); \
|
||||||
|
va_end(args); \
|
||||||
|
} \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/* Implementations ************************************************************/
|
||||||
|
/******************************************************************************/
|
||||||
|
char * io_read_string(char * read_buffer, size_t buffer_size,
|
||||||
|
const char * output_str, ...)
|
||||||
|
{
|
||||||
|
char * ret, * ptr;
|
||||||
|
|
||||||
|
DO_PRINTING(output_str);
|
||||||
|
ret = fgets(read_buffer, buffer_size, stdin);
|
||||||
|
if (ret == NULL) return NULL;
|
||||||
|
|
||||||
|
/* search for \n */
|
||||||
|
ptr = strchr(read_buffer, '\n');
|
||||||
|
/* if found write \0 instead of \n */
|
||||||
|
if (ptr) *ptr = '\0';
|
||||||
|
/* else buffer is not read completly => clear buffer */
|
||||||
|
else while (getchar() != '\n');
|
||||||
|
|
||||||
|
return read_buffer;
|
||||||
|
}
|
||||||
|
|
||||||
|
int io_read_signed_number(const char * output_str, ...)
|
||||||
|
{
|
||||||
|
int number;
|
||||||
|
|
||||||
|
while (1) {
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
DO_PRINTING(output_str);
|
||||||
|
|
||||||
|
ret = scanf("%d", &number);
|
||||||
|
/* clear buffer */
|
||||||
|
while (getchar() != '\n');
|
||||||
|
|
||||||
|
if (ret == 1) break;
|
||||||
|
else printf("Eingabefehler!!!\n");
|
||||||
|
}
|
||||||
|
return number;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int io_read_unsigned_number(const char * output_str, ...)
|
||||||
|
{
|
||||||
|
unsigned int number;
|
||||||
|
|
||||||
|
while (1) {
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
DO_PRINTING(output_str);
|
||||||
|
|
||||||
|
ret = scanf("%u", &number);
|
||||||
|
/* clear buffer */
|
||||||
|
while (getchar() != '\n');
|
||||||
|
|
||||||
|
if (ret == 1) break;
|
||||||
|
else printf("Eingabefehler!!!\n");
|
||||||
|
}
|
||||||
|
return number;
|
||||||
|
}
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#ifndef __IO_H__
|
||||||
|
#define __IO_H__
|
||||||
|
|
||||||
|
#include <stddef.h> /* for size_t */
|
||||||
|
|
||||||
|
/* prints the given string (if not NULL) and reads a string from stdin and
|
||||||
|
* removes \n
|
||||||
|
* the functions returns the value of fgets */
|
||||||
|
extern char * io_read_string(char * read_buffer, size_t buffer_size,
|
||||||
|
const char * output_str, ...);
|
||||||
|
|
||||||
|
/* prints the given string (if not NULL) and reads signed number from stdin */
|
||||||
|
extern int io_read_signed_number(const char * output_str, ...);
|
||||||
|
|
||||||
|
/* prints the given string (if not NULL) and reads unsigned number from stdin */
|
||||||
|
extern unsigned int io_read_unsigned_number(const char * output_str, ...);
|
||||||
|
|
||||||
|
#endif /* __IO_H__ */
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include "view.h"
|
||||||
|
#include "automat.h"
|
||||||
|
#include "checker.h"
|
||||||
|
|
||||||
|
void insert_1_euro(void)
|
||||||
|
{
|
||||||
|
view_set_coin(1);
|
||||||
|
automat_transition(view_has_cup(), true, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void insert_2_euro(void)
|
||||||
|
{
|
||||||
|
view_set_coin(2);
|
||||||
|
automat_transition(view_has_cup(), true, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void toggle_cup(void)
|
||||||
|
{
|
||||||
|
view_set_coin(0);
|
||||||
|
view_toggle_cup();
|
||||||
|
automat_transition(view_has_cup(), false, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void check(void)
|
||||||
|
{
|
||||||
|
printf("\n");
|
||||||
|
|
||||||
|
if (checker_check()) {
|
||||||
|
|
||||||
|
printf("Der Zustandsautomat ist correct\n");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
printf("%s\n", checker_error_string());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("\nWeiter mit Return ...");
|
||||||
|
while (getchar() != '\n');
|
||||||
|
|
||||||
|
automat_reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
int finished = 0;
|
||||||
|
|
||||||
|
automat_reset();
|
||||||
|
view_reset();
|
||||||
|
|
||||||
|
while (!finished) {
|
||||||
|
view_menu_t selection;
|
||||||
|
|
||||||
|
view_show(automat_output());
|
||||||
|
selection = view_menu();
|
||||||
|
|
||||||
|
switch (selection) {
|
||||||
|
case VIEW_1_EURO: insert_1_euro(); break;
|
||||||
|
case VIEW_2_EURO: insert_2_euro(); break;
|
||||||
|
case VIEW_CUP: toggle_cup(); break;
|
||||||
|
case VIEW_RESET: automat_reset(); view_reset(); break;
|
||||||
|
case VIEW_CHECK: check(); break;
|
||||||
|
case VIEW_EXIT: finished = 1; break;
|
||||||
|
case VIEW_INVALID: break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
+100002
File diff suppressed because it is too large.
Load diff
+115
@@ -0,0 +1,115 @@
|
|||||||
|
#include "view.h"
|
||||||
|
#include "io.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#define S_MACHINE_HEAD \
|
||||||
|
" /-----------------------------------\\\n" \
|
||||||
|
" | %33s |\n" \
|
||||||
|
" \\-----------------------------------/\n" \
|
||||||
|
" \n" \
|
||||||
|
" /~~~~~~~~~~~/| \n" \
|
||||||
|
" / /#########/ / |\n" \
|
||||||
|
" / /_________/ / |\n" \
|
||||||
|
" =============== /||\n" \
|
||||||
|
" | %03d EUR |/ ||\n" \
|
||||||
|
" |_____________|/ ||\n" \
|
||||||
|
" | \\___..___/ ||\n" \
|
||||||
|
" | || ||\n"
|
||||||
|
|
||||||
|
|
||||||
|
#define S_MACHINE_NO_COFFEE \
|
||||||
|
" | ||\n" \
|
||||||
|
" | ||\n" \
|
||||||
|
" | ||\n"
|
||||||
|
|
||||||
|
#define S_MACHINE_COFFEE \
|
||||||
|
" | ) ( ||\n" \
|
||||||
|
" | ( ) ) ||\n" \
|
||||||
|
" | ) ( ( ||\n" \
|
||||||
|
|
||||||
|
#define S_MACHINE_NO_CUP \
|
||||||
|
" _________ | ||\n" \
|
||||||
|
" .-'---------| |_______________||\n" \
|
||||||
|
" ( C|/\\/\\/\\/\\/| | / |\n" \
|
||||||
|
" '-./\\/\\/\\/\\/| _|_ _ _ _ _ _ _/ |\n" \
|
||||||
|
" '_________' | | / \n" \
|
||||||
|
" '-------' |_______________|/ \n" \
|
||||||
|
" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \n"
|
||||||
|
|
||||||
|
#define S_MACHINE_CUP \
|
||||||
|
" | _________ ||\n" \
|
||||||
|
" .-'---------|___||\n" \
|
||||||
|
" ( C|/\\/\\/\\/\\/| / |\n" \
|
||||||
|
" _'-./\\/\\/\\/\\/|_/ |\n" \
|
||||||
|
" | '_________' | / \n" \
|
||||||
|
" |____'-------'__|/ \n" \
|
||||||
|
" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \n"
|
||||||
|
|
||||||
|
#define S_MACHINE_NO_COIN_RETURN "\n"
|
||||||
|
|
||||||
|
#define S_MACHINE_INVALID_COIN_RETURN \
|
||||||
|
" -> keine Muenze verfuegbar !!!\n"
|
||||||
|
|
||||||
|
#define S_MACHINE_COIN_RETURN \
|
||||||
|
" -> %0d Euro zurueck\n"
|
||||||
|
|
||||||
|
|
||||||
|
/* machine status variables */
|
||||||
|
static int s_has_cup = 0;
|
||||||
|
static int s_coin_value = 0;
|
||||||
|
|
||||||
|
/* function implementations */
|
||||||
|
void view_show(fsm_action_t out_vector)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < 100; i++) printf("\n");
|
||||||
|
|
||||||
|
printf(S_MACHINE_HEAD, out_vector.display_string, out_vector.guthaben);
|
||||||
|
|
||||||
|
if (out_vector.kaffee_los) printf(S_MACHINE_COFFEE);
|
||||||
|
else printf(S_MACHINE_NO_COFFEE);
|
||||||
|
|
||||||
|
if (s_has_cup) printf(S_MACHINE_CUP);
|
||||||
|
else printf(S_MACHINE_NO_CUP);
|
||||||
|
|
||||||
|
if (out_vector.muenz_rueck) {
|
||||||
|
if (s_coin_value) printf(S_MACHINE_COIN_RETURN, s_coin_value);
|
||||||
|
else printf(S_MACHINE_INVALID_COIN_RETURN);
|
||||||
|
} else {
|
||||||
|
printf(S_MACHINE_NO_COIN_RETURN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
view_menu_t view_menu()
|
||||||
|
{
|
||||||
|
int read = io_read_signed_number(
|
||||||
|
"\n"
|
||||||
|
" 0) Einwurf 1 Euro\n"
|
||||||
|
" 1) Einwurf 2 Euro\n"
|
||||||
|
" 2) Becher verstellen\n"
|
||||||
|
" 3) Reset\n"
|
||||||
|
" 4) Automatischer Testlauf\n"
|
||||||
|
" 5) Programm beenden\n"
|
||||||
|
"\n"
|
||||||
|
" Auswahl: ");
|
||||||
|
|
||||||
|
switch (read) {
|
||||||
|
case 0: return VIEW_1_EURO;
|
||||||
|
case 1: return VIEW_2_EURO;
|
||||||
|
case 2: return VIEW_CUP;
|
||||||
|
case 3: return VIEW_RESET;
|
||||||
|
case 4: return VIEW_CHECK;
|
||||||
|
case 5: return VIEW_EXIT;
|
||||||
|
default: return VIEW_INVALID;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void view_toggle_cup() { s_has_cup = s_has_cup ? 0 : 1; }
|
||||||
|
int view_has_cup() { return s_has_cup; }
|
||||||
|
void view_set_coin(int value) { s_coin_value = value; }
|
||||||
|
|
||||||
|
void view_reset()
|
||||||
|
{
|
||||||
|
s_has_cup = 0;
|
||||||
|
s_coin_value = 0;
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "automat.h"
|
||||||
|
|
||||||
|
typedef enum { VIEW_1_EURO, VIEW_2_EURO, VIEW_CUP, VIEW_RESET, VIEW_CHECK, VIEW_EXIT, VIEW_INVALID } view_menu_t;
|
||||||
|
|
||||||
|
extern void view_show(fsm_action_t out_vector);
|
||||||
|
|
||||||
|
extern view_menu_t view_menu(void);
|
||||||
|
|
||||||
|
extern void view_toggle_cup(void);
|
||||||
|
extern int view_has_cup(void);
|
||||||
|
|
||||||
|
extern void view_set_coin(int value);
|
||||||
|
|
||||||
|
extern void view_reset(void);
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include "complex.h"
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
double re1, im1, re2, im2;
|
||||||
|
|
||||||
|
// Eingabe der ersten komplexen Zahl
|
||||||
|
printf("1. Zahl eingeben\nRealteil: ");
|
||||||
|
scanf("%lf", &re1);
|
||||||
|
printf("Imaginärteil: ");
|
||||||
|
scanf("%lf", &im1);
|
||||||
|
|
||||||
|
// Eingabe der zweiten komplexen Zahl
|
||||||
|
printf("2. Zahl eingeben\nRealteil: ");
|
||||||
|
scanf("%lf", &re2);
|
||||||
|
printf("Imaginärteil: ");
|
||||||
|
scanf("%lf", &im2);
|
||||||
|
|
||||||
|
// Erzeugen der komplexen Zahlen als Zeiger auf Complex-Strukturen
|
||||||
|
Complex *x = createComplex(re1, im1);
|
||||||
|
Complex *y = createComplex(re2, im2);
|
||||||
|
|
||||||
|
// Berechnung der Summe, Differenz, Produkt und Quotient
|
||||||
|
Complex *sum = addComplex(x, y);
|
||||||
|
Complex *diff = subtractComplex(x, y);
|
||||||
|
Complex *prod = multiplyComplex(x, y);
|
||||||
|
Complex *quot = divideComplex(x, y);
|
||||||
|
|
||||||
|
// Ausgabe der Ergebnisse
|
||||||
|
printf("x = ");
|
||||||
|
printComplex(x);
|
||||||
|
printf("y = ");
|
||||||
|
printComplex(y);
|
||||||
|
printf("Summe: x + y = ");
|
||||||
|
printComplex(sum);
|
||||||
|
printf("Differenz: x - y = ");
|
||||||
|
printComplex(diff);
|
||||||
|
printf("Produkt: x * y = ");
|
||||||
|
printComplex(prod);
|
||||||
|
printf("Quotient: x / y = ");
|
||||||
|
printComplex(quot);
|
||||||
|
|
||||||
|
// Speicher wieder freigeben
|
||||||
|
freeComplex(x);
|
||||||
|
freeComplex(y);
|
||||||
|
freeComplex(sum);
|
||||||
|
freeComplex(diff);
|
||||||
|
freeComplex(prod);
|
||||||
|
freeComplex(quot);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Kompilieren mit:
|
||||||
|
// gcc TestComplex.c -L. -lcomplex -o TestComplex
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include "matrixOp.h"
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
// Erstellt zwei 2x3-Matrizen mit aufsteigenden Werten
|
||||||
|
Matrix *a = CreateMatrix(2, 3, 1.0); // 1.0, 2.0, 3.0, 4.0, 5.0, 6.0
|
||||||
|
Matrix *b = CreateMatrix(2, 3, 7.0); // 7.0, 8.0, 9.0, 10.0, 11.0, 12.0
|
||||||
|
|
||||||
|
Matrix *c, *d, *e, *f;
|
||||||
|
|
||||||
|
printf("Matrix a:\n");
|
||||||
|
PrintMatrix(a);
|
||||||
|
|
||||||
|
printf("Matrix b:\n");
|
||||||
|
PrintMatrix(b);
|
||||||
|
|
||||||
|
// Addition: a + b
|
||||||
|
c = AddMatrix(a, b);
|
||||||
|
printf("a + b:\n");
|
||||||
|
PrintMatrix(c);
|
||||||
|
|
||||||
|
// Subtraktion: a - b
|
||||||
|
d = SubMatrix(a, b);
|
||||||
|
printf("a - b:\n");
|
||||||
|
PrintMatrix(d);
|
||||||
|
|
||||||
|
// Transponieren von a
|
||||||
|
e = TransposeMatrix(a);
|
||||||
|
printf("Transpose of a:\n");
|
||||||
|
PrintMatrix(e);
|
||||||
|
|
||||||
|
// Matrixmultiplikation: a * a^T
|
||||||
|
f = MulMatrix(a, e);
|
||||||
|
printf("a * a^T:\n");
|
||||||
|
PrintMatrix(f);
|
||||||
|
|
||||||
|
// Determinante der Ergebnismatrix (nur für 2x2 möglich)
|
||||||
|
printf("det(a * a^T): %.2f\n", DetMatrix(f));
|
||||||
|
|
||||||
|
// Speicher wieder freigeben
|
||||||
|
FreeMatrix(a);
|
||||||
|
FreeMatrix(b);
|
||||||
|
FreeMatrix(c);
|
||||||
|
FreeMatrix(d);
|
||||||
|
FreeMatrix(e);
|
||||||
|
FreeMatrix(f);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
//gcc TestMatricOp.c -L. -lmatrixOp -o TestMatricOp
|
||||||
+50
@@ -0,0 +1,50 @@
|
|||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
// Addiert 1 zu einer Dualzahl (als String) und speichert das Ergebnis in output
|
||||||
|
// input: Dualzahl als String, z.B. "1011"
|
||||||
|
// output: Ergebnis als String, z.B. "1100"
|
||||||
|
// maxlen: Maximale Länge des output-Arrays (inklusive '\0')
|
||||||
|
void dual_addiere_eins(const char *input, char *output, int maxlen) {
|
||||||
|
int len = strlen(input); // Länge der Eingabe bestimmen
|
||||||
|
int carry = 1; // Übertrag: Wir addieren 1, daher am Anfang 1
|
||||||
|
int i, pos = 0; // i: läuft durch input, pos: Position im temp-Array
|
||||||
|
|
||||||
|
char temp[maxlen]; // Temporäres Array für das Ergebnis (rückwärts)
|
||||||
|
// maxlen reicht, da Ergebnis maximal 1 Stelle länger als input sein kann
|
||||||
|
|
||||||
|
// Von hinten (letztes Zeichen) nach vorne durchgehen
|
||||||
|
for (i = len - 1; i >= 0; --i) {
|
||||||
|
if (input[i] == '1') { // Wenn aktuelle Ziffer 1 ist
|
||||||
|
if (carry) {
|
||||||
|
temp[pos++] = '0'; // 1 + 1 = 0, Übertrag bleibt 1
|
||||||
|
} else {
|
||||||
|
temp[pos++] = '1'; // 1 + 0 = 1, kein Übertrag mehr
|
||||||
|
}
|
||||||
|
// carry bleibt 1, wenn wir 1+1 gerechnet haben
|
||||||
|
} else if (input[i] == '0') { // Wenn aktuelle Ziffer 0 ist
|
||||||
|
if (carry) {
|
||||||
|
temp[pos++] = '1'; // 0 + 1 = 1, Übertrag wird 0
|
||||||
|
carry = 0;
|
||||||
|
} else {
|
||||||
|
temp[pos++] = '0'; // 0 + 0 = 0, kein Übertrag
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
output[0] = '\0'; // Fehlerfall: ungültiges Zeichen in input
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Falls nach der Schleife noch ein Übertrag übrig ist (z.B. 111 + 1 = 1000)
|
||||||
|
if (carry) {
|
||||||
|
temp[pos++] = '1'; // Setze noch eine 1 ganz vorne
|
||||||
|
}
|
||||||
|
|
||||||
|
temp[pos] = '\0'; // String-Ende setzen
|
||||||
|
|
||||||
|
// Jetzt temp umdrehen und in output kopieren
|
||||||
|
// temp enthält das Ergebnis rückwärts, also müssen wir es umdrehen
|
||||||
|
for (i = 0; i < pos; ++i) {
|
||||||
|
output[i] = temp[pos - 1 - i];
|
||||||
|
}
|
||||||
|
output[pos] = '\0'; // String-Ende setzen
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
#ifndef ADTURING_H
|
||||||
|
#define ADTURING_H
|
||||||
|
|
||||||
|
// Addiert 1 zu einer Dualzahl (als String) und speichert das Ergebnis in output
|
||||||
|
// input: Dualzahl als String, z.B. "1011"
|
||||||
|
// output: Ergebnis als String, z.B. "1100"
|
||||||
|
// maxlen: Maximale Länge des output-Arrays (inklusive '\0')
|
||||||
|
void dual_addiere_eins(const char *input, char *output, int maxlen);
|
||||||
|
|
||||||
|
#endif // ADTURING_H
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
// Liest eine Dualzahl als Zeichenkette vom Benutzer ein
|
||||||
|
void dualzahl_einlesen(char *buffer, int maxlen) {
|
||||||
|
printf("Geben Sie eine Dualzahl ein: "); // Benutzer auffordern
|
||||||
|
if (fgets(buffer, maxlen, stdin) == NULL) { // Zeichenkette einlesen
|
||||||
|
buffer[0] = '\0'; // Falls Fehler: leeren String setzen
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Zeilenumbruch am Ende entfernen, falls vorhanden
|
||||||
|
for (int i = 0; buffer[i]; ++i)
|
||||||
|
if (buffer[i] == '\n') buffer[i] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Gibt die Dualzahl aus
|
||||||
|
void dualzahl_ausgeben(const char *buffer) {
|
||||||
|
printf("Ergebnis: %s\n", buffer); // Ergebnis anzeigen
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
#ifndef BILDSCHI_H
|
||||||
|
#define BILDSCHI_H
|
||||||
|
|
||||||
|
// Liest eine Dualzahl als Zeichenkette vom Benutzer ein
|
||||||
|
void dualzahl_einlesen(char *buffer, int maxlen);
|
||||||
|
|
||||||
|
// Gibt die Dualzahl aus
|
||||||
|
void dualzahl_ausgeben(const char *buffer);
|
||||||
|
|
||||||
|
#endif // BILDSCHI_H
|
||||||
+31
@@ -0,0 +1,31 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
char wordchain[1000];
|
||||||
|
char delete;
|
||||||
|
|
||||||
|
printf("Geben Sie eine Zeichenkette (max.1000 Zeichen) ein:");
|
||||||
|
fgets(wordchain, 1000, stdin);
|
||||||
|
|
||||||
|
printf("\nGeben Sie das zu loeschende Zeichen ein: ");
|
||||||
|
scanf(" %c", &delete);
|
||||||
|
while (getchar() != '\n');
|
||||||
|
|
||||||
|
|
||||||
|
int length = strlen(wordchain); // anzahl der woerter die in wordchain stehen bis zum null terminator ('\n)
|
||||||
|
int j = 0;
|
||||||
|
for (int i = 0; i < length; i++) { // durchlaeuft den string vom 0 zeichen bis zum letzten
|
||||||
|
if (wordchain[i] != delete) { // wenn das zeichen auf der postion i nicht dem delete entpricht
|
||||||
|
wordchain[j++] = wordchain[i]; // wird wordchain[j] um ein erhoet und das angeschaute zeichen nicht geloescht
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//schleife wiederholt sich solange bis man am nullterminator von wordchain[j] angegkommen ist
|
||||||
|
wordchain[j] = '\0'; //null terminator -> makiert das ende vom string
|
||||||
|
|
||||||
|
|
||||||
|
printf("Die neue Zeichenkette ist dann: %s\n", wordchain);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Binary file not shown.
@@ -0,0 +1,53 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include "complex.h"
|
||||||
|
|
||||||
|
// Erzeugt eine neue komplexe Zahl und gibt einen Zeiger darauf zurück
|
||||||
|
Complex* createComplex(double real, double imag) {
|
||||||
|
Complex* z = malloc(sizeof(Complex)); // Speicher reservieren
|
||||||
|
if (z != NULL) {
|
||||||
|
z->real = real;
|
||||||
|
z->imag = imag;
|
||||||
|
}
|
||||||
|
return z;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Gibt den Speicher einer komplexen Zahl frei
|
||||||
|
void freeComplex(Complex* z) {
|
||||||
|
free(z);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Addiert zwei komplexe Zahlen und gibt das Ergebnis als neue Zahl zurück
|
||||||
|
Complex* addComplex(const Complex* a, const Complex* b) {
|
||||||
|
return createComplex(a->real + b->real, a->imag + b->imag);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Subtrahiert zwei komplexe Zahlen und gibt das Ergebnis als neue Zahl zurück
|
||||||
|
Complex* subtractComplex(const Complex* a, const Complex* b) {
|
||||||
|
return createComplex(a->real - b->real, a->imag - b->imag);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Multipliziert zwei komplexe Zahlen und gibt das Ergebnis als neue Zahl zurück
|
||||||
|
Complex* multiplyComplex(const Complex* a, const Complex* b) {
|
||||||
|
double real = a->real * b->real - a->imag * b->imag;
|
||||||
|
double imag = a->real * b->imag + a->imag * b->real;
|
||||||
|
return createComplex(real, imag);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Dividiert zwei komplexe Zahlen und gibt das Ergebnis als neue Zahl zurück
|
||||||
|
Complex* divideComplex(const Complex* a, const Complex* b) {
|
||||||
|
double denom = b->real * b->real + b->imag * b->imag; // Nenner berechnen
|
||||||
|
if (denom == 0.0) return NULL; // Division durch 0 abfangen
|
||||||
|
double real = (a->real * b->real + a->imag * b->imag) / denom;
|
||||||
|
double imag = (a->imag * b->real - a->real * b->imag) / denom;
|
||||||
|
return createComplex(real, imag);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Gibt eine komplexe Zahl in der Form (a + bi) aus
|
||||||
|
void printComplex(const Complex* z) {
|
||||||
|
if (z)
|
||||||
|
printf("(%.3f + %.3fi)\n", z->real, z->imag);
|
||||||
|
else
|
||||||
|
printf("NULL -> Division durch 0 nicht möglich\n");
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
#ifndef COMPLEX_H
|
||||||
|
#define COMPLEX_H
|
||||||
|
|
||||||
|
// Definition der Complex-Struktur für komplexe Zahlen
|
||||||
|
typedef struct {
|
||||||
|
double real; // Realteil
|
||||||
|
double imag; // Imaginärteil
|
||||||
|
} Complex;
|
||||||
|
|
||||||
|
// Funktionsprototypen für Operationen mit komplexen Zahlen
|
||||||
|
Complex* createComplex(double real, double imag); // Erzeugt eine neue komplexe Zahl
|
||||||
|
void freeComplex(Complex* z); // Gibt den Speicher einer komplexen Zahl frei
|
||||||
|
Complex* addComplex(const Complex* a, const Complex* b); // Addition
|
||||||
|
Complex* subtractComplex(const Complex* a, const Complex* b); // Subtraktion
|
||||||
|
Complex* multiplyComplex(const Complex* a, const Complex* b); // Multiplikation
|
||||||
|
Complex* divideComplex(const Complex* a, const Complex* b); // Division
|
||||||
|
void printComplex(const Complex* z); // Ausgabe
|
||||||
|
|
||||||
|
#endif
|
||||||
+31
@@ -0,0 +1,31 @@
|
|||||||
|
#include "fehler.h"
|
||||||
|
#include "bildschi.h"
|
||||||
|
#include "adturing.h"
|
||||||
|
|
||||||
|
#define MAXLEN 65 // Maximale Länge der Dualzahl (64 Bit + 1 für \0)
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
char input[MAXLEN]; // Eingabepuffer für die Dualzahl
|
||||||
|
char output[MAXLEN]; // Ausgabepuffer für das Ergebnis
|
||||||
|
|
||||||
|
dualzahl_einlesen(input, MAXLEN); // Dualzahl vom Benutzer einlesen
|
||||||
|
|
||||||
|
// Prüfen, ob die Eingabe nur aus 0 und 1 besteht
|
||||||
|
for (int i = 0; input[i]; ++i) {
|
||||||
|
if (input[i] != '0' && input[i] != '1') {
|
||||||
|
fehlerausgabe("Nur 0 und 1 erlaubt!"); // Fehler ausgeben und beenden
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dual_addiere_eins(input, output, MAXLEN); // 1 zur Dualzahl addieren
|
||||||
|
|
||||||
|
if (output[0] == '\0') { // Falls Fehler bei der Addition
|
||||||
|
fehlerausgabe("Fehler bei der Addition!");
|
||||||
|
}
|
||||||
|
|
||||||
|
dualzahl_ausgeben(output); // Ergebnis ausgeben
|
||||||
|
|
||||||
|
return 0; // Programm erfolgreich beenden
|
||||||
|
}
|
||||||
|
|
||||||
|
//gcc dualaddi.c fehler.c adturing.c bildschi.c
|
||||||
+87
@@ -0,0 +1,87 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
/* Prüft, ob der übergebene String nur aus '0' und '1' besteht (also eine Dualzahl ist). Gibt 1 zurück, wenn ja, sonst 0.*/
|
||||||
|
int ist_dual(const char *s) {
|
||||||
|
while (*s)
|
||||||
|
if (*s != '0' && *s != '1')
|
||||||
|
return 0; // Nicht erlaubt, also keine Dualzahl
|
||||||
|
else
|
||||||
|
s++; // Nächstes Zeichen prüfen
|
||||||
|
return 1; // Passt, Dualzahl
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Gibt die 32-Bit-Binärdarstellung einer Zahl aus.
|
||||||
|
Beginnt beim höchsten Bit (31) und prüft jedes Bit.
|
||||||
|
Gibt für jedes Bit ‘1’ oder ‘0’ aus (auch führende Nullen).*/
|
||||||
|
void print_bin(int n) {
|
||||||
|
for (int i = 31; i >= 0; i--)
|
||||||
|
putchar((n >> i) & 1 ? '1' : '0');
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Erwartet 3 Argumente:
|
||||||
|
1. Operand (als Dualzahl, z.B. "1011")
|
||||||
|
2. Operator (als einzelnes Zeichen: + - * / & ^)
|
||||||
|
3. Operand (als Dualzahl)
|
||||||
|
Führt die Operation aus und gibt das Ergebnis als Binärzahl und Hexadezimalzahl aus.*/
|
||||||
|
int main(int argc, char *argv[]) {
|
||||||
|
// Prüfen, ob genau 3 Argumente übergeben wurden (Programmname + 3 = 4)
|
||||||
|
if (argc != 4) {
|
||||||
|
printf("Richtiger Aufruf: %s <operand> <operator> <operand>\n", argv[0]);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Argumente zuweisen
|
||||||
|
/*a: erster Operand (als String)
|
||||||
|
op: Operator (als String)
|
||||||
|
b: zweiter Operand (als String)
|
||||||
|
ok: Flag, ob alles gültig ist*/
|
||||||
|
char *a = argv[1], *op = argv[2], *b = argv[3];
|
||||||
|
int ok = 1;
|
||||||
|
|
||||||
|
// Prüfen, ob beide Operanden gültige Dualzahlen sind
|
||||||
|
if (!ist_dual(a)) {
|
||||||
|
printf("....... %s ist keine erlaubte Dualzahl\n", a);
|
||||||
|
ok = 0;
|
||||||
|
}
|
||||||
|
if (!ist_dual(b)) {
|
||||||
|
printf("....... %s ist keine erlaubte Dualzahl\n", b);
|
||||||
|
ok = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Prüfen, ob der Operator ein erlaubtes Zeichen ist
|
||||||
|
if (strlen(op) != 1 || strchr("+-*/&^", op[0]) == NULL) {
|
||||||
|
printf("....... %s ist kein erlaubter Operator\n", op);
|
||||||
|
ok = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Falls etwas ungültig war, Programm beenden
|
||||||
|
if (!ok) return 1;
|
||||||
|
|
||||||
|
// Dualzahlen in int umwandeln (Basis 2)
|
||||||
|
int x = strtol(a, NULL, 2), y = strtol(b, NULL, 2), r = 0;
|
||||||
|
|
||||||
|
// Division durch 0 abfangen
|
||||||
|
if (*op == '/' && y == 0) {
|
||||||
|
printf("Fehler: Division durch 0\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Die gewünschte Operation ausführen
|
||||||
|
switch (*op) {
|
||||||
|
case '+': r = x + y; break;
|
||||||
|
case '-': r = x - y; break;
|
||||||
|
case '*': r = x * y; break;
|
||||||
|
case '/': r = x / y; break;
|
||||||
|
case '&': r = x & y; break; // Bitweises UND
|
||||||
|
case '^': r = x ^ y; break; // Bitweises XOR
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ergebnis ausgeben: Eingabe, Operator, Ergebnis in Binär- und Hexadezimaldarstellung
|
||||||
|
printf("%s %s %s =\n....... ", a, op, b);
|
||||||
|
print_bin(r);
|
||||||
|
printf(" (0x%X)\n", r);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
+27
-13
@@ -1,6 +1,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
void umrechnen(int number);
|
int umrechnen(int number);
|
||||||
|
void umrechnen2(int number, int bits);
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
int number = 0;
|
int number = 0;
|
||||||
@@ -10,31 +11,44 @@ int main() {
|
|||||||
printf("Bitte geben Sie eine Zahl ein: ");
|
printf("Bitte geben Sie eine Zahl ein: ");
|
||||||
if (scanf("%d", &number) != 1) {
|
if (scanf("%d", &number) != 1) {
|
||||||
printf("Ungueltige Eingabe. Bitte geben Sie eine gueltige Zahl ein.\n");
|
printf("Ungueltige Eingabe. Bitte geben Sie eine gueltige Zahl ein.\n");
|
||||||
while (getchar() != '\n');
|
while (getchar() != '\n'); // Eingabepuffer leeren
|
||||||
} else {
|
} else {
|
||||||
validInput = 1;
|
validInput = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
umrechnen(number);
|
if (number >= 0) {
|
||||||
|
int erg = umrechnen(number); // Positive Zahl in Binär umrechnen
|
||||||
|
printf("Binaerdarstellung: %d\n", erg);
|
||||||
|
} else {
|
||||||
|
int bits = sizeof(int) * 8 - 1; // Anzahl der Bits (z. B. 31 für 32-Bit-Systeme)
|
||||||
|
printf("Binaerdarstellung: ");
|
||||||
|
umrechnen2(number, bits); // Negative Zahl im Zweierkomplement ausgeben
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void umrechnen(int number) {
|
int umrechnen(int number) {
|
||||||
int bits = sizeof(int) * 8; // Anzahl der Bits in einem int (z. B. 32 Bits)
|
if (number == 0) {
|
||||||
unsigned int mask = 1 << (bits - 1); // Maske für das höchstwertige Bit
|
return 0; // Basisfall: Binärdarstellung von 0 ist 0
|
||||||
|
} else {
|
||||||
|
return number % 2 + 10 * umrechnen(number / 2); // Rekursive Umrechnung
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Wenn die Zahl negativ ist, wird sie als Zweierkomplement interpretiert
|
void umrechnen2(int number, int bits) {
|
||||||
unsigned int value = number;
|
if (bits < 0) {
|
||||||
|
return; // Basisfall: Keine weiteren Bits zu prüfen
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < bits; i++) {
|
unsigned int mask = 1 << bits; // Maske für das aktuelle Bit
|
||||||
// Prüfe das höchstwertige Bit und schiebe die Maske nach rechts
|
if (number & mask) {
|
||||||
if (value & mask) {
|
|
||||||
printf("1");
|
printf("1");
|
||||||
} else {
|
} else {
|
||||||
printf("0");
|
printf("0");
|
||||||
}
|
}
|
||||||
mask >>= 1; // Schiebe die Maske um ein Bit nach rechts
|
|
||||||
}
|
return umrechnen2(number, bits - 1); // Rekursiver Aufruf für das nächste Bit
|
||||||
}
|
}
|
||||||
Binary file not shown.
@@ -0,0 +1,69 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
|
// Vergleich zweier Strings ohne Beachtung der Groß-/Kleinschreibung
|
||||||
|
int string_equals_ignore_case(const char *a, const char *b) {
|
||||||
|
while (*a && *b) { //läuft so lange bis sie nicht das Ende erreicht haben
|
||||||
|
if (tolower((unsigned char)*a) != tolower((unsigned char)*b)) { // jedes Zeichen wird in Kleinbuchstaben umgewandelt um beide strings besser zu vergleichen
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
a++;
|
||||||
|
b++;
|
||||||
|
}
|
||||||
|
return *a == *b;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Prüft, ob die Eingabe eine erlaubte Grundfarbe ist
|
||||||
|
int is_valid_color(const char *color) {
|
||||||
|
return string_equals_ignore_case(color, "Rot") ||
|
||||||
|
string_equals_ignore_case(color, "Gruen") ||
|
||||||
|
string_equals_ignore_case(color, "Violett");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Gibt die Mischfarbe zurück
|
||||||
|
const char* mix_colors(const char *color1, const char *color2) {
|
||||||
|
if (string_equals_ignore_case(color1, "Rot") && string_equals_ignore_case(color2, "Rot")) {
|
||||||
|
return "Rot";
|
||||||
|
}
|
||||||
|
if ((string_equals_ignore_case(color1, "Rot") && string_equals_ignore_case(color2, "Gruen")) ||
|
||||||
|
(string_equals_ignore_case(color1, "Gruen") && string_equals_ignore_case(color2, "Rot"))) {
|
||||||
|
return "Gelb";
|
||||||
|
}
|
||||||
|
if ((string_equals_ignore_case(color1, "Rot") && string_equals_ignore_case(color2, "Violett")) ||
|
||||||
|
(string_equals_ignore_case(color1, "Violett") && string_equals_ignore_case(color2, "Rot"))) {
|
||||||
|
return "Purpur";
|
||||||
|
}
|
||||||
|
if (string_equals_ignore_case(color1, "Gruen") && string_equals_ignore_case(color2, "Gruen")) {
|
||||||
|
return "Gruen";
|
||||||
|
}
|
||||||
|
if ((string_equals_ignore_case(color1, "Gruen") && string_equals_ignore_case(color2, "Violett")) ||
|
||||||
|
(string_equals_ignore_case(color1, "Violett") && string_equals_ignore_case(color2, "Gruen"))) {
|
||||||
|
return "Blau";
|
||||||
|
}
|
||||||
|
if (string_equals_ignore_case(color1, "Violett") && string_equals_ignore_case(color2, "Violett")) {
|
||||||
|
return "Violett";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
char user_colors[2][20]; // Platz für 2 Farben
|
||||||
|
int attempts = 0;
|
||||||
|
|
||||||
|
while (attempts < 2) { // läuft so lange bis man zwei gültige Farben eingegeben hat
|
||||||
|
printf("Bitte gib eine Grundfarbe (Rot, Gruen oder Violett) ein: ");
|
||||||
|
scanf("%19s", user_colors[attempts]);
|
||||||
|
while (getchar() != '\n'); // Eingabepuffer leeren
|
||||||
|
|
||||||
|
if (is_valid_color(user_colors[attempts])) { // überprüft ob die eingegeben Farbe gültig ist
|
||||||
|
printf("Du hast %s gewaehlt.\n", user_colors[attempts]);
|
||||||
|
attempts++;
|
||||||
|
} else {
|
||||||
|
printf("Ungueltige Eingabe. Bitte versuche es erneut.\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Berechnen der Mischfarbe und Ausgabe der Farbe
|
||||||
|
printf("Die Mischfarbe ist dann: %s\n", mix_colors(user_colors[0], user_colors[1]));
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
// Gibt eine Fehlermeldung aus und beendet das Programm
|
||||||
|
void fehlerausgabe(const char *msg) {
|
||||||
|
fprintf(stderr, "Fehler: %s\n", msg); // Fehlermeldung auf dem Fehlerkanal ausgeben
|
||||||
|
exit(1); // Programm mit Fehlercode beenden
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
#ifndef FEHLER_H
|
||||||
|
#define FEHLER_H
|
||||||
|
|
||||||
|
// Gibt eine Fehlermeldung aus und beendet das Programm
|
||||||
|
void fehlerausgabe(const char *msg);
|
||||||
|
|
||||||
|
#endif // FEHLER_H
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
int main() {
|
int main() {
|
||||||
int max_zahlen, i, eingabe;
|
int max_zahlen, i, eingabe;
|
||||||
|
|
||||||
printf("Gib ein wie viele Zahlen verglichen werden sollen: ");
|
printf("Gib ein wie viele Zahlen verglichen werden sollen: \n ");
|
||||||
if (scanf("%d", &max_zahlen) != 1) {
|
if (scanf("%d", &max_zahlen) != 1) {
|
||||||
printf("Ungueltige Eingabe, bitte eine ganze Zahl eingeben.\n");
|
printf("Ungueltige Eingabe, bitte eine ganze Zahl eingeben.\n");
|
||||||
while (getchar() != '\n');
|
while (getchar() != '\n');
|
||||||
|
|||||||
+49
@@ -0,0 +1,49 @@
|
|||||||
|
/**********************************************************************\
|
||||||
|
* Kurzbeschreibung:
|
||||||
|
* Realisiert das Josephus Spiel zum Test einer Queue
|
||||||
|
*
|
||||||
|
* Datum: Autor:
|
||||||
|
* 30.9.2015 Prof. Dr. Helmut Herold
|
||||||
|
*
|
||||||
|
\**********************************************************************/
|
||||||
|
/*--- #includes ------------------------------------------------------*/
|
||||||
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
|
#include <stdio.h>
|
||||||
|
#include "queue.h"
|
||||||
|
/*--- #defines -------------------------------------------------------*/
|
||||||
|
/*--- Datentypen (typedef) -------------------------------------------*/
|
||||||
|
/*--- Prototypen lokaler Funktionen ----------------------------------*/
|
||||||
|
/*--- main -----------------------------------------------------------*/
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
int n, z, i=1, nr; // Variablen für Personenanzahl, Schrittweite, Zähler, Rückgabewert scanf
|
||||||
|
do {
|
||||||
|
printf("Wie viele Personen: "); // Benutzer nach Anzahl der Personen fragen
|
||||||
|
nr = scanf("%d", &n); getchar(); // Eingabe lesen, Rückgabewert speichern, Zeilenumbruch entfernen
|
||||||
|
} while (nr != 1 || n < 0); // Wiederholen, falls ungültige Eingabe
|
||||||
|
|
||||||
|
do {
|
||||||
|
printf("Wie vielte ist auszusondern: "); // Benutzer nach Schrittweite fragen
|
||||||
|
nr = scanf("%d", &z); getchar(); // Eingabe lesen, Rückgabewert speichern, Zeilenumbruch entfernen
|
||||||
|
} while (nr != 1 || z < 0); // Wiederholen, falls ungültige Eingabe
|
||||||
|
|
||||||
|
for (i = 1; i <= n; i++) // Queue füllen
|
||||||
|
put(i); // Personen mit Nummer 1 bis n in die Queue einfügen
|
||||||
|
|
||||||
|
while (!isEmpty()) { // Solange noch Personen in der Queue sind
|
||||||
|
for (i = 1; i < z; i++) { // z-1 Personen überspringen
|
||||||
|
if (put(get()) == FALSE) { // Erste Person aus der Queue nehmen und wieder hinten einfügen
|
||||||
|
fprintf(stderr, "Fehler beim Einfügen\n"); // Fehlerausgabe, falls put fehlschlägt
|
||||||
|
return 1; // Programm mit Fehlercode beenden
|
||||||
|
}
|
||||||
|
}
|
||||||
|
printf("%d, ", get()); // Die z-te Person aus der Queue nehmen und ausgeben (ausscheiden)
|
||||||
|
// Diese Person wird nicht mehr eingefügt
|
||||||
|
}
|
||||||
|
printf("\n"); // Zeilenumbruch nach Ausgabe aller ausgeschiedenen Personen
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
//gcc -c queue.c -o queue.o
|
||||||
|
//ar rcs libqueue.a queue.o
|
||||||
|
//gcc josephus.c -L. -lqueue -o josephus
|
||||||
+108
@@ -0,0 +1,108 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <time.h>
|
||||||
|
#include "matrixOp.h"
|
||||||
|
|
||||||
|
// Erstellt eine Matrix mit allen Einträgen 0
|
||||||
|
Matrix* CreateMatrixZero(int rows, int cols) {
|
||||||
|
Matrix *m = malloc(sizeof(Matrix)); // Speicher für Matrix-Struktur
|
||||||
|
m->rows = rows;
|
||||||
|
m->cols = cols;
|
||||||
|
m->data = malloc(rows * sizeof(double*)); // Speicher für Zeilenzeiger
|
||||||
|
for (int i = 0; i < rows; i++) {
|
||||||
|
m->data[i] = calloc(cols, sizeof(double)); // Speicher für jede Zeile, initialisiert mit 0
|
||||||
|
}
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Erstellt eine Matrix, deren Einträge mit startValue beginnen und dann hochzählen
|
||||||
|
Matrix* CreateMatrix(int rows, int cols, double startValue) {
|
||||||
|
Matrix *m = CreateMatrixZero(rows, cols);
|
||||||
|
double val = startValue;
|
||||||
|
for (int i = 0; i < rows; i++) {
|
||||||
|
for (int j = 0; j < cols; j++) {
|
||||||
|
m->data[i][j] = val++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Gibt den Speicher einer Matrix wieder frei
|
||||||
|
void FreeMatrix(Matrix *m) {
|
||||||
|
for (int i = 0; i < m->rows; i++) {
|
||||||
|
free(m->data[i]); // Jede Zeile freigeben
|
||||||
|
}
|
||||||
|
free(m->data); // Zeilenzeiger-Array freigeben
|
||||||
|
free(m); // Matrix-Struktur freigeben
|
||||||
|
}
|
||||||
|
|
||||||
|
// Gibt die Matrix schön formatiert auf der Konsole aus
|
||||||
|
void PrintMatrix(Matrix *m) {
|
||||||
|
for (int i = 0; i < m->rows; i++) {
|
||||||
|
for (int j = 0; j < m->cols; j++) {
|
||||||
|
printf("%6.2f ", m->data[i][j]);
|
||||||
|
}
|
||||||
|
printf("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Addiert zwei Matrizen gleicher Größe
|
||||||
|
Matrix* AddMatrix(Matrix *a, Matrix *b) {
|
||||||
|
if (a->rows != b->rows || a->cols != b->cols) return NULL; // Nur gleiche Größe erlaubt
|
||||||
|
Matrix *m = CreateMatrixZero(a->rows, a->cols);
|
||||||
|
for (int i = 0; i < m->rows; i++) {
|
||||||
|
for (int j = 0; j < m->cols; j++) {
|
||||||
|
m->data[i][j] = a->data[i][j] + b->data[i][j];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Subtrahiert zwei Matrizen gleicher Größe
|
||||||
|
Matrix* SubMatrix(Matrix *a, Matrix *b) {
|
||||||
|
if (a->rows != b->rows || a->cols != b->cols) return NULL;
|
||||||
|
Matrix *m = CreateMatrixZero(a->rows, a->cols);
|
||||||
|
for (int i = 0; i < m->rows; i++) {
|
||||||
|
for (int j = 0; j < m->cols; j++) {
|
||||||
|
m->data[i][j] = a->data[i][j] - b->data[i][j];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Transponiert eine Matrix (Zeilen und Spalten vertauschen)
|
||||||
|
Matrix* TransposeMatrix(Matrix *a) {
|
||||||
|
Matrix *m = CreateMatrixZero(a->cols, a->rows); // Zeilen und Spalten vertauscht
|
||||||
|
for (int i = 0; i < a->rows; i++) {
|
||||||
|
for (int j = 0; j < a->cols; j++) {
|
||||||
|
m->data[j][i] = a->data[i][j];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Multipliziert zwei Matrizen (a: m x n, b: n x p)
|
||||||
|
Matrix* MulMatrix(Matrix *a, Matrix *b) {
|
||||||
|
if (a->cols != b->rows) return NULL; // Nur möglich, wenn Spalten von a == Zeilen von b
|
||||||
|
Matrix *m = CreateMatrixZero(a->rows, b->cols);
|
||||||
|
for (int i = 0; i < a->rows; i++) {
|
||||||
|
for (int j = 0; j < b->cols; j++) {
|
||||||
|
for (int k = 0; k < a->cols; k++) {
|
||||||
|
m->data[i][j] += a->data[i][k] * b->data[k][j];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Berechnet die Determinante einer 2x2-Matrix
|
||||||
|
double DetMatrix(Matrix *m) {
|
||||||
|
if (m->rows != m->cols) return 0; // Nur quadratische Matrizen
|
||||||
|
if (m->rows == 2) {
|
||||||
|
// Formel: ad - bc
|
||||||
|
return m->data[0][0] * m->data[1][1] - m->data[0][1] * m->data[1][0];
|
||||||
|
}
|
||||||
|
// Für größere Matrizen nicht implementiert
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#ifndef MATRIX_OP_H
|
||||||
|
#define MATRIX_OP_H
|
||||||
|
typedef struct {
|
||||||
|
int rows;
|
||||||
|
int cols;
|
||||||
|
double **data;
|
||||||
|
} Matrix;
|
||||||
|
Matrix* CreateMatrixZero(int rows, int cols);
|
||||||
|
Matrix* CreateMatrixRand(int rows, int cols);
|
||||||
|
Matrix* CreateMatrix(int rows, int cols, double startValue);
|
||||||
|
void FreeMatrix(Matrix *m);
|
||||||
|
void PrintMatrix(Matrix *m);
|
||||||
|
Matrix* AddMatrix(Matrix *a, Matrix *b);
|
||||||
|
Matrix* SubMatrix(Matrix *a, Matrix *b);
|
||||||
|
Matrix* TransposeMatrix(Matrix *a);
|
||||||
|
Matrix* MulMatrix(Matrix *a, Matrix *b);
|
||||||
|
double DetMatrix(Matrix *m);
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
void randomnumbergenerator(int *randomnumbers, int length);
|
||||||
|
int comp(const void* a,const void* b);
|
||||||
|
int findMostFrequent(int randomnumbers[], int n);
|
||||||
|
|
||||||
|
int counted = 0;
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
int length = 0;
|
||||||
|
int validInput = 0;
|
||||||
|
|
||||||
|
while (!validInput) {
|
||||||
|
printf("Wieviele Zufallswerte (1..10000): ");
|
||||||
|
scanf("%d", &length);
|
||||||
|
while (getchar() != '\n'); // Eingabepuffer leeren
|
||||||
|
if (length <= 0 || length > 10000) {
|
||||||
|
printf("Ungueltige Eingabe. Bitte geben Sie eine Zahl zwischen 1 und 10000 ein.\n");
|
||||||
|
} else {
|
||||||
|
validInput = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int randomnumbers[length]; // Array für die Zufallszahlen
|
||||||
|
|
||||||
|
// Zufallszahlengenerator initialisieren
|
||||||
|
srand(time(NULL));
|
||||||
|
|
||||||
|
// Zufallszahlen erstellen
|
||||||
|
randomnumbergenerator(randomnumbers, length);
|
||||||
|
|
||||||
|
printf("Erzeugte Zufallszahlen: \n");
|
||||||
|
for (int i = 0; i < length; i++) {
|
||||||
|
printf("%d ", randomnumbers[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
qsort(randomnumbers, length, sizeof(int), comp); // array, die Länge, Bits, vergleichsfunktion
|
||||||
|
|
||||||
|
printf("\nSortierte Zufallszahlen: \n");
|
||||||
|
for (int i = 0; i < length; i++) {
|
||||||
|
printf("%d ", randomnumbers[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
int result = findMostFrequent(randomnumbers, length);
|
||||||
|
|
||||||
|
printf("\nModus: %d\nHaeufigkeit: %d\n", result, counted);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void randomnumbergenerator(int *randomnumbers, int length) { // Zeiger, da man keinen neuen Speicher erstellen will sondern direkt auf die Stellen von randomnumbers zugreifen möchte
|
||||||
|
for (int i = 0; i < length; i++) {
|
||||||
|
*(randomnumbers + i) = rand() % 99 + 1; // randomnumbers bekommt an jede i´te Stelle eine Zufallszahl
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int comp(const void* a,const void* b) { // 1. Zahl und 2. Zahl
|
||||||
|
return *(int*)a - *(int*)b; // >0 wenn a größer b, <0 wenn b größer a, =0 wenn a gleich b
|
||||||
|
}
|
||||||
|
|
||||||
|
int findMostFrequent(int randomnumbers[], int n) {
|
||||||
|
int maxCount = 0;
|
||||||
|
int mostFrequent = randomnumbers[0];
|
||||||
|
|
||||||
|
for (int i = 0; i < n; i++) {
|
||||||
|
int count = 0;
|
||||||
|
for (int j = 0; j < n; j++) {
|
||||||
|
if (randomnumbers[j] == randomnumbers[i]) { // wenn Zahlen gleich geht count hoch
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (count > maxCount) {
|
||||||
|
maxCount = count;
|
||||||
|
mostFrequent = randomnumbers[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
counted = maxCount;
|
||||||
|
return mostFrequent;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
void erstelleZufallszahlen(int *array, int size);
|
||||||
|
int vergleiche(const void *a, const void *b);
|
||||||
|
int findeModus(int *array, int size);
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
int length = 0;
|
||||||
|
int validInput = 0;
|
||||||
|
|
||||||
|
while (!validInput) {
|
||||||
|
printf("Wieviele Zufallswerte (1..10000): ");
|
||||||
|
scanf("%d", &length);
|
||||||
|
while (getchar() != '\n'); // Eingabepuffer leeren
|
||||||
|
if (length <= 0 || length > 10000) {
|
||||||
|
printf("Ungueltige Eingabe. Bitte geben Sie eine Zahl zwischen 1 und 10000 ein.\n");
|
||||||
|
} else {
|
||||||
|
validInput = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int randomnumbers[length]; // Array für die Zufallszahlen
|
||||||
|
|
||||||
|
// Zufallszahlengenerator initialisieren
|
||||||
|
srand(time(NULL));
|
||||||
|
|
||||||
|
// Zufallszahlen erstellen
|
||||||
|
erstelleZufallszahlen(randomnumbers, length);
|
||||||
|
|
||||||
|
// Zufallszahlen ausgeben
|
||||||
|
printf("Die generierten Zufallszahlen sind:\n");
|
||||||
|
for (int i = 0; i < length; i++) {
|
||||||
|
printf("%d ", randomnumbers[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Zufallszahlen sortieren
|
||||||
|
qsort(randomnumbers, length, sizeof(int), vergleiche);
|
||||||
|
|
||||||
|
// Sortierte Zufallszahlen ausgeben
|
||||||
|
printf("Die sortierten Zufallszahlen sind:\n");
|
||||||
|
for (int i = 0; i < length; i++) {
|
||||||
|
printf("%d ", randomnumbers[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Modus berechnen
|
||||||
|
int modus = findeModus(randomnumbers, length);
|
||||||
|
printf("Der Modus der Zahlenreihe ist: %d\n", modus);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void erstelleZufallszahlen(int *array, int size) {
|
||||||
|
for (int i = 0; i < size; i++) {
|
||||||
|
*(array + i) = rand() % 100 + 1; // Zufallszahl zwischen 1 und 100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int vergleiche(const void *a, const void *b) {
|
||||||
|
return (*(int *)a - *(int *)b); // Vergleichsfunktion für qsort
|
||||||
|
}
|
||||||
|
|
||||||
|
int findeModus(int *array, int size) {
|
||||||
|
int modus = array[0];
|
||||||
|
int maxCount = 1;
|
||||||
|
int currentCount = 1;
|
||||||
|
|
||||||
|
for (int i = 1; i < size; i++) {
|
||||||
|
if (array[i] == array[i - 1]) {
|
||||||
|
currentCount++; // Gleiche Zahl gefunden, Zähler erhöhen
|
||||||
|
} else {
|
||||||
|
if (currentCount > maxCount) {
|
||||||
|
maxCount = currentCount; // Neuer Modus gefunden
|
||||||
|
modus = array[i - 1];
|
||||||
|
}
|
||||||
|
currentCount = 1; // Zähler zurücksetzen
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Letzte Zahl prüfen
|
||||||
|
if (currentCount > maxCount) {
|
||||||
|
modus = array[size - 1];
|
||||||
|
}
|
||||||
|
|
||||||
|
return modus;
|
||||||
|
}
|
||||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,34 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
int main(int argc, char *argv[]) { //Kommandozeilenargumente und Array der Argumente als strings
|
||||||
|
// Prüfen, ob ein Dateiname als Argument übergeben wurde
|
||||||
|
if (argc < 2) {
|
||||||
|
printf("Bitte Dateinamen als erstes Argument angeben.\n");
|
||||||
|
return 1; // Fehlercode zurückgeben und Programm beenden
|
||||||
|
}
|
||||||
|
|
||||||
|
// Datei im Lesemodus ("r") öffnen
|
||||||
|
FILE *datei = fopen(argv[1], "r");
|
||||||
|
if (datei == NULL) {
|
||||||
|
// Fehler beim Öffnen der Datei, z.B. Datei existiert nicht
|
||||||
|
perror("Fehler beim Öffnen der Datei");
|
||||||
|
return 1; // Fehlercode zurückgeben und Programm beenden
|
||||||
|
}
|
||||||
|
|
||||||
|
char zeile[1024]; // Puffer für eine Zeile (max. 1023 Zeichen + '\0')
|
||||||
|
int zeilennummer = 1; // Startwert für die Zeilennummerierung
|
||||||
|
|
||||||
|
// Solange noch Zeilen gelesen werden können
|
||||||
|
while (fgets(zeile, sizeof(zeile), datei) != NULL) {
|
||||||
|
// Zeilennummer und Inhalt der Zeile ausgeben
|
||||||
|
// %4d: Zeilennummer rechtsbündig mit mindestens 4 Stellen
|
||||||
|
printf("%4d: %s", zeilennummer, zeile);
|
||||||
|
zeilennummer++; // Zeilennummer erhöhen
|
||||||
|
}
|
||||||
|
|
||||||
|
// Datei schließen
|
||||||
|
fclose(datei);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
BIN
Binary file not shown.
@@ -0,0 +1,83 @@
|
|||||||
|
/**********************************************************************\
|
||||||
|
* Kurzbeschreibung:
|
||||||
|
* queue.c - realisiert eine Queue (Warteschlange)
|
||||||
|
*
|
||||||
|
* Datum: Autor:
|
||||||
|
*
|
||||||
|
\**********************************************************************/
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include "queue.h"
|
||||||
|
|
||||||
|
/*--- Struktur eines Listenelements ----------------------------------*/
|
||||||
|
|
||||||
|
/*Ein Listenelement (Node) besteht aus:
|
||||||
|
- value: dem gespeicherten Wert (hier ein int)
|
||||||
|
- next: Zeiger auf das nächste Element in der Liste
|
||||||
|
*/
|
||||||
|
typedef struct Node {
|
||||||
|
int value;
|
||||||
|
struct Node *next;
|
||||||
|
} Node_t;
|
||||||
|
|
||||||
|
/*--- Modulglobale Variablen: Zeiger auf Kopf und Ende der Liste -----*/
|
||||||
|
|
||||||
|
/*head: Zeigt auf das erste Element der Queue (Kopf)
|
||||||
|
tail: Zeigt auf das letzte Element der Queue (Ende)
|
||||||
|
Sind beide NULL, ist die Queue leer.*/
|
||||||
|
static Node_t *head = NULL;
|
||||||
|
static Node_t *tail = NULL;
|
||||||
|
|
||||||
|
/*--- put(): Einfügen am Ende der Liste ------------------------------*/
|
||||||
|
/*Fügt eine neue Zahl am Ende der Queue ein.
|
||||||
|
Rückgabewert: TRUE bei Erfolg, FALSE bei Speicherfehler.*/
|
||||||
|
Bool put(int zahl) {
|
||||||
|
// Speicher für neues Element reservieren
|
||||||
|
Node_t *newNode = (Node_t *)malloc(sizeof(Node_t));
|
||||||
|
if (newNode == NULL) {
|
||||||
|
fprintf(stderr, "Speicher konnte nicht freigegeben werden.\n");
|
||||||
|
return FALSE; // Fehler: kein Speicher verfügbar
|
||||||
|
}
|
||||||
|
newNode->value = zahl; // Wert setzen
|
||||||
|
newNode->next = NULL; // Am Ende zeigt next auf NULL
|
||||||
|
|
||||||
|
if (tail != NULL) {
|
||||||
|
// Es gibt schon Elemente: neues Element ans Ende anhängen
|
||||||
|
tail->next = newNode;
|
||||||
|
} else {
|
||||||
|
// Die Liste war leer: head zeigt jetzt auf das neue Element
|
||||||
|
head = newNode;
|
||||||
|
}
|
||||||
|
// tail zeigt immer auf das letzte Element
|
||||||
|
tail = newNode;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*--- get(): Entfernt das erste Element ------------------------------*/
|
||||||
|
|
||||||
|
/*Entfernt das erste Element (Kopf) der Queue und gibt dessen Wert zurück.
|
||||||
|
Ist die Queue leer, wird QLEER zurückgegeben und eine Fehlermeldung ausgegeben.*/
|
||||||
|
int get(void) {
|
||||||
|
if (head == NULL) {
|
||||||
|
// Die Queue ist leer
|
||||||
|
fprintf(stderr, "Fehler: Queue ist leer.\n");
|
||||||
|
return QLEER;
|
||||||
|
}
|
||||||
|
Node_t *tmp = head; // Temporärer Zeiger auf das erste Element
|
||||||
|
int value = tmp->value; // Wert des ersten Elements speichern
|
||||||
|
head = head->next; // Kopf auf das nächste Element setzen
|
||||||
|
if (head == NULL) {
|
||||||
|
// Nach dem Entfernen ist die Queue leer, also tail auch auf NULL setzen
|
||||||
|
tail = NULL;
|
||||||
|
}
|
||||||
|
free(tmp); // Speicher des entfernten Elements freigeben
|
||||||
|
return value; // Wert zurückgeben
|
||||||
|
}
|
||||||
|
|
||||||
|
/*--- isEmpty(): Prüft, ob Liste leer ist ----------------------------*/
|
||||||
|
/*
|
||||||
|
* Gibt TRUE zurück, wenn die Queue leer ist, sonst FALSE.
|
||||||
|
*/
|
||||||
|
Bool isEmpty(void) {
|
||||||
|
return head == NULL ? TRUE : FALSE;
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
/**********************************************************************\
|
||||||
|
* Kurzbeschreibung:
|
||||||
|
* queue.h - realisiert eine Queue (Warteschlange) als verkettete Liste
|
||||||
|
*
|
||||||
|
* Datum: Autor:
|
||||||
|
* 30.9.2015 Prof. Dr. Helmut Herold / angepasst von OpenAI
|
||||||
|
\**********************************************************************/
|
||||||
|
#ifndef QUEUE_H
|
||||||
|
#define QUEUE_H
|
||||||
|
/*--- #includes ------------------------------------------------------*/
|
||||||
|
#include <limits.h>
|
||||||
|
/*--- #defines -------------------------------------------------------*/
|
||||||
|
#define TRUE 1
|
||||||
|
#define FALSE 0
|
||||||
|
#define QLEER INT_MIN // Rückgabewert bei leerer Queue
|
||||||
|
/*--- Datentypen -----------------------------------------------------*/
|
||||||
|
typedef int Bool;
|
||||||
|
/*--- Funktionsprototypen --------------------------------------------*/
|
||||||
|
/*--------------------------------------------------------------------*\
|
||||||
|
* put()
|
||||||
|
* Fügt eine Zahl ans Ende der Warteschlange.
|
||||||
|
* Rückgabewert:
|
||||||
|
* TRUE, wenn erfolgreich
|
||||||
|
* FALSE, wenn kein Speicher verfügbar
|
||||||
|
\*--------------------------------------------------------------------*/
|
||||||
|
Bool put(int zahl);
|
||||||
|
/*--------------------------------------------------------------------*\
|
||||||
|
* get()
|
||||||
|
* Entfernt die erste Zahl aus der Warteschlange und gibt sie zurück.
|
||||||
|
* Rückgabewert:
|
||||||
|
* Wert aus der Warteschlange oder QLEER bei leerer Queue
|
||||||
|
\*--------------------------------------------------------------------*/
|
||||||
|
int get(void);
|
||||||
|
/*--------------------------------------------------------------------*\
|
||||||
|
* isEmpty()
|
||||||
|
* Prüft, ob die Warteschlange leer ist.
|
||||||
|
* Rückgabewert:
|
||||||
|
* TRUE, wenn leer
|
||||||
|
* FALSE, wenn nicht leer
|
||||||
|
\*--------------------------------------------------------------------*/
|
||||||
|
Bool isEmpty(void);
|
||||||
|
#endif /* QUEUE_H */
|
||||||
+56
@@ -0,0 +1,56 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#define NUM_DIGITS 10 // Es gibt 10 Ziffern: 0 bis 9
|
||||||
|
|
||||||
|
int main(void) {
|
||||||
|
char *strichlisten[NUM_DIGITS] = {NULL}; // Array für die Strichlisten-Strings, einer pro Ziffer
|
||||||
|
int counts[NUM_DIGITS] = {0}; // Zählt, wie oft jede Ziffer vorkommt
|
||||||
|
int c; // Variable für das aktuell eingelesene Zeichen
|
||||||
|
|
||||||
|
// Initialisiere alle Strichlisten als leere Strings
|
||||||
|
for (int i = 0; i < NUM_DIGITS; ++i) {
|
||||||
|
strichlisten[i] = malloc(1); // Reserviere 1 Byte für den leeren String ('\0')
|
||||||
|
if (!strichlisten[i]) { // Prüfe, ob Speicher reserviert werden konnte
|
||||||
|
fprintf(stderr, "Speicherfehler!\n"); // Fehlermeldung ausgeben
|
||||||
|
// Bereits reservierten Speicher wieder freigeben
|
||||||
|
for (int j = 0; j < i; ++j) free(strichlisten[j]);
|
||||||
|
return 1; // Programm mit Fehlercode beenden
|
||||||
|
}
|
||||||
|
strichlisten[i][0] = '\0'; // Setze den String auf leer (nur das Endzeichen)
|
||||||
|
}// für jede Zahl wird ein leerer String angelegt
|
||||||
|
|
||||||
|
// Lese Zeichen ein, bis das Dateiende (EOF) erreicht ist
|
||||||
|
while ((c = getchar()) != EOF) {
|
||||||
|
if (c >= '0' && c <= '9') { // Prüfe, ob das Zeichen eine Ziffer ist
|
||||||
|
int idx = c - '0'; // Rechne das Zeichen in eine Zahl um (z.B. '3' -> 3)
|
||||||
|
counts[idx]++; // Zähle die Ziffer mit
|
||||||
|
|
||||||
|
// Ermittle die Länge des bisherigen Strichlisten-Strings
|
||||||
|
size_t oldlen = strlen(strichlisten[idx]);
|
||||||
|
// Reserviere neuen Speicher: alter String + 1 Strich + 1 für '\0'
|
||||||
|
char *neu = malloc(oldlen + 2);
|
||||||
|
if (!neu) { // Prüfe, ob Speicher reserviert werden konnte
|
||||||
|
fprintf(stderr, "Speicherfehler!\n");
|
||||||
|
// Speicher aufräumen
|
||||||
|
for (int j = 0; j < NUM_DIGITS; ++j) free(strichlisten[j]);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
strcpy(neu, strichlisten[idx]); // Kopiere den alten String in den neuen Speicher
|
||||||
|
neu[oldlen] = '|'; // Füge einen Strich ans Ende an
|
||||||
|
neu[oldlen+1] = '\0'; // Setze das String-Ende
|
||||||
|
free(strichlisten[idx]); // Gib den alten Speicher frei
|
||||||
|
strichlisten[idx] = neu; // Setze den neuen String als aktuelle Strichliste
|
||||||
|
}
|
||||||
|
// Alle anderen Zeichen werden ignoriert
|
||||||
|
}
|
||||||
|
|
||||||
|
// Gib für jede Ziffer die Anzahl und die Strichliste aus
|
||||||
|
for (int i = 0; i < NUM_DIGITS; ++i) {
|
||||||
|
printf("%d: %d %s\n", i, counts[i], strichlisten[i]);
|
||||||
|
free(strichlisten[i]); // Speicher für die Strichliste freigeben
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0; // Programm erfolgreich beenden
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main(){
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
BIN
Binary file not shown.
+49
@@ -0,0 +1,49 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
|
||||||
|
// Variablen definieren
|
||||||
|
int jh_koeff[4] = {4,2,0,5};
|
||||||
|
int monat_koeff[12] = {2,5,5,2,3,6,1,4,0,2,5,0};
|
||||||
|
int tag = 0;
|
||||||
|
int monat = 0;
|
||||||
|
int jahr = 0;
|
||||||
|
int schaltjahr = 0;
|
||||||
|
|
||||||
|
printf("Geben Sie ein Datum ein tag, monat, jahr: \n"); //eingabe
|
||||||
|
scanf("%d.%d.%d.", &tag, &monat,&jahr);
|
||||||
|
|
||||||
|
int jh = jahr / 100; // die vorderen beiden Ziffern der Jahreszahl
|
||||||
|
int ja = jahr % 100; // die hinteren beiden Ziffern der Jahreszahl
|
||||||
|
|
||||||
|
// geschaut ob es ein schaltjahr ist
|
||||||
|
if(monat > 2){
|
||||||
|
schaltjahr = 0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (jahr % 400 == 0) {
|
||||||
|
schaltjahr = 1;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(jahr % 100 == 0){
|
||||||
|
schaltjahr = 0;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(jahr % 4 == 0){
|
||||||
|
schaltjahr = 1;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
schaltjahr = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int wochentag = (tag + monat_koeff[monat -1] - schaltjahr + jh_koeff[jh%4] + ja + ja/4) % 7; // formel um den wochentag auszurechnen
|
||||||
|
|
||||||
|
const char *tage[] = {"Sonntag", "Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"};
|
||||||
|
|
||||||
|
printf("Der %d.%d.%d war ein %s.\n",tag, monat, jahr ,tage[wochentag]); // ausgabe vom Wochentag
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Binary file not shown.
@@ -0,0 +1,54 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
|
#define MAX_WORDLENGTH 100 // für die maximale Wortlänge
|
||||||
|
#define MAX_TEXT_LENGTH 1000 // für die maximale Textlänge
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
char dateiname[256]; // Puffer für den Dateinamen, damit es nicht zu Pufferüberläufen kommt
|
||||||
|
|
||||||
|
printf("Bitte gib den Dateinamen ein (z.B. text.txt oder Pfad): ");
|
||||||
|
scanf("%255s", dateiname); // Dateinamen von Tastatur einlesen und Begrenzung auf 255 Zeichen schützt vor Pufferüberläufen
|
||||||
|
|
||||||
|
FILE *file = fopen(dateiname, "r"); // Datei öffnen
|
||||||
|
if (file == NULL) {
|
||||||
|
perror("Fehler beim oeffnen der Datei"); // Überprüfen ob die Eingabe stimmt
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int frequency[MAX_WORDLENGTH] = {0};
|
||||||
|
char text[MAX_TEXT_LENGTH];
|
||||||
|
int wordlength = 0;
|
||||||
|
|
||||||
|
|
||||||
|
while (fgets(text, sizeof(text), file) != NULL) { // Datei zeilenweis lesen
|
||||||
|
for (int i = 0; text[i] != '\0'; i++) {
|
||||||
|
if (isalnum(text[i])) { //isalnum ueberprüft ob das es ein wort oder zahl ist also kein leerzeichen, satzzeichen
|
||||||
|
wordlength++; // zaehlt die buchstaben in dem wort
|
||||||
|
} else {
|
||||||
|
if (wordlength > 0 && wordlength < MAX_WORDLENGTH) { //überprüft ob ein wort gezählt werden kann (überschreitet micht max Wortlänge)
|
||||||
|
frequency[wordlength]++; //Erhöht die Häufigkeit für die aktuelle Wortlänge
|
||||||
|
wordlength = 0; //Setzt den Zähler für die Wortlänge zurück für das nächste Wort
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Letztes Wort in der Zeile nicht vergessen
|
||||||
|
if (wordlength > 0 && wordlength < MAX_WORDLENGTH) {
|
||||||
|
frequency[wordlength]++;
|
||||||
|
wordlength = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fclose(file); // Datei schließen
|
||||||
|
|
||||||
|
// Ergebnis ausgeben
|
||||||
|
printf("\nHaeufigkeitsverteilung der Wortlaengen:\n");
|
||||||
|
for (int i = 1; i < MAX_WORDLENGTH; i++) { //geht alle wortlängen durch
|
||||||
|
if (frequency[i] > 0) {
|
||||||
|
printf("Wortlaenge %d: %d\n", i, frequency[i]); // überprüft die häufigkeit
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
BIN
Binary file not shown.
Reference in new issue
Block a user