From 169fb7404e8ef2de13ac3a48f8d73436d8e6ac6a Mon Sep 17 00:00:00 2001 From: Yaya-Cout <67095734+Yaya-Cout@users.noreply.github.com> Date: Thu, 20 Jan 2022 17:21:35 +0100 Subject: [PATCH] Fix spelling (#128) * Fix spelling in .cpp files * Fix spelling in all files --- Makefile | 2 +- README.md | 20 +++--- apps/Makefile | 4 +- apps/apps_container.cpp | 4 +- apps/backlight_dimming_timer.cpp | 2 +- apps/backlight_dimming_timer.h | 2 +- apps/calculation/calculation_store.cpp | 10 +-- apps/code/catalog.en.i18n | 2 +- apps/code/catalog.es.i18n | 2 +- apps/code/catalog.pt.i18n | 2 +- apps/code/test/variable_box_controller.cpp | 2 +- apps/code/variable_box_controller.cpp | 12 ++-- apps/code/variable_box_controller.h | 2 +- apps/graph/values/values_controller.cpp | 8 +-- apps/home/Makefile | 2 +- apps/home/base.de.i18n | 4 +- apps/home/base.en.i18n | 4 +- apps/home/base.es.i18n | 4 +- apps/home/base.fr.i18n | 4 +- apps/home/base.hu.i18n | 4 +- apps/home/base.it.i18n | 4 +- apps/home/base.nl.i18n | 4 +- apps/home/base.pt.i18n | 4 +- apps/home/controller.cpp | 4 +- apps/math_toolbox.cpp | 4 +- apps/probability/calculation_controller.cpp | 2 +- .../probability/distribution/distribution.cpp | 2 +- .../distribution/student_distribution.cpp | 2 +- apps/reader/tex_parser.cpp | 2 +- .../regression/go_to_parameter_controller.cpp | 2 +- apps/regression/model/model.h | 2 +- apps/regression/test/model.cpp | 6 +- .../list/type_parameter_controller.cpp | 4 +- .../sequence/list/type_parameter_controller.h | 2 +- apps/sequence/test/sequence.cpp | 2 +- .../about_controller_non_official.cpp | 2 +- .../sub_menu/usb_protection_controller.cpp | 8 +-- apps/shared/double_pair_store.cpp | 10 +-- apps/shared/expression_model.cpp | 2 +- apps/shared/global_context.cpp | 2 +- apps/shared/sequence_context.h | 2 +- apps/shared/store_controller.cpp | 2 +- apps/shared/sum_graph_controller.cpp | 4 +- apps/solver/base.de.i18n | 2 +- apps/solver/base.en.i18n | 2 +- apps/solver/base.es.i18n | 2 +- apps/solver/base.fr.i18n | 2 +- apps/solver/base.hu.i18n | 2 +- apps/solver/base.it.i18n | 2 +- apps/solver/base.nl.i18n | 2 +- apps/solver/base.pt.i18n | 2 +- apps/solver/equation_store.cpp | 12 ++-- apps/solver/equation_store.h | 4 +- apps/solver/interval_controller.cpp | 2 +- apps/solver/solutions_controller.cpp | 2 +- apps/title_bar_view.cpp | 2 +- apps/toolbox.de.i18n | 4 +- apps/toolbox.en.i18n | 4 +- apps/toolbox.es.i18n | 4 +- apps/toolbox.fr.i18n | 4 +- apps/toolbox.hu.i18n | 4 +- apps/toolbox.it.i18n | 4 +- apps/toolbox.nl.i18n | 4 +- apps/toolbox.pt.i18n | 4 +- build/device/dfu.py | 2 +- build/device/ram_map.py | 2 +- build/device/usb/_debug.py | 4 +- build/device/usb/backend/__init__.py | 22 +++---- build/device/usb/backend/libusb1.py | 2 +- build/device/usb/core.py | 6 +- build/doc/Doxyfile | 2 +- build/pimp.mak | 2 +- build/targets.device.n0110.mak | 2 +- docs/architecture.svg | 2 +- docs/build/index.md | 12 ++-- docs/index.md | 4 +- escher/image/inliner.c | 2 +- escher/include/escher/text_area.h | 2 +- escher/include/escher/view_controller.h | 4 +- escher/src/button_row_controller.cpp | 4 +- escher/src/icon_view.cpp | 2 +- escher/src/selectable_table_view.cpp | 2 +- escher/src/text_field.cpp | 4 +- ion/Makefile | 2 +- ion/include/ion/timing.h | 2 +- ion/include/ion/unicode/utf8_helper.h | 10 +-- ion/src/device/n0100/flash.ld | 2 +- ion/src/device/n0110/drivers/board.cpp | 4 +- ion/src/device/n0110/drivers/config/clocks.h | 2 +- ion/src/device/n0110/flash.ld | 3 +- ion/src/device/n0110/internal_flash.ld | 2 +- ion/src/device/shared/drivers/battery.cpp | 4 +- ion/src/device/shared/drivers/display.cpp | 2 +- ion/src/device/shared/drivers/exam_mode.cpp | 24 +++---- ion/src/device/shared/drivers/reset.cpp | 2 +- ion/src/device/shared/drivers/wakeup.h | 2 +- ion/src/device/shared/regs/tim.h | 2 +- ion/src/device/shared/usb/calculator.h | 2 +- ion/src/device/shared/usb/dfu.ld | 2 +- ion/src/device/shared/usb/dfu_interface.h | 2 +- ion/src/device/shared/usb/dfu_relocated.cpp | 2 +- .../descriptor/device_capability_descriptor.h | 4 +- .../platform_device_capability_descriptor.h | 4 +- ion/src/device/shared/usb/stack/device.cpp | 2 +- ion/src/external/lz4/lz4.c | 2 +- ion/src/external/lz4/lz4.h | 2 +- ion/src/shared/events_benchmark.cpp | 8 +-- ion/src/shared/events_keyboard.cpp | 16 ++--- ion/src/simulator/3ds/Makefile | 2 +- ion/src/simulator/3ds/driver/led.cpp | 6 +- ion/src/simulator/android/Makefile | 4 +- .../github/omega/simulator/OmegaActivity.java | 2 +- .../src/java/org/libsdl/app/SDLActivity.java | 2 +- .../src/core/winrt/SDL_winrtapp_direct3d.cpp | 2 +- .../external/sdl/src/hidapi/ios/hid.m | 4 +- .../external/sdl/src/hidapi/linux/hid.c | 2 +- .../external/sdl/src/hidapi/mac/hid.c | 8 +-- .../simulator/external/sdl/src/libm/e_log.c | 2 +- .../simulator/external/sdl/src/libm/e_pow.c | 2 +- .../simulator/external/sdl/src/libm/e_sqrt.c | 8 +-- .../external/sdl/src/libm/k_rem_pio2.c | 4 +- .../sdl/src/video/khronos/vulkan/vk_icd.h | 2 +- .../sdl/src/video/khronos/vulkan/vk_layer.h | 2 +- .../simulator/external/sdl/src/video/qnx/gl.c | 2 +- .../external/sdl/src/video/qnx/keyboard.c | 2 +- .../external/sdl/src/video/qnx/video.c | 2 +- .../sdl/src/video/winrt/SDL_winrtvideo.cpp | 2 +- ion/src/simulator/linux/Makefile | 2 +- ion/src/simulator/shared/apple/helpers.mak | 2 +- ion/src/simulator/shared/apple/targets.mak | 2 +- ion/src/simulator/shared/events_platform.cpp | 2 +- ion/src/simulator/web/clipboard_helper.cpp | 4 +- ion/src/simulator/windows/platform_files.cpp | 2 +- ion/test/device/n0110/external_flash_tests.ld | 2 +- ion/test/utf8_helper.cpp | 10 +-- kandinsky/fonts/code_points.h | 2 +- kandinsky/fonts/rasterizer.c | 2 +- kandinsky/src/context_rect.cpp | 6 +- liba/src/armv7m/longjmp.s | 2 +- liba/src/external/openbsd/e_log.c | 2 +- liba/src/external/openbsd/e_sqrt.c | 8 +-- liba/src/external/openbsd/e_sqrtf.c | 2 +- liba/src/external/openbsd/k_rem_pio2.c | 4 +- liba/src/external/openbsd/k_rem_pio2f.c | 2 +- liba/src/external/sqlite/sqliteInt.h | 2 +- libaxx/README.txt | 2 +- poincare/include/poincare/based_integer.h | 2 +- poincare/include/poincare/equal.h | 2 +- poincare/include/poincare/expression.h | 4 +- poincare/include/poincare/expression_node.h | 2 +- poincare/include/poincare/float.h | 2 +- poincare/include/poincare/infinity.h | 2 +- poincare/include/poincare/n_ary_expression.h | 2 +- poincare/include/poincare/print_float.h | 14 ++-- poincare/include/poincare/rational.h | 2 +- poincare/include/poincare/store.h | 2 +- poincare/include/poincare/undefined.h | 2 +- poincare/include/poincare/unit.h | 64 +++++++++---------- poincare/include/poincare/unit_convert.h | 2 +- poincare/include/poincare/unreal.h | 2 +- poincare/include/poincare/zoom.h | 2 +- poincare/src/approximation_helper.cpp | 6 +- poincare/src/complex_cartesian.cpp | 8 +-- poincare/src/decimal.cpp | 4 +- poincare/src/derivative.cpp | 2 +- poincare/src/erf_inv.cpp | 2 +- poincare/src/expression.cpp | 4 +- poincare/src/hyperbolic_arc_tangent.cpp | 2 +- poincare/src/logarithm.cpp | 4 +- poincare/src/matrix.cpp | 8 +-- poincare/src/multiplication.cpp | 2 +- poincare/src/parsing/parser.cpp | 4 +- poincare/src/power.cpp | 4 +- poincare/src/print_float.cpp | 2 +- poincare/src/tree_handle.cpp | 2 +- poincare/src/trigonometry.cpp | 8 +-- poincare/src/trigonometry_cheat_table.cpp | 2 +- poincare/src/unit.cpp | 2 +- poincare/test/approximation.cpp | 2 +- poincare/test/expression_properties.cpp | 2 +- python/Makefile | 2 +- python/port/mod/ion/file.cpp | 2 +- python/port/mod/ion/modion_table.cpp | 2 +- .../port/mod/matplotlib/pyplot/modpyplot.cpp | 2 +- python/port/mod/time/modtime.cpp | 2 +- python/port/mod/time/modtime.h | 4 +- python/port/mod/ulab/ndarray.c | 2 +- python/port/mod/ulab/numpy/fft/fft.c | 2 +- python/port/mod/ulab/numpy/poly.c | 2 +- .../port/mod/ulab/scipy/optimize/optimize.c | 4 +- python/port/mod/ulab/user/user.c | 2 +- python/port/port.cpp | 2 +- python/src/py/compile.c | 2 +- python/src/py/emitnative.c | 6 +- python/src/py/formatfloat.c | 2 +- python/src/py/gc.c | 2 +- python/src/py/lexer.c | 2 +- python/src/py/lexer.h | 2 +- python/src/py/makecompresseddata.py | 2 +- python/src/py/mkrules.mk | 6 +- python/src/py/modbuiltins.c | 2 +- python/src/py/mpconfig.h | 2 +- python/src/py/obj.c | 2 +- python/src/py/parsenum.c | 2 +- python/test/basics.cpp | 2 +- python/test/execution_environment.cpp | 4 +- python/test/execution_environment.h | 2 +- python/test/ion.cpp | 6 +- python/test/kandinsky.cpp | 6 +- python/test/math.cpp | 4 +- python/test/matplotlib.cpp | 24 +++---- python/test/random.cpp | 2 +- python/test/time.cpp | 2 +- python/test/turtle.cpp | 4 +- themes/themes_manager.py | 2 +- 215 files changed, 424 insertions(+), 425 deletions(-) diff --git a/Makefile b/Makefile index 1d9969a62..fa4c53c50 100644 --- a/Makefile +++ b/Makefile @@ -105,7 +105,7 @@ print-%: @echo $*\'s origin is $(origin $*) # Since we're building out-of-tree, we need to make sure the output directories -# are created, otherwise the receipes will fail (e.g. gcc will fail to create +# are created, otherwise the recipes will fail (e.g. gcc will fail to create # "output/foo/bar.o" because the directory "output/foo" doesn't exist). # We need to mark those directories as precious, otherwise Make will try to get # rid of them upon completion (and fail, since those folders won't be empty). diff --git a/README.md b/README.md index bf1dae20e..fb5f3144c 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Upsilon is a fork of Omega, an user-made OS that runs on the Numworks calculator ### Some new features - Enhancements for the Kandinsky python module - Support for wallpapers -- Exernal apps +- External apps - A custom theme - Operator overload for python - Improvements for the Periodic table application @@ -154,18 +154,18 @@ You need a windows version >= 1903. ```powershell dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux all /norestart ``` -This command activate WSL functionnalities. +This command activate WSL functionalities. ```powershell dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart ``` -This one allows virtual machines developped by Microsoft. +This one allows virtual machines developed by Microsoft. 2. Restart your computer. 3. Download [this file](https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi) and follow instructions. -4. Now open powershell admain like before and type: +4. Now open powershell admin like before and type: ```powershell wsl --set-default-version 2 ``` @@ -174,7 +174,7 @@ wsl --set-default-version 2 WSL is now installed. ### Usbipd installation to connect your calculator -If you want to connect to the calculator, you have to connect to install this [tool](https://github.com/dorssel/usbipd-win/releases/download/v1.3.0/usbipd-win_1.3.0.msi). This will allow you to connect WSL to the calculator through internet. Follow the on screen informations to install. +If you want to connect to the calculator, you have to connect to install this [tool](https://github.com/dorssel/usbipd-win/releases/download/v1.3.0/usbipd-win_1.3.0.msi). This will allow you to connect WSL to the calculator through internet. Follow the on screen information to install. #### Ubuntu 1. In a WSL Ubuntu command prompt, type: ```bash @@ -188,7 +188,7 @@ sudo visudo `Defaults secure_path="/usr/lib/linux-tools/5.4.0-77-generic:/usr/local/sbin:..."` #### Debian -1. If you use debian for your WSL distro, use this comand instead: +1. If you use debian for your WSL distro, use this command instead: ```bash sudo apt install usbip hwdata usbutils ``` @@ -244,7 +244,7 @@ Now, run either: ```bash make MODEL=n0100 epsilon_flash ``` -to directly flash the calculator after pressing simultaneously `reset` and `6` buttons and pluging in. +to directly flash the calculator after pressing simultaneously `reset` and `6` buttons and plugging in.
@@ -253,7 +253,7 @@ or: ```bash make MODEL=n0100 OMEGA_USERNAME="" binpack -j4 ``` -to make binpack wich you can flash to the caculator from [Ti-planet's webDFU](https://ti-planet.github.io/webdfu_numworks/n0100/). Binpacks are a great way to share a custom build of Upsilon to friends. +to make binpack witch you can flash to the calculator from [Ti-planet's webDFU](https://ti-planet.github.io/webdfu_numworks/n0100/). Binpacks are a great way to share a custom build of Upsilon to friends. @@ -271,7 +271,7 @@ Now, run either: ```bash make epsilon_flash ``` -to directly flash the calculator after pressing simultaneously `reset` and `6` buttons and pluging in. +to directly flash the calculator after pressing simultaneously `reset` and `6` buttons and plugging in.
@@ -280,7 +280,7 @@ or: ```bash make OMEGA_USERNAME="" binpack -j4 ``` -to make binpack wich you can flash to the caculator from [Ti-planet's webDFU](https://ti-planet.github.io/webdfu_numworks/n0110/). Binpacks are a great way to share a custom build of Upsilon to friends. +to make binpack witch you can flash to the calculator from [Ti-planet's webDFU](https://ti-planet.github.io/webdfu_numworks/n0110/). Binpacks are a great way to share a custom build of Upsilon to friends. diff --git a/apps/Makefile b/apps/Makefile index 820ff690c..e1ff3c849 100644 --- a/apps/Makefile +++ b/apps/Makefile @@ -23,7 +23,7 @@ ifneq ($(strip $(apps_missing)),) $(foreach i, $(SUBMODULES_APPS), $(if $(call app_equals, $(filter $(i), $(apps_missing)), $(i)), $(eval miss_modules=1))) ifeq ($(miss_modules), 1) - PLS_IGNORE := $(shell >&2 printf "\nSome submodules apps seem to be missing. To download them, assumming you git clone'd the repo, do\n") + PLS_IGNORE := $(shell >&2 printf "\nSome submodules apps seem to be missing. To download them, assuming you git clone'd the repo, do\n") PLS_IGNORE := $(shell >&2 printf " git submodule init\n") PLS_IGNORE := $(shell >&2 printf " git submodule update\n\n") endif @@ -81,7 +81,7 @@ $(call object_for,apps/apps_container_storage.cpp apps/apps_container.cpp apps/m country_preferences = apps/country_preferences.csv language_preferences = apps/language_preferences.csv -# The header is refered to as so make sure it's findable this way +# The header is referred to as so make sure it's findable this way SFLAGS += -I$(BUILD_DIR) i18n_files += $(addprefix apps/language_,$(addsuffix .universal.i18n, $(EPSILON_I18N))) diff --git a/apps/apps_container.cpp b/apps/apps_container.cpp index 1eee9ce07..9423684e4 100644 --- a/apps/apps_container.cpp +++ b/apps/apps_container.cpp @@ -47,7 +47,7 @@ AppsContainer::AppsContainer() : * poincareCircuitBreaker is run. This means either whitelisting all Epsilon * (which makes bigger files to download and slower execution), or * whitelisting all the symbols (that's a big amount of symbols to find and - * quite painy to maintain). + * quite paint to maintain). * We just remove the circuit breaker for now. * TODO: Put the Poincare circuit breaker back on epsilon's web emulator */ @@ -319,7 +319,7 @@ void AppsContainer::run() { * destroyed from the pool. To avoid using them before packing the app * (in App::willBecomeInactive for instance), we tidy them early on. */ s_activeApp->snapshot()->tidy(); - /* When an app encoutered an exception due to a full pool, the next time + /* When an app encountered an exception due to a full pool, the next time * the user enters the app, the same exception could happen again which * would prevent from reopening the app. To avoid being stuck outside the * app causing the issue, we reset its snapshot when leaving it due to diff --git a/apps/backlight_dimming_timer.cpp b/apps/backlight_dimming_timer.cpp index efce3e871..0d98d2749 100644 --- a/apps/backlight_dimming_timer.cpp +++ b/apps/backlight_dimming_timer.cpp @@ -9,7 +9,7 @@ BacklightDimmingTimer::BacklightDimmingTimer() : bool BacklightDimmingTimer::fire() { if (m_dimerExecutions == 0) { m_brightnessLevel = GlobalPreferences::sharedGlobalPreferences()->brightnessLevel(); - m_dimerSteps = m_brightnessLevel / decreaseby; + m_dimerSteps = m_brightnessLevel / decreaseBy; m_timeToSleep = decreasetime / m_dimerSteps; m_period = m_timeToSleep / Timer::TickDuration; if (m_period == 0) { diff --git a/apps/backlight_dimming_timer.h b/apps/backlight_dimming_timer.h index 029891eae..1502ea2dc 100644 --- a/apps/backlight_dimming_timer.h +++ b/apps/backlight_dimming_timer.h @@ -10,7 +10,7 @@ public: private: constexpr static int k_idleBeforeDimmingDuration = 30*1000; // In miliseconds constexpr static int k_dimBacklightBrightness = 0; - constexpr static int decreaseby = 15; + constexpr static int decreaseBy = 15; constexpr static int decreasetime = 1*1000; // In miliseconds int m_dimerExecutions = 0; int m_brightnessLevel; diff --git a/apps/calculation/calculation_store.cpp b/apps/calculation/calculation_store.cpp index e0dcc12f1..a2ae0b3e8 100644 --- a/apps/calculation/calculation_store.cpp +++ b/apps/calculation/calculation_store.cpp @@ -25,7 +25,7 @@ CalculationStore::CalculationStore(char * buffer, int size) : // Returns an expiring pointer to the calculation of index i ExpiringPointer CalculationStore::calculationAtIndex(int i) { assert(i >= 0 && i < m_numberOfCalculations); - // m_buffer is the adress of the oldest calculation in calculation store + // m_buffer is the address of the oldest calculation in calculation store Calculation * c = (Calculation *) m_buffer; if (i != m_numberOfCalculations-1) { // The calculation we want is not the oldest one so we get its pointer @@ -100,9 +100,9 @@ ExpiringPointer CalculationStore::push(const char * text, Context * numberOfSignificantDigits = Poincare::Preferences::sharedPreferences()->numberOfSignificantDigits(); } if (!pushSerializeExpression(outputs[i], beginingOfFreeSpace, &endOfFreeSpace, numberOfSignificantDigits)) { - /* If the exat/approximate output does not fit in the store (event if the + /* If the exact/approximate output does not fit in the store (event if the * current calculation is the only calculation), replace the output with - * undef if it fits, else replace the whole calcualtion with undef. */ + * undef if it fits, else replace the whole calculation with undef. */ Expression undef = Undefined::Builder(); if (!pushSerializeExpression(undef, beginingOfFreeSpace, &endOfFreeSpace)) { return emptyStoreAndPushUndef(context, heightComputer); @@ -177,8 +177,8 @@ Expression CalculationStore::ansExpression(Context * context) { * parsed), ans is replaced by the approximation output when any Store or * Equal expression appears. */ Expression e = mostRecentCalculation->exactOutput(); - bool exactOuptutInvolvesStoreEqual = e.type() == ExpressionNode::Type::Store || e.type() == ExpressionNode::Type::Equal; - if (mostRecentCalculation->input().recursivelyMatches(Expression::IsApproximate, context) || exactOuptutInvolvesStoreEqual) { + bool exactOutputInvolvesStoreEqual = e.type() == ExpressionNode::Type::Store || e.type() == ExpressionNode::Type::Equal; + if (mostRecentCalculation->input().recursivelyMatches(Expression::IsApproximate, context) || exactOutputInvolvesStoreEqual) { return mostRecentCalculation->approximateOutput(context, Calculation::NumberOfSignificantDigits::Maximal); } return mostRecentCalculation->exactOutput(); diff --git a/apps/code/catalog.en.i18n b/apps/code/catalog.en.i18n index b0ff6c784..472ba88cc 100644 --- a/apps/code/catalog.en.i18n +++ b/apps/code/catalog.en.i18n @@ -169,7 +169,7 @@ PythonTurtlePosition = "Return the current (x,y) location" PythonTurtleReset = "Reset the drawing" PythonTurtleRight = "Turn right by a degrees" PythonTurtleSetheading = "Set the orientation to a degrees" -PythonTurtleSetposition = "Positionne la tortue" +PythonTurtleSetposition = "Positioning the turtle" PythonTurtleShowturtle = "Show the turtle" PythonTurtleSpeed = "Drawing speed between 0 and 10" PythonTurtleWrite = "Display a text" diff --git a/apps/code/catalog.es.i18n b/apps/code/catalog.es.i18n index b6e2c8704..4b7401d3e 100644 --- a/apps/code/catalog.es.i18n +++ b/apps/code/catalog.es.i18n @@ -169,7 +169,7 @@ PythonTurtlePosition = "Return the current (x,y) location" PythonTurtleReset = "Reset the drawing" PythonTurtleRight = "Turn right by a degrees" PythonTurtleSetheading = "Set the orientation to a degrees" -PythonTurtleSetposition = "Positionne la tortue" +PythonTurtleSetposition = "Colocar la tortuga" PythonTurtleShowturtle = "Show the turtle" PythonTurtleSpeed = "Drawing speed between 0 and 10" PythonTurtleWrite = "Display a text" diff --git a/apps/code/catalog.pt.i18n b/apps/code/catalog.pt.i18n index 4245cc850..ba1a27311 100644 --- a/apps/code/catalog.pt.i18n +++ b/apps/code/catalog.pt.i18n @@ -169,7 +169,7 @@ PythonTurtlePosition = "Devolve a posição atual (x,y)" PythonTurtleReset = "Reiniciar o desenho" PythonTurtleRight = "Virar à esquerda por a graus" PythonTurtleSetheading = "Definir a orientação por a graus" -PythonTurtleSetposition = "Positionne la tortue" +PythonTurtleSetposition = "Posicionamento da tartaruga" PythonTurtleShowturtle = "Mostrar o turtle" PythonTurtleSpeed = "Velocidade do desenho entre 0 e 10" PythonTurtleWrite = "Mostrar um texto" diff --git a/apps/code/test/variable_box_controller.cpp b/apps/code/test/variable_box_controller.cpp index 482ab84f6..4dec7e43a 100644 --- a/apps/code/test/variable_box_controller.cpp +++ b/apps/code/test/variable_box_controller.cpp @@ -40,7 +40,7 @@ void assert_variables_are(const char * script, const char * nameToComplete, cons &addParentheses, i, &index); - quiz_assert(i == index); // If false, the autompletion has cycled: there are not as many results as expected + quiz_assert(i == index); // If false, the autocompletion has cycled: there are not as many results as expected quiz_assert(strncmp(*(expectedVariables + i), autocompletionI - nameToCompleteLength, textToInsertLength + nameToCompleteLength) == 0); index++; } diff --git a/apps/code/variable_box_controller.cpp b/apps/code/variable_box_controller.cpp index 5f3e73bcc..31604b671 100644 --- a/apps/code/variable_box_controller.cpp +++ b/apps/code/variable_box_controller.cpp @@ -516,7 +516,7 @@ void VariableBoxController::loadBuiltinNodes(const char * textToAutocomplete, in assert(sizeof(builtinNames) / sizeof(builtinNames[0]) == k_totalBuiltinNodesCount); for (int i = 0; i < k_totalBuiltinNodesCount; i++) { if (addNodeIfMatches(textToAutocomplete, textToAutocompleteLength, builtinNames[i].type, NodeOrigin::Builtins, builtinNames[i].name)) { - /* We can leverage on the fact that buitin nodes are stored in + /* We can leverage on the fact that builtin nodes are stored in * alphabetical order. */ return; } @@ -575,7 +575,7 @@ void VariableBoxController::loadImportedVariablesInScript(const char * scriptCon } void VariableBoxController::loadCurrentVariablesInScript(const char * scriptContent, const char * textToAutocomplete, int textToAutocompleteLength) { - /* To find variable and funtion names: we lex the script and keep all + /* To find variable and function names: we lex the script and keep all * MP_TOKEN_NAME that complete the text to autocomplete and are not already in * the builtins or imported scripts. */ @@ -653,7 +653,7 @@ void VariableBoxController::loadGlobalAndImportedVariablesInScriptAsImported(Scr /* At this point, if the script node is not of type "file_input_2", it * will not have main structures of the wanted type. * We look for structures at first level (not inside nested scopes) that - * are either dunction definitions, variables statements or imports. */ + * are either function definitions, variables statements or imports. */ size_t n = MP_PARSE_NODE_STRUCT_NUM_NODES(pns); for (size_t i = 0; i < n; i++) { mp_parse_node_t child = pns->nodes[i]; @@ -826,15 +826,15 @@ bool VariableBoxController::importationSourceIsModule(const char * sourceName, c return mp_module_get(qstr_from_str(sourceName)) != MP_OBJ_NULL; } -bool VariableBoxController::importationSourceIsScript(const char * sourceName, const char * * scriptFullName, Script * retreivedScript) { +bool VariableBoxController::importationSourceIsScript(const char * sourceName, const char * * scriptFullName, Script * retrievedScript) { // Try fetching the nodes from a script Script importedScript = ScriptStore::ScriptBaseNamed(sourceName); if (importedScript.isNull()) { return false; } *scriptFullName = importedScript.fullName(); - if (retreivedScript != nullptr) { - *retreivedScript = importedScript; + if (retrievedScript != nullptr) { + *retrievedScript = importedScript; } return true; } diff --git a/apps/code/variable_box_controller.h b/apps/code/variable_box_controller.h index f20b64091..eb25b0544 100644 --- a/apps/code/variable_box_controller.h +++ b/apps/code/variable_box_controller.h @@ -92,7 +92,7 @@ private: bool addNodesFromImportMaybe(mp_parse_node_struct_t * parseNode, const char * textToAutocomplete, int textToAutocompleteLength, bool importFromModules = true); const char * importationSourceNameFromNode(mp_parse_node_t & node); bool importationSourceIsModule(const char * sourceName, const ToolboxMessageTree * * moduleChildren = nullptr, int * numberOfModuleChildren = nullptr); - bool importationSourceIsScript(const char * sourceName, const char * * scriptFullName, Script * retreivedScript = nullptr); + bool importationSourceIsScript(const char * sourceName, const char * * scriptFullName, Script * retrievedScript = nullptr); bool addImportStructFromScript(mp_parse_node_struct_t * pns, uint structKind, const char * scriptName, const char * textToAutocomplete, int textToAutocompleteLength); /* Add a node if it completes the text to autocomplete and if it is not * already contained in the variable box. The returned boolean means we diff --git a/apps/graph/values/values_controller.cpp b/apps/graph/values/values_controller.cpp index d5783efce..56bebd1c1 100644 --- a/apps/graph/values/values_controller.cpp +++ b/apps/graph/values/values_controller.cpp @@ -343,7 +343,7 @@ EvenOddBufferTextCell * ValuesController::floatCells(int j) { /* ValuesController::ValuesSelectableTableView */ -int writeMatrixBrakets(char * buffer, const int bufferSize, int type) { +int writeMatrixBrackets(char * buffer, const int bufferSize, int type) { /* Write the double brackets required in matrix notation. * - type == 1: "[[" * - type == 0: "][" @@ -365,14 +365,14 @@ bool ValuesController::ValuesSelectableTableView::handleEvent(Ion::Events::Event constexpr int bufferSize = 2*PrintFloat::k_maxFloatCharSize + 6; // "[[a][b]]" gives 6 characters in addition to the 2 floats char buffer[bufferSize]; int currentChar = 0; - currentChar += writeMatrixBrakets(buffer + currentChar, bufferSize - currentChar, -1); + currentChar += writeMatrixBrackets(buffer + currentChar, bufferSize - currentChar, -1); assert(currentChar < bufferSize-1); size_t semiColonPosition = UTF8Helper::CopyUntilCodePoint(buffer+currentChar, TextField::maxBufferSize() - currentChar, text+1, ';'); currentChar += semiColonPosition; - currentChar += writeMatrixBrakets(buffer + currentChar, bufferSize - currentChar, 0); + currentChar += writeMatrixBrackets(buffer + currentChar, bufferSize - currentChar, 0); assert(currentChar < bufferSize-1); currentChar += UTF8Helper::CopyUntilCodePoint(buffer+currentChar, TextField::maxBufferSize() - currentChar, text+1+semiColonPosition+1, ')'); - currentChar += writeMatrixBrakets(buffer + currentChar, bufferSize - currentChar, 1); + currentChar += writeMatrixBrackets(buffer + currentChar, bufferSize - currentChar, 1); assert(currentChar < bufferSize-1); buffer[currentChar] = 0; Clipboard::sharedClipboard()->store(buffer); diff --git a/apps/home/Makefile b/apps/home/Makefile index 880302a52..d23bcdc30 100644 --- a/apps/home/Makefile +++ b/apps/home/Makefile @@ -12,7 +12,7 @@ i18n_files += $(call i18n_without_universal_for,home/base) # Apps layout file generation -# The header is refered to as so make sure it's +# The header is referred to as so make sure it's # findable this way SFLAGS += -I$(BUILD_DIR) diff --git a/apps/home/base.de.i18n b/apps/home/base.de.i18n index a0fc91420..e36077148 100644 --- a/apps/home/base.de.i18n +++ b/apps/home/base.de.i18n @@ -1,4 +1,4 @@ Apps = "Anwendungen" AppsCapital = "UPSILON" -ForbidenAppInExamMode1 = "Diese Anwendung ist im" -ForbidenAppInExamMode2 = "Prüfungsmodus nicht erlaubt." +ForbiddenAppInExamMode1 = "Diese Anwendung ist im" +ForbiddenAppInExamMode2 = "Prüfungsmodus nicht erlaubt." diff --git a/apps/home/base.en.i18n b/apps/home/base.en.i18n index 3468cca66..2a65458e8 100644 --- a/apps/home/base.en.i18n +++ b/apps/home/base.en.i18n @@ -1,4 +1,4 @@ Apps = "Applications" AppsCapital = "UPSILON" -ForbidenAppInExamMode1 = "This application is" -ForbidenAppInExamMode2 = "forbidden in exam mode" +ForbiddenAppInExamMode1 = "This application is" +ForbiddenAppInExamMode2 = "forbidden in exam mode" diff --git a/apps/home/base.es.i18n b/apps/home/base.es.i18n index 3c262497c..8d71a3229 100644 --- a/apps/home/base.es.i18n +++ b/apps/home/base.es.i18n @@ -1,4 +1,4 @@ Apps = "Aplicaciones" AppsCapital = "UPSILON" -ForbidenAppInExamMode1 = "Esta aplicación está prohibida" -ForbidenAppInExamMode2 = "en el modo de examen" +ForbiddenAppInExamMode1 = "Esta aplicación está prohibida" +ForbiddenAppInExamMode2 = "en el modo de examen" diff --git a/apps/home/base.fr.i18n b/apps/home/base.fr.i18n index 4b4ab02dd..8c7270e05 100644 --- a/apps/home/base.fr.i18n +++ b/apps/home/base.fr.i18n @@ -1,4 +1,4 @@ Apps = "Applications" AppsCapital = "UPSILON" -ForbidenAppInExamMode1 = "Cette application n'est" -ForbidenAppInExamMode2 = "pas autorisée en mode examen." +ForbiddenAppInExamMode1 = "Cette application n'est" +ForbiddenAppInExamMode2 = "pas autorisée en mode examen." diff --git a/apps/home/base.hu.i18n b/apps/home/base.hu.i18n index d526193eb..aa3c0f1e3 100644 --- a/apps/home/base.hu.i18n +++ b/apps/home/base.hu.i18n @@ -1,4 +1,4 @@ Apps = "Alkalmazások" AppsCapital = "UPSILON" -ForbidenAppInExamMode1 = "Ez az alkalmazás" -ForbidenAppInExamMode2 = "tilos vizsga módban" +ForbiddenAppInExamMode1 = "Ez az alkalmazás" +ForbiddenAppInExamMode2 = "tilos vizsga módban" diff --git a/apps/home/base.it.i18n b/apps/home/base.it.i18n index 4bd26ced3..a4bf01054 100644 --- a/apps/home/base.it.i18n +++ b/apps/home/base.it.i18n @@ -1,4 +1,4 @@ Apps = "Applicazioni" AppsCapital = "UPSILON" -ForbidenAppInExamMode1 = "Questa applicazione è" -ForbidenAppInExamMode2 = "proibita nella modalità d'esame" +ForbiddenAppInExamMode1 = "Questa applicazione è" +ForbiddenAppInExamMode2 = "proibita nella modalità d'esame" diff --git a/apps/home/base.nl.i18n b/apps/home/base.nl.i18n index 496e8d6a3..4e9b4470e 100644 --- a/apps/home/base.nl.i18n +++ b/apps/home/base.nl.i18n @@ -1,4 +1,4 @@ Apps = "Applicaties" AppsCapital = "UPSILON" -ForbidenAppInExamMode1 = "Deze applicatie is" -ForbidenAppInExamMode2 = "uitgesloten in examenstand" +ForbiddenAppInExamMode1 = "Deze applicatie is" +ForbiddenAppInExamMode2 = "uitgesloten in examenstand" diff --git a/apps/home/base.pt.i18n b/apps/home/base.pt.i18n index 6c074aa86..7f5c4d004 100644 --- a/apps/home/base.pt.i18n +++ b/apps/home/base.pt.i18n @@ -1,4 +1,4 @@ Apps = "Aplicações" AppsCapital = "UPSILON" -ForbidenAppInExamMode1 = "Esta aplicação é" -ForbidenAppInExamMode2 = "proibida no Modo de Exame" +ForbiddenAppInExamMode1 = "Esta aplicação é" +ForbiddenAppInExamMode2 = "proibida no Modo de Exame" diff --git a/apps/home/controller.cpp b/apps/home/controller.cpp index df725f10f..a79700b3f 100644 --- a/apps/home/controller.cpp +++ b/apps/home/controller.cpp @@ -94,7 +94,7 @@ bool Controller::handleEvent(Ion::Events::Event event) { #ifdef HOME_DISPLAY_EXTERNALS if (index >= container->numberOfApps()) { if (GlobalPreferences::sharedGlobalPreferences()->examMode() == GlobalPreferences::ExamMode::Dutch || GlobalPreferences::sharedGlobalPreferences()->examMode() == GlobalPreferences::ExamMode::NoSymNoText || GlobalPreferences::sharedGlobalPreferences()->examMode() == GlobalPreferences::ExamMode::NoSym) { - App::app()->displayWarning(I18n::Message::ForbidenAppInExamMode1, I18n::Message::ForbidenAppInExamMode2); + App::app()->displayWarning(I18n::Message::ForbiddenAppInExamMode1, I18n::Message::ForbiddenAppInExamMode2); } else { External::Archive::File executable; if (External::Archive::executableAtIndex(index - container->numberOfApps(), executable)) { @@ -120,7 +120,7 @@ bool Controller::handleEvent(Ion::Events::Event event) { #endif ::App::Snapshot * selectedSnapshot = container->appSnapshotAtIndex(index); if (ExamModeConfiguration::appIsForbiddenInExamMode(selectedSnapshot->descriptor()->examinationLevel(), GlobalPreferences::sharedGlobalPreferences()->examMode())) { - App::app()->displayWarning(I18n::Message::ForbidenAppInExamMode1, I18n::Message::ForbidenAppInExamMode2); + App::app()->displayWarning(I18n::Message::ForbiddenAppInExamMode1, I18n::Message::ForbiddenAppInExamMode2); } else { bool switched = container->switchTo(selectedSnapshot); assert(switched); diff --git a/apps/math_toolbox.cpp b/apps/math_toolbox.cpp index da06d0bb6..1ff78b681 100644 --- a/apps/math_toolbox.cpp +++ b/apps/math_toolbox.cpp @@ -30,7 +30,7 @@ const ToolboxMessageTree calculChildren[] = { const ToolboxMessageTree complexChildren[] = { ToolboxMessageTree::Leaf(I18n::Message::AbsCommandWithArg,I18n::Message::ComplexAbsoluteValue), - ToolboxMessageTree::Leaf(I18n::Message::ArgCommandWithArg, I18n::Message::Agument), + ToolboxMessageTree::Leaf(I18n::Message::ArgCommandWithArg, I18n::Message::Argument), ToolboxMessageTree::Leaf(I18n::Message::ReCommandWithArg, I18n::Message::RealPart), ToolboxMessageTree::Leaf(I18n::Message::ImCommandWithArg, I18n::Message::ImaginaryPart), ToolboxMessageTree::Leaf(I18n::Message::ConjCommandWithArg, I18n::Message::Conjugate) @@ -252,7 +252,7 @@ const ToolboxMessageTree unitEnergyElectronVoltChildren[] = { }; const ToolboxMessageTree unitEnergyChildren[] = { ToolboxMessageTree::Node(I18n::Message::UnitEnergyJouleMenu, unitEnergyJouleChildren), - ToolboxMessageTree::Node(I18n::Message::UnitEnergyEletronVoltMenu, unitEnergyElectronVoltChildren)}; + ToolboxMessageTree::Node(I18n::Message::UnitEnergyElectronVoltMenu, unitEnergyElectronVoltChildren)}; const ToolboxMessageTree unitPowerWattChildren[] = { ToolboxMessageTree::Leaf(I18n::Message::UnitPowerWattMicroSymbol, I18n::Message::UnitPowerWattMicro), diff --git a/apps/probability/calculation_controller.cpp b/apps/probability/calculation_controller.cpp index 2d4ddd1b6..3b69a7b3f 100644 --- a/apps/probability/calculation_controller.cpp +++ b/apps/probability/calculation_controller.cpp @@ -183,7 +183,7 @@ void CalculationController::willDisplayCellAtLocation(HighlightCell * cell, int constexpr int precision = Preferences::LargeNumberOfSignificantDigits; constexpr int bufferSize = PrintFloat::charSizeForFloatsWithPrecision(precision); char buffer[bufferSize]; - // FIXME: Leo has not decided yet if we should use the prefered mode instead of always using scientific mode + // FIXME: Leo has not decided yet if we should use the preferred mode instead of always using scientific mode PoincareHelpers::ConvertFloatToTextWithDisplayMode(m_calculation->parameterAtIndex(i-1), buffer, bufferSize, precision, Preferences::PrintFloatMode::Decimal); field->setText(buffer); } diff --git a/apps/probability/distribution/distribution.cpp b/apps/probability/distribution/distribution.cpp index aae3631d0..d9872d177 100644 --- a/apps/probability/distribution/distribution.cpp +++ b/apps/probability/distribution/distribution.cpp @@ -134,7 +134,7 @@ double Distribution::cumulativeDistributiveInverseForProbabilityUsingIncreasingF * the given ax bx bounds */ if (!(std::isnan(result.x2()) || std::fabs(result.x2()) <= FLT_EPSILON || std::fabs(result.x1()- ax) < FLT_EPSILON || std::fabs(result.x1() - bx) < FLT_EPSILON)) { /* TODO We would like to put this as an assertion, but sometimes we do get - * false result: we replace them with inf to make the problem obvisous to + * false result: we replace them with inf to make the problem obvious to * the student. */ return *probability > 0.5 ? INFINITY : -INFINITY; } diff --git a/apps/probability/distribution/student_distribution.cpp b/apps/probability/distribution/student_distribution.cpp index bdeb1acf8..a4e6617d8 100644 --- a/apps/probability/distribution/student_distribution.cpp +++ b/apps/probability/distribution/student_distribution.cpp @@ -33,7 +33,7 @@ double StudentDistribution::cumulativeDistributiveFunctionAtAbscissa(double x) c if (std::isinf(x)) { return x > 0 ? 1.0 : 0.0; } - /* TODO There are some computation errors, where the probability falsly jumps to 1. + /* TODO There are some computation errors, where the probability falsy jumps to 1. * k = 0.001 and P(x < 42000000) (for 41000000 it is around 0.5) * k = 0.01 and P(x < 8400000) (for 41000000 it is around 0.6) */ const double k = m_parameter1; diff --git a/apps/reader/tex_parser.cpp b/apps/reader/tex_parser.cpp index f2b69afee..fe105176d 100644 --- a/apps/reader/tex_parser.cpp +++ b/apps/reader/tex_parser.cpp @@ -27,7 +27,7 @@ namespace Reader { // List of available Function Commands that don't require a specific handling static constexpr char const * k_FunctionCommands[] = { - "arcos", "arcsin", "arctan", "arg", "cos", "cosh", "cot", "coth", + "arccos", "arcsin", "arctan", "arg", "cos", "cosh", "cot", "coth", "csc", "deg", "det", "dim", "exp", "gcd", "hom", "inf", "ker", "lg", "lim", "liminf", "limsup", "ln", "log", "max", "min", "Pr", "sec", "sin", "sinh", "sup", "tan", "tanh" diff --git a/apps/regression/go_to_parameter_controller.cpp b/apps/regression/go_to_parameter_controller.cpp index 461f98bfa..984ebbfcd 100644 --- a/apps/regression/go_to_parameter_controller.cpp +++ b/apps/regression/go_to_parameter_controller.cpp @@ -67,7 +67,7 @@ bool GoToParameterController::confirmParameterAtIndex(int parameterIndex, double } else { double yFromX = m_store->modelForSeries(series)->evaluate(m_store->coefficientsForSeries(series, globContext), unknown); /* We here compute y2 = a*((y1-b)/a)+b, which does not always give y1, - * because of computation precision. y2 migth thus be invalid. */ + * because of computation precision. y2 might thus be invalid. */ if (std::isnan(yFromX) || std::isinf(yFromX)) { Container::activeApp()->displayWarning(I18n::Message::ForbiddenValue); return false; diff --git a/apps/regression/model/model.h b/apps/regression/model/model.h index 1b36fa6a8..149cad00b 100644 --- a/apps/regression/model/model.h +++ b/apps/regression/model/model.h @@ -45,7 +45,7 @@ protected: Poincare::Layout m_layout; private: // Model attributes - virtual Poincare::Expression expression(double * modelCoefficients) { return Poincare::Expression(); } // expression is overrided only by Models that do not override levelSet + virtual Poincare::Expression expression(double * modelCoefficients) { return Poincare::Expression(); } // expression is overridden only by Models that do not override levelSet virtual double partialDerivate(double * modelCoefficients, int derivateCoefficientIndex, double x) const = 0; // Levenberg-Marquardt diff --git a/apps/regression/test/model.cpp b/apps/regression/test/model.cpp index eebec4776..4fcb7cdb1 100644 --- a/apps/regression/test/model.cpp +++ b/apps/regression/test/model.cpp @@ -190,7 +190,7 @@ QUIZ_CASE(power_regression) { // assert_regression_is(x2, y2, 4, Model::Type::Power, coefficients2, r22); } -void assert_trigonomatric_regression_is(double * xi, double * yi, int numberOfPoints, double * trueCoefficients, double trueR2, Poincare::Preferences::AngleUnit trueCoeffcientsUnit) { +void assert_trigonometric_regression_is(double * xi, double * yi, int numberOfPoints, double * trueCoefficients, double trueR2, Poincare::Preferences::AngleUnit trueCoeffcientsUnit) { // Test the trigonometric regression at all angle units const Preferences::AngleUnit previousAngleUnit = Preferences::sharedPreferences()->angleUnit(); const Poincare::Preferences::AngleUnit units[3] = {Poincare::Preferences::AngleUnit::Radian, Poincare::Preferences::AngleUnit::Degree, Poincare::Preferences::AngleUnit::Gradian}; @@ -214,7 +214,7 @@ QUIZ_CASE(trigonometric_regression1) { int numberOfPoints = sizeof(x) / sizeof(double); assert(sizeof(y) == sizeof(double) * numberOfPoints); - assert_trigonomatric_regression_is(x, y, numberOfPoints, coefficients, r2, Poincare::Preferences::AngleUnit::Radian); + assert_trigonometric_regression_is(x, y, numberOfPoints, coefficients, r2, Poincare::Preferences::AngleUnit::Radian); } QUIZ_CASE(trigonometric_regression2) { @@ -225,7 +225,7 @@ QUIZ_CASE(trigonometric_regression2) { int numberOfPoints = sizeof(x) / sizeof(double); assert(sizeof(y) == sizeof(double) * numberOfPoints); - assert_trigonomatric_regression_is(x, y, numberOfPoints, coefficients, r2, Poincare::Preferences::AngleUnit::Radian); + assert_trigonometric_regression_is(x, y, numberOfPoints, coefficients, r2, Poincare::Preferences::AngleUnit::Radian); } diff --git a/apps/sequence/list/type_parameter_controller.cpp b/apps/sequence/list/type_parameter_controller.cpp index e7ad0c56e..90cee0d7c 100644 --- a/apps/sequence/list/type_parameter_controller.cpp +++ b/apps/sequence/list/type_parameter_controller.cpp @@ -17,7 +17,7 @@ TypeParameterController::TypeParameterController(Responder * parentResponder, Li ViewController(parentResponder), m_explicitCell(&m_selectableTableView, I18n::Message::Explicit, cellLayout), m_singleRecurrenceCell(&m_selectableTableView, I18n::Message::SingleRecurrence, cellLayout), - m_doubleRecurenceCell(&m_selectableTableView, I18n::Message::DoubleRecurrence, cellLayout), + m_doubleRecurrenceCell(&m_selectableTableView, I18n::Message::DoubleRecurrence, cellLayout), m_layouts{}, m_selectableTableView(this), m_record(), @@ -100,7 +100,7 @@ int TypeParameterController::numberOfRows() const { HighlightCell * TypeParameterController::reusableCell(int index) { assert(index >= 0); assert(index < k_totalNumberOfCell); - HighlightCell * cells[] = {&m_explicitCell, &m_singleRecurrenceCell, &m_doubleRecurenceCell}; + HighlightCell * cells[] = {&m_explicitCell, &m_singleRecurrenceCell, &m_doubleRecurrenceCell}; return cells[index]; } diff --git a/apps/sequence/list/type_parameter_controller.h b/apps/sequence/list/type_parameter_controller.h index f6bf68862..f4d18d3ac 100644 --- a/apps/sequence/list/type_parameter_controller.h +++ b/apps/sequence/list/type_parameter_controller.h @@ -36,7 +36,7 @@ private: constexpr static int k_totalNumberOfCell = 3; ExpressionTableCellWithPointer m_explicitCell; ExpressionTableCellWithPointer m_singleRecurrenceCell; - ExpressionTableCellWithPointer m_doubleRecurenceCell; + ExpressionTableCellWithPointer m_doubleRecurrenceCell; Poincare::Layout m_layouts[k_totalNumberOfCell]; SelectableTableView m_selectableTableView; Ion::Storage::Record m_record; diff --git a/apps/sequence/test/sequence.cpp b/apps/sequence/test/sequence.cpp index fb729ab14..3a390d6a6 100644 --- a/apps/sequence/test/sequence.cpp +++ b/apps/sequence/test/sequence.cpp @@ -47,7 +47,7 @@ void check_sequences_defined_by(double result[MaxNumberOfSequences][10], Sequenc } } store->removeAll(); - /* The store is a global variable that has been contructed through + /* The store is a global variable that has been constructed through * GlobalContext::sequenceStore singleton. It won't be destructed. However, * we need to make sure that the pool is empty between quiz_cases. */ store->tidy(); diff --git a/apps/settings/sub_menu/about_controller_non_official.cpp b/apps/settings/sub_menu/about_controller_non_official.cpp index 52e111eb5..cedd20636 100644 --- a/apps/settings/sub_menu/about_controller_non_official.cpp +++ b/apps/settings/sub_menu/about_controller_non_official.cpp @@ -5,7 +5,7 @@ namespace Settings { void AboutController::viewWillAppear() { GenericSubController::viewWillAppear(); - // IN OMEGA, THE FOLLOWING LINES ARE ADDED IN A SUBMENU "LEGAL INFORMATION", BECAUSE MESSAGES DELETE THE SCROLLBAR. + // IN UPSILON, THE FOLLOWING LINES ARE ADDED IN A SUBMENU "LEGAL INFORMATION", BECAUSE MESSAGES DELETE THE SCROLLBAR. // --------------------- Please don't edit these lines ---------------------- I18n::Message cautionMessages[] = {I18n::Message::AboutWarning1, I18n::Message::AboutWarning2, I18n::Message::AboutWarning3, I18n::Message::AboutWarning4}; // m_view.setMessages(cautionMessages, sizeof(cautionMessages)/sizeof(I18n::Message)); diff --git a/apps/settings/sub_menu/usb_protection_controller.cpp b/apps/settings/sub_menu/usb_protection_controller.cpp index 734cf95fa..08dc94f23 100644 --- a/apps/settings/sub_menu/usb_protection_controller.cpp +++ b/apps/settings/sub_menu/usb_protection_controller.cpp @@ -63,15 +63,15 @@ void UsbInfoController::willDisplayCellForIndex(HighlightCell *cell, int index) SwitchView *mySwitch = (SwitchView *)myCell->accessoryView(); mySwitch->setState(!GlobalPreferences::sharedGlobalPreferences()->dfuUnlocked()); } else if (index == 1) { - MessageTableCellWithChevronAndMessage *mcell = (MessageTableCellWithChevronAndMessage *)cell; + MessageTableCellWithChevronAndMessage *m_cell = (MessageTableCellWithChevronAndMessage *)cell; int currentLevel = GlobalPreferences::sharedGlobalPreferences()->dfuLevel(); if (currentLevel == 0) { - mcell->setSubtitle(I18n::Message::USBDefaultLevelDesc); + m_cell->setSubtitle(I18n::Message::USBDefaultLevelDesc); } else if (currentLevel == 1) {; - mcell->setSubtitle(I18n::Message::USBLowLevelDesc); + m_cell->setSubtitle(I18n::Message::USBLowLevelDesc); } else { assert(currentLevel == 2); - mcell->setSubtitle(I18n::Message::USBParanoidLevelDesc); + m_cell->setSubtitle(I18n::Message::USBParanoidLevelDesc); } } } diff --git a/apps/shared/double_pair_store.cpp b/apps/shared/double_pair_store.cpp index b35c56de7..f78d4f081 100644 --- a/apps/shared/double_pair_store.cpp +++ b/apps/shared/double_pair_store.cpp @@ -115,15 +115,15 @@ bool DoublePairStore::seriesNumberOfAbscissaeGreaterOrEqualTo(int series, int i) if (count >= i) { return true; } - double currentAbsissa = m_data[series][0][j]; - bool firstOccurence = true; + double currentAbscissa = m_data[series][0][j]; + bool firstOccurrence = true; for (int k = 0; k < j; k++) { - if (m_data[series][0][k] == currentAbsissa) { - firstOccurence = false; + if (m_data[series][0][k] == currentAbscissa) { + firstOccurrence = false; break; } } - if (firstOccurence) { + if (firstOccurrence) { count++; } } diff --git a/apps/shared/expression_model.cpp b/apps/shared/expression_model.cpp index 54170b644..ab7dd0d09 100644 --- a/apps/shared/expression_model.cpp +++ b/apps/shared/expression_model.cpp @@ -143,7 +143,7 @@ Ion::Storage::Record::ErrorStatus ExpressionModel::setExpressionContent(Ion::Sto // Set the data with the right size newData.size = newDataSize; error = record->setValue(newData); - // Any error would have occured at the first call to setValue + // Any error would have occurred at the first call to setValue assert(error == Ion::Storage::Record::ErrorStatus::None); /* Here we delete only the elements relative to the expression model kept in diff --git a/apps/shared/global_context.cpp b/apps/shared/global_context.cpp index 5df988953..bf8c3cdb4 100644 --- a/apps/shared/global_context.cpp +++ b/apps/shared/global_context.cpp @@ -134,7 +134,7 @@ const Expression GlobalContext::ExpressionForSequence(const SymbolAbstract & sym } else if (!std::isnan(unknownSymbolValue)) { /* If unknownSymbolValue is not nan, then we are in the graph app. In order * to allow functions like f(x) = u(x+0.5) to be ploted, we need to - * approximate the rank and check if it is an integer. Unfortunatly this + * approximate the rank and check if it is an integer. Unfortunately this * leads to some edge cases were, because of quantification, we have * floor(x) = x while x is not integer.*/ rankIsInteger = std::floor(rankValue) == rankValue; diff --git a/apps/shared/sequence_context.h b/apps/shared/sequence_context.h index 83c8d8e9f..f2995a58e 100644 --- a/apps/shared/sequence_context.h +++ b/apps/shared/sequence_context.h @@ -62,7 +62,7 @@ public: m_sequenceStore(sequenceStore) {} /* expressionForSymbolAbstract & setExpressionForSymbolAbstractName directly call the parent * context respective methods. Indeed, special chars like n, u(n), u(n+1), - * v(n), v(n+1) are taken into accound only when evaluating sequences which + * v(n), v(n+1) are taken into account only when evaluating sequences which * is done in another context. */ template T valueOfCommonRankSequenceAtPreviousRank(int sequenceIndex, int rank) { return static_cast*>(helper())->valueOfCommonRankSequenceAtPreviousRank(sequenceIndex, rank); diff --git a/apps/shared/store_controller.cpp b/apps/shared/store_controller.cpp index ee4244f3b..ebabb1339 100644 --- a/apps/shared/store_controller.cpp +++ b/apps/shared/store_controller.cpp @@ -232,7 +232,7 @@ bool StoreController::privateFillColumnWithFormula(Expression formula, Expressio variables[0][0] = 0; AppsContainer * appsContainer = AppsContainer::sharedAppsContainer(); int nbOfVariables = formula.getVariables(appsContainer->globalContext(), isVariable, (char *)variables, k_maxSizeOfStoreSymbols); - (void) nbOfVariables; // Remove compilation warning of nused variable + (void) nbOfVariables; // Remove compilation warning of unused variable assert(nbOfVariables >= 0); int numberOfValuesToCompute = -1; int index = 0; diff --git a/apps/shared/sum_graph_controller.cpp b/apps/shared/sum_graph_controller.cpp index 423582e90..08ddd6926 100644 --- a/apps/shared/sum_graph_controller.cpp +++ b/apps/shared/sum_graph_controller.cpp @@ -232,12 +232,12 @@ void SumGraphController::LegendView::layoutSubviews(bool force) { void SumGraphController::LegendView::layoutSubviews(Step step, bool force) { KDCoordinate width = bounds().width(); - KDCoordinate heigth = bounds().height(); + KDCoordinate height = bounds().height(); KDSize legendSize = m_legend.minimalSizeForOptimalDisplay(); if (legendSize.width() > 0) { m_sum.setFrame(KDRect(0, k_symbolHeightMargin, width-legendSize.width(), m_sum.minimalSizeForOptimalDisplay().height()), force); - m_legend.setFrame(KDRect(width-legendSize.width(), 0, legendSize.width(), heigth), force); + m_legend.setFrame(KDRect(width-legendSize.width(), 0, legendSize.width(), height), force); } else { m_sum.setFrame(bounds(), force); m_legend.setFrame(KDRectZero, force); diff --git a/apps/solver/base.de.i18n b/apps/solver/base.de.i18n index f3a416738..89b770872 100644 --- a/apps/solver/base.de.i18n +++ b/apps/solver/base.de.i18n @@ -11,7 +11,7 @@ TooManyVariables = "Es gibt zu viele Unbekannte" NonLinearSystem = "Das System ist nicht linear" Solution = "Lösung" ApproximateSolution = "Ungefähre Lösung" -SearchInverval = "Lösungssuche Intervall" +SearchInterval = "Lösungssuche Intervall" NoSolutionSystem = "Das System hat keine Lösung" NoSolutionEquation = "Die Gleichung hat keine Lösung" NoSolutionInterval = "Keine Lösung im Intervall gefunden" diff --git a/apps/solver/base.en.i18n b/apps/solver/base.en.i18n index 017cad04d..b8239dae0 100644 --- a/apps/solver/base.en.i18n +++ b/apps/solver/base.en.i18n @@ -11,7 +11,7 @@ TooManyVariables = "There are too many unknowns" NonLinearSystem = "The system is not linear" Solution = "Solution" ApproximateSolution = "Approximate solution" -SearchInverval = "Search interval" +SearchInterval = "Search interval" NoSolutionSystem = "The system has no solution" NoSolutionEquation = "The equation has no solution" NoSolutionInterval = "No solution found in the interval" diff --git a/apps/solver/base.es.i18n b/apps/solver/base.es.i18n index ea595cf2d..40c567c9d 100644 --- a/apps/solver/base.es.i18n +++ b/apps/solver/base.es.i18n @@ -11,7 +11,7 @@ TooManyVariables = "Hay demasiadas incógnitas" NonLinearSystem = "El sistema no es lineal" Solution = "Solución" ApproximateSolution = "Solución aproximada" -SearchInverval = "Intervalo de búsqueda" +SearchInterval = "Intervalo de búsqueda" NoSolutionSystem = "El sistema no tiene solución" NoSolutionEquation = "La ecuación no tiene solución" NoSolutionInterval = "Ninguna solución encontrada en el intervalo" diff --git a/apps/solver/base.fr.i18n b/apps/solver/base.fr.i18n index c337a0525..424c15cfe 100644 --- a/apps/solver/base.fr.i18n +++ b/apps/solver/base.fr.i18n @@ -11,7 +11,7 @@ TooManyVariables = "Le nombre d'inconnues est trop grand" NonLinearSystem = "Le système n'est pas linéaire" Solution = "Solution" ApproximateSolution = "Solution approchée" -SearchInverval = "Intervalle de recherche" +SearchInterval = "Intervalle de recherche" NoSolutionSystem = "Le système n'admet aucune solution" NoSolutionEquation = "L'équation n'admet aucune solution" NoSolutionInterval = "Aucune solution trouvée dans cet intervalle" diff --git a/apps/solver/base.hu.i18n b/apps/solver/base.hu.i18n index baba451b7..a36ed7ad4 100644 --- a/apps/solver/base.hu.i18n +++ b/apps/solver/base.hu.i18n @@ -11,7 +11,7 @@ TooManyVariables = "Túl sok ismeretlen van" NonLinearSystem = "A rendszer nem lineáris" Solution = "Megoldás" ApproximateSolution = "Hozzávetöleges megoldás" -SearchInverval = "Keresési intervallum" +SearchInterval = "Keresési intervallum" NoSolutionSystem = "A rendszernek nincs megoldása" NoSolutionEquation = "Az egyenletnek nincs megoldása" NoSolutionInterval = "Nincs megoldás ebben az intervallumban" diff --git a/apps/solver/base.it.i18n b/apps/solver/base.it.i18n index 5b6f79dbf..bf0848d14 100644 --- a/apps/solver/base.it.i18n +++ b/apps/solver/base.it.i18n @@ -11,7 +11,7 @@ TooManyVariables = "Il numero di incognite è troppo elevato" NonLinearSystem = "Il sistema non è lineare" Solution = "Soluzione" ApproximateSolution = "Soluzione approssimata" -SearchInverval = "Intervallo di ricerca" +SearchInterval = "Intervallo di ricerca" NoSolutionSystem = "Il sistema non ammette nessuna soluzione" NoSolutionEquation = "L'equazione non ammette nessuna soluzione" NoSolutionInterval = "Nessuna soluzione trovata dentro questo intervallo" diff --git a/apps/solver/base.nl.i18n b/apps/solver/base.nl.i18n index 89e9d3d4d..b6c838f85 100644 --- a/apps/solver/base.nl.i18n +++ b/apps/solver/base.nl.i18n @@ -11,7 +11,7 @@ TooManyVariables = "Er zijn te veel onbekenden" NonLinearSystem = "Het stelsel is niet lineair" Solution = "Oplossing" ApproximateSolution = "Benaderde oplossing" -SearchInverval = "Intervalbepaling" +SearchInterval = "Intervalbepaling" NoSolutionSystem = "Het stelsel heeft geen oplossing" NoSolutionEquation = "De vergelijking heeft geen oplossing" NoSolutionInterval = "Geen oplossing gevonden binnen het interval" diff --git a/apps/solver/base.pt.i18n b/apps/solver/base.pt.i18n index 356eaa24f..e3e0c19de 100644 --- a/apps/solver/base.pt.i18n +++ b/apps/solver/base.pt.i18n @@ -11,7 +11,7 @@ TooManyVariables = "Existem muitas incógnitas" NonLinearSystem = "O sistema não é linear" Solution = "Solução" ApproximateSolution = "Solução aproximada" -SearchInverval = "Intervalo de pesquisa" +SearchInterval = "Intervalo de pesquisa" NoSolutionSystem = "O sistema não tem solução" NoSolutionEquation = "A equação não tem solução" NoSolutionInterval = "Nenhuma solução encontrada no intervalo" diff --git a/apps/solver/equation_store.cpp b/apps/solver/equation_store.cpp index e5865a19a..30812405b 100644 --- a/apps/solver/equation_store.cpp +++ b/apps/solver/equation_store.cpp @@ -136,8 +136,8 @@ EquationStore::Error EquationStore::exactSolve(Poincare::Context * context, bool * the exact answer is given to the user. * 3) If no classic form has been found in the developped form, we need to use * numerical approximation. Therefore, to prevent precision losses, we work - * with the undevelopped form of the equation. Therefore we set reductionTarget - * to SystemForApproximation. Solutions are then numericaly approximated + * with the undeveloped form of the equation. Therefore we set reductionTarget + * to SystemForApproximation. Solutions are then numerically approximated * between the bounds provided by the user. */ EquationStore::Error EquationStore::privateExactSolve(Poincare::Context * context, bool replaceFunctionsButNotSymbols) { @@ -244,7 +244,7 @@ EquationStore::Error EquationStore::privateExactSolve(Poincare::Context * contex if (degree == 2) { // Polynomial degree <= 2 m_type = Type::PolynomialMonovariable; - error = oneDimensialPolynomialSolve(exactSolutions, exactSolutionsApproximations, polynomialCoefficients, degree, context); + error = oneDimensionalPolynomialSolve(exactSolutions, exactSolutionsApproximations, polynomialCoefficients, degree, context); } else { // Step 4. Monovariable non-polynomial or polynomial with degree > 2 m_type = Type::Monovariable; @@ -340,7 +340,7 @@ EquationStore::Error EquationStore::resolveLinearSystem(Expression exactSolution return Error::NoError; } -EquationStore::Error EquationStore::oneDimensialPolynomialSolve(Expression exactSolutions[k_maxNumberOfExactSolutions], Expression exactSolutionsApproximations[k_maxNumberOfExactSolutions], Expression coefficients[Expression::k_maxNumberOfPolynomialCoefficients], int degree, Context * context) { +EquationStore::Error EquationStore::oneDimensionalPolynomialSolve(Expression exactSolutions[k_maxNumberOfExactSolutions], Expression exactSolutionsApproximations[k_maxNumberOfExactSolutions], Expression coefficients[Expression::k_maxNumberOfPolynomialCoefficients], int degree, Context * context) { /* Equation ax^2+bx+c = 0 */ assert(degree == 2); // Compute delta = b*b-4ac @@ -441,13 +441,13 @@ void EquationStore::tidySolution() { Preferences::ComplexFormat EquationStore::updatedComplexFormat(Context * context) { Preferences::ComplexFormat complexFormat = Preferences::sharedPreferences()->complexFormat(); - if (complexFormat == Preferences::ComplexFormat::Real && isExplictlyComplex(context)) { + if (complexFormat == Preferences::ComplexFormat::Real && isExplicitlyComplex(context)) { return Preferences::ComplexFormat::Cartesian; } return complexFormat; } -bool EquationStore::isExplictlyComplex(Context * context) { +bool EquationStore::isExplicitlyComplex(Context * context) { for (int i = 0; i < numberOfDefinedModels(); i++) { if (modelForRecord(definedRecordAtIndex(i))->containsIComplex(context)) { return true; diff --git a/apps/solver/equation_store.h b/apps/solver/equation_store.h index 362392091..a473587a9 100644 --- a/apps/solver/equation_store.h +++ b/apps/solver/equation_store.h @@ -100,9 +100,9 @@ private: Error privateExactSolve(Poincare::Context * context, bool replaceFunctionsButNotSymbols); Error resolveLinearSystem(Poincare::Expression solutions[k_maxNumberOfExactSolutions], Poincare::Expression solutionApproximations[k_maxNumberOfExactSolutions], Poincare::Expression coefficients[k_maxNumberOfEquations][Poincare::Expression::k_maxNumberOfVariables], Poincare::Expression constants[k_maxNumberOfEquations], Poincare::Context * context); - Error oneDimensialPolynomialSolve(Poincare::Expression solutions[k_maxNumberOfExactSolutions], Poincare::Expression solutionApproximations[k_maxNumberOfExactSolutions], Poincare::Expression polynomialCoefficients[Poincare::Expression::k_maxNumberOfPolynomialCoefficients], int degree, Poincare::Context * context); + Error oneDimensionalPolynomialSolve(Poincare::Expression solutions[k_maxNumberOfExactSolutions], Poincare::Expression solutionApproximations[k_maxNumberOfExactSolutions], Poincare::Expression polynomialCoefficients[Poincare::Expression::k_maxNumberOfPolynomialCoefficients], int degree, Poincare::Context * context); void tidySolution(); - bool isExplictlyComplex(Poincare::Context * context); + bool isExplicitlyComplex(Poincare::Context * context); Poincare::Preferences::ComplexFormat updatedComplexFormat(Poincare::Context * context); mutable Equation m_equations[k_maxNumberOfEquations]; diff --git a/apps/solver/interval_controller.cpp b/apps/solver/interval_controller.cpp index 986f5b4cf..9f83a9685 100644 --- a/apps/solver/interval_controller.cpp +++ b/apps/solver/interval_controller.cpp @@ -57,7 +57,7 @@ IntervalController::IntervalController(Responder * parentResponder, InputEventHa } const char * IntervalController::title() { - return I18n::translate(I18n::Message::SearchInverval); + return I18n::translate(I18n::Message::SearchInterval); } int IntervalController::numberOfRows() const { diff --git a/apps/solver/solutions_controller.cpp b/apps/solver/solutions_controller.cpp index 8e5e985dc..59bd8a951 100644 --- a/apps/solver/solutions_controller.cpp +++ b/apps/solver/solutions_controller.cpp @@ -168,7 +168,7 @@ int SolutionsController::numberOfRows() const { void SolutionsController::willDisplayCellAtLocation(HighlightCell * cell, int i, int j) { const int rowOfUserVariablesMessage = userVariablesMessageRow(); if (j == rowOfUserVariablesMessage) { - // Predefined varaible used/ignored message + // Predefined variable used/ignored message assert(i >= 0); MessageCell * messageCell = static_cast(cell); messageCell->setHorizontalAlignment(i == 0 ? 1.0f : 0.0f); diff --git a/apps/title_bar_view.cpp b/apps/title_bar_view.cpp index a842b394e..cd0bb5337 100644 --- a/apps/title_bar_view.cpp +++ b/apps/title_bar_view.cpp @@ -102,7 +102,7 @@ View * TitleBarView::subviewAtIndex(int index) { void TitleBarView::layoutSubviews(bool force) { /* We here cheat to layout the main title. The application title is written * with upper cases. But, as upper letters are on the same baseline as lower - * letters, they seem to be slightly above when they are perferctly centered + * letters, they seem to be slightly above when they are perfectly centered * (because their glyph never cross the baseline). To avoid this effect, we * translate the frame of the title downwards.*/ m_titleView.setFrame(KDRect(0, 2, bounds().width(), bounds().height()-2), force); diff --git a/apps/toolbox.de.i18n b/apps/toolbox.de.i18n index 4c2ef8e9d..e4a7c49e4 100644 --- a/apps/toolbox.de.i18n +++ b/apps/toolbox.de.i18n @@ -58,7 +58,7 @@ UnitPressurePascalHecto = "Hektopascal" UnitPressureAtm = "Atmosphere" UnitEnergyMenu = "Energie" UnitEnergyJouleMilli = "Millijoule" -UnitEnergyEletronVoltMenu = "Electronvolt" +UnitEnergyElectronVoltMenu = "Electronvolt" UnitEnergyElectronVoltMega = "Megaelectronvolt" UnitEnergyElectronVoltKilo = "Kiloelectronvolt" UnitEnergyElectronVolt = "Electronvolt" @@ -116,7 +116,7 @@ Integral = "Integral" Sum = "Summe" Product = "Produkt" ComplexAbsoluteValue = "Betrag" -Agument = "Argument" +Argument = "Argument" RealPart = "Realteil" ImaginaryPart = "Imaginärteil" Conjugate = "Konjugiert" diff --git a/apps/toolbox.en.i18n b/apps/toolbox.en.i18n index d6c1c2359..e2d7dd94a 100644 --- a/apps/toolbox.en.i18n +++ b/apps/toolbox.en.i18n @@ -58,7 +58,7 @@ UnitPressurePascalHecto = "Hectopascal" UnitPressureAtm = "Atmosphere" UnitEnergyMenu = "Energy" UnitEnergyJouleMilli = "Millijoule" -UnitEnergyEletronVoltMenu = "Electronvolt" +UnitEnergyElectronVoltMenu = "Electronvolt" UnitEnergyElectronVoltMega = "Megaelectronvolt" UnitEnergyElectronVoltKilo = "Kiloelectronvolt" UnitEnergyElectronVolt = "Electronvolt" @@ -116,7 +116,7 @@ Integral = "Integral" Sum = "Sum" Product = "Product" ComplexAbsoluteValue = "Absolute value" -Agument = "Argument" +Argument = "Argument" RealPart = "Real part" ImaginaryPart = "Imaginary part" Conjugate = "Conjugate" diff --git a/apps/toolbox.es.i18n b/apps/toolbox.es.i18n index 3ec2d7db5..21247a271 100644 --- a/apps/toolbox.es.i18n +++ b/apps/toolbox.es.i18n @@ -58,7 +58,7 @@ UnitPressurePascalHecto = "Hectopascal" UnitPressureAtm = "Atmosphere" UnitEnergyMenu = "Energy" UnitEnergyJouleMilli = "Millijoule" -UnitEnergyEletronVoltMenu = "Electronvolt" +UnitEnergyElectronVoltMenu = "Electronvolt" UnitEnergyElectronVoltMega = "Megaelectronvolt" UnitEnergyElectronVoltKilo = "Kiloelectronvolt" UnitEnergyElectronVolt = "Electronvolt" @@ -116,7 +116,7 @@ Integral = "Integral" Sum = "Suma" Product = "Productorio" ComplexAbsoluteValue = "Modulo" -Agument = "Argumento" +Argument = "Argumento" RealPart = "Parte real" ImaginaryPart = "Parte imaginaria" Conjugate = "Conjugado" diff --git a/apps/toolbox.fr.i18n b/apps/toolbox.fr.i18n index 2eb1c183e..4cd0db6fa 100644 --- a/apps/toolbox.fr.i18n +++ b/apps/toolbox.fr.i18n @@ -62,7 +62,7 @@ UnitPressurePascalHecto = "Hectopascal" UnitPressureAtm = "Atmosphère" UnitEnergyMenu = "Énergie" UnitEnergyJouleMilli = "Millijoule" -UnitEnergyEletronVoltMenu = "Électronvolt" +UnitEnergyElectronVoltMenu = "Électronvolt" UnitEnergyElectronVoltMega = "Mégaélectronvolt" UnitEnergyElectronVoltKilo = "Kiloélectronvolt" UnitEnergyElectronVolt = "Électronvolt" @@ -120,7 +120,7 @@ Integral = "Intégrale de f sur [a;b]" Sum = "Somme" Product = "Produit" ComplexAbsoluteValue = "Module" -Agument = "Argument" +Argument = "Argument" RealPart = "Partie réelle" ImaginaryPart = "Partie imaginaire" Conjugate = "Conjugué" diff --git a/apps/toolbox.hu.i18n b/apps/toolbox.hu.i18n index bfcd3a4cc..137c37917 100644 --- a/apps/toolbox.hu.i18n +++ b/apps/toolbox.hu.i18n @@ -58,7 +58,7 @@ UnitPressurePascalHecto = "Hectopascal" UnitPressureAtm = "Légkör" UnitEnergyMenu = "Energia" UnitEnergyJouleMilli = "Millijoule" -UnitEnergyEletronVoltMenu = "Electronvolt" +UnitEnergyElectronVoltMenu = "Electronvolt" UnitEnergyElectronVoltMega = "Megaelectronvolt" UnitEnergyElectronVoltKilo = "Kiloelectronvolt" UnitEnergyElectronVolt = "Electronvolt" @@ -116,7 +116,7 @@ Integral = "Integral" Sum = "Összeg" Product = "Termék" ComplexAbsoluteValue = "Abszolút érték" -Agument = "érv" +Argument = "érv" RealPart = "Igazi rész" ImaginaryPart = "Képzeletbeli rész" Conjugate = "Konjugátum" diff --git a/apps/toolbox.it.i18n b/apps/toolbox.it.i18n index af1d99047..69ac55c6a 100644 --- a/apps/toolbox.it.i18n +++ b/apps/toolbox.it.i18n @@ -58,7 +58,7 @@ UnitPressurePascalHecto = "Hectopascal" UnitPressureAtm = "Atmosfera" UnitEnergyMenu = "Energia" UnitEnergyJouleMilli = "Millijoule" -UnitEnergyEletronVoltMenu = "Electronvolt" +UnitEnergyElectronVoltMenu = "Electronvolt" UnitEnergyElectronVoltMega = "Megaelectronvolt" UnitEnergyElectronVoltKilo = "Kiloelectronvolt" UnitEnergyElectronVolt = "Electronvolt" @@ -116,7 +116,7 @@ Integral = "Integrale" Sum = "Somma" Product = "Prodotto" ComplexAbsoluteValue = "Modulo" -Agument = "Argomento" +Argument = "Argomento" RealPart = "Parte reale" ImaginaryPart = "Parte immaginaria" Conjugate = "Coniugato" diff --git a/apps/toolbox.nl.i18n b/apps/toolbox.nl.i18n index 84a800366..ecd1c364b 100644 --- a/apps/toolbox.nl.i18n +++ b/apps/toolbox.nl.i18n @@ -58,7 +58,7 @@ UnitPressurePascalHecto = "Hectopascal" UnitPressureAtm = "Atmosfeer" UnitEnergyMenu = "Energie" UnitEnergyJouleMilli = "Millijoule" -UnitEnergyEletronVoltMenu = "Elektronvolt" +UnitEnergyElectronVoltMenu = "Elektronvolt" UnitEnergyElectronVoltMega = "Megaelektronvolt" UnitEnergyElectronVoltKilo = "Kiloelektronvolt" UnitEnergyElectronVolt = "Elektronvolt" @@ -116,7 +116,7 @@ Integral = "Integraal" Sum = "Som" Product = "Product" ComplexAbsoluteValue = "Absolute waarde" -Agument = "Argument" +Argument = "Argument" RealPart = "Reëel deel" ImaginaryPart = "Imaginair deel" Conjugate = "Geconjugeerde" diff --git a/apps/toolbox.pt.i18n b/apps/toolbox.pt.i18n index 41a6709dc..584bc753d 100644 --- a/apps/toolbox.pt.i18n +++ b/apps/toolbox.pt.i18n @@ -58,7 +58,7 @@ UnitPressurePascalHecto = "Hectopascal" UnitPressureAtm = "Atmosfera" UnitEnergyMenu = "Energia" UnitEnergyJouleMilli = "Milijoule" -UnitEnergyEletronVoltMenu = "Eletrão-volt" +UnitEnergyElectronVoltMenu = "Eletrão-volt" UnitEnergyElectronVoltMega = "Megaeletrão-volt" UnitEnergyElectronVoltKilo = "Kiloeletrão-volt" UnitEnergyElectronVolt = "Eletrão-volt" @@ -116,7 +116,7 @@ Integral = "Integral" Sum = "Somatório" Product = "Produto" ComplexAbsoluteValue = "Módulo" -Agument = "Argumento" +Argument = "Argumento" RealPart = "Parte real" ImaginaryPart = "Parte imaginária" Conjugate = "Conjugado" diff --git a/build/device/dfu.py b/build/device/dfu.py index 14f8ff030..7245632ad 100644 --- a/build/device/dfu.py +++ b/build/device/dfu.py @@ -9,7 +9,7 @@ """This module implements enough functionality to program the STM32F4xx over DFU, without requiring dfu-util. See app note AN3156 for a description of the DFU protocol. -See document UM0391 for a dscription of the DFuse file. +See document UM0391 for a description of the DFuse file. """ from __future__ import print_function diff --git a/build/device/ram_map.py b/build/device/ram_map.py index d97ab9e04..3676a58d6 100644 --- a/build/device/ram_map.py +++ b/build/device/ram_map.py @@ -13,7 +13,7 @@ def parse_line(line): readelf_output = subprocess.check_output([ "arm-none-eabi-readelf", - "-W", # Don't limit line lenght + "-W", # Don't limit line length "-s", # Sizes sys.argv[1] ]).decode('utf-8') diff --git a/build/device/usb/_debug.py b/build/device/usb/_debug.py index a4ca7e82e..bd2abcc9f 100644 --- a/build/device/usb/_debug.py +++ b/build/device/usb/_debug.py @@ -55,7 +55,7 @@ def methodtrace(logger): if not _enable_tracing: return f def do_trace(*args, **named_args): - # this if is just a optimization to avoid unecessary string formatting + # this if is just a optimization to avoid unnecessary string formatting if logging.DEBUG >= logger.getEffectiveLevel(): fn = type(args[0]).__name__ + '.' + f.__name__ _trace_function_call(logger, fn, *args[1:], **named_args) @@ -70,7 +70,7 @@ def functiontrace(logger): if not _enable_tracing: return f def do_trace(*args, **named_args): - # this if is just a optimization to avoid unecessary string formatting + # this if is just a optimization to avoid unnecessary string formatting if logging.DEBUG >= logger.getEffectiveLevel(): _trace_function_call(logger, f.__name__, *args, **named_args) return f(*args, **named_args) diff --git a/build/device/usb/backend/__init__.py b/build/device/usb/backend/__init__.py index f28e4940f..ca1ead987 100644 --- a/build/device/usb/backend/__init__.py +++ b/build/device/usb/backend/__init__.py @@ -35,7 +35,7 @@ This module exports: IBackend - backend interface. Backends are Python objects which implement the IBackend interface. -The easiest way to do so is inherinting from IBackend. +The easiest way to do so is inheriting from IBackend. PyUSB already provides backends for libusb versions 0.1 and 1.0, and OpenUSB library. Backends modules included with PyUSB are required to @@ -87,7 +87,7 @@ class IBackend(_objfinalizer.AutoFinalizedObject): IBackend is the basic interface for backend implementations. By default, the methods of the interface raise a NotImplementedError exception. A - backend implementation should replace the methods to provide the funcionality + backend implementation should replace the methods to provide the functionality necessary. As Python is a dynamic typed language, you are not obligated to inherit from @@ -126,7 +126,7 @@ class IBackend(_objfinalizer.AutoFinalizedObject): r"""Return a configuration descriptor of the given device. The object returned is required to have all the Configuration Descriptor - fields acessible as member variables. They must be convertible (but + fields accessible as member variables. They must be convertible (but not required to be equal) to the int type. The dev parameter is the device identification object. @@ -156,7 +156,7 @@ class IBackend(_objfinalizer.AutoFinalizedObject): r"""Return an endpoint descriptor of the given device. The object returned is required to have all the Endpoint Descriptor - fields acessible as member variables. They must be convertible (but + fields accessible as member variables. They must be convertible (but not required to be equal) to the int type. The ep parameter is the endpoint logical index (not the bEndpointAddress @@ -246,7 +246,7 @@ class IBackend(_objfinalizer.AutoFinalizedObject): of the interface containing the endpoint. The data parameter is the data to be sent. It must be an instance of the array.array class. The timeout parameter specifies a time limit to the operation - in miliseconds. + in milliseconds. The method returns the number of bytes written. """ @@ -261,7 +261,7 @@ class IBackend(_objfinalizer.AutoFinalizedObject): of the interface containing the endpoint. The buff parameter is the buffer to receive the data read, the length of the buffer tells how many bytes should be read. The timeout parameter - specifies a time limit to the operation in miliseconds. + specifies a time limit to the operation in milliseconds. The method returns the number of bytes actually read. """ @@ -276,7 +276,7 @@ class IBackend(_objfinalizer.AutoFinalizedObject): of the interface containing the endpoint. The data parameter is the data to be sent. It must be an instance of the array.array class. The timeout parameter specifies a time limit to the operation - in miliseconds. + in milliseconds. The method returns the number of bytes written. """ @@ -291,7 +291,7 @@ class IBackend(_objfinalizer.AutoFinalizedObject): of the interface containing the endpoint. The buff parameter is the buffer to receive the data read, the length of the buffer tells how many bytes should be read. The timeout parameter - specifies a time limit to the operation in miliseconds. + specifies a time limit to the operation in milliseconds. The method returns the number of bytes actually read. """ @@ -306,7 +306,7 @@ class IBackend(_objfinalizer.AutoFinalizedObject): of the interface containing the endpoint. The data parameter is the data to be sent. It must be an instance of the array.array class. The timeout parameter specifies a time limit to the operation - in miliseconds. + in milliseconds. The method returns the number of bytes written. """ @@ -321,7 +321,7 @@ class IBackend(_objfinalizer.AutoFinalizedObject): of the interface containing the endpoint. The buff parameter is buffer to receive the data read, the length of the buffer tells how many bytes should be read. The timeout parameter specifies - a time limit to the operation in miliseconds. + a time limit to the operation in milliseconds. The method returns the number of bytes actually read. """ @@ -347,7 +347,7 @@ class IBackend(_objfinalizer.AutoFinalizedObject): IN requests it is the buffer to hold the data read. The number of bytes requested to transmit or receive is equal to the length of the array times the data.itemsize field. The timeout parameter - specifies a time limit to the operation in miliseconds. + specifies a time limit to the operation in milliseconds. Return the number of bytes written (for OUT transfers) or the data read (for IN transfers), as an array.array object. diff --git a/build/device/usb/backend/libusb1.py b/build/device/usb/backend/libusb1.py index 6615d68b7..65b176213 100644 --- a/build/device/usb/backend/libusb1.py +++ b/build/device/usb/backend/libusb1.py @@ -300,7 +300,7 @@ def _setup_prototypes(lib): # void libusb_exit (struct libusb_context *ctx) lib.libusb_exit.argtypes = [c_void_p] - # ssize_t libusb_get_device_list (libusb_context *ctx, + # size_t libusb_get_device_list (libusb_context *ctx, # libusb_device ***list) lib.libusb_get_device_list.argtypes = [ c_void_p, diff --git a/build/device/usb/core.py b/build/device/usb/core.py index 7546de2bc..282e55afe 100644 --- a/build/device/usb/core.py +++ b/build/device/usb/core.py @@ -735,7 +735,7 @@ class Device(_objfinalizer.AutoFinalizedObject): value for most devices) and then writes some data to the endpoint 0x01. Timeout values for the write, read and ctrl_transfer methods are specified - in miliseconds. If the parameter is omitted, Device.default_timeout value + in milliseconds. If the parameter is omitted, Device.default_timeout value will be used instead. This property can be set by the user at anytime. """ @@ -961,7 +961,7 @@ class Device(_objfinalizer.AutoFinalizedObject): The data parameter should be a sequence like type convertible to the array type (see array module). - The timeout is specified in miliseconds. + The timeout is specified in milliseconds. The method returns the number of bytes written. """ @@ -993,7 +993,7 @@ class Device(_objfinalizer.AutoFinalizedObject): tells how many bytes you want to read or supplies the buffer to receive the data (it *must* be an object of the type array). - The timeout is specified in miliseconds. + The timeout is specified in milliseconds. If the size_or_buffer parameter is the number of bytes to read, the method returns an array object with the data read. If the diff --git a/build/doc/Doxyfile b/build/doc/Doxyfile index 8f9c49eeb..f903ba0f1 100644 --- a/build/doc/Doxyfile +++ b/build/doc/Doxyfile @@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8 # title of most generated pages and in a few other places. # The default value is: My Project. -PROJECT_NAME = Omega +PROJECT_NAME = Upsilon # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version diff --git a/build/pimp.mak b/build/pimp.mak index 68ee83b22..afc96c862 100644 --- a/build/pimp.mak +++ b/build/pimp.mak @@ -22,7 +22,7 @@ endif DISPLAY_TARGET ?= "Undefined" -PLS_IGNORE := $(shell >&2 printf "\e[32m Targetting $(DISPLAY_TARGET)\n") +PLS_IGNORE := $(shell >&2 printf "\e[32m Targeting $(DISPLAY_TARGET)\n") ifeq ($(OS),Windows_NT) DISPLAY_OS = Windows diff --git a/build/targets.device.n0110.mak b/build/targets.device.n0110.mak index 5b1f9acda..c71f80aae 100644 --- a/build/targets.device.n0110.mak +++ b/build/targets.device.n0110.mak @@ -1,7 +1,7 @@ HANDY_TARGETS += test.external_flash.write test.external_flash.read $(BUILD_DIR)/test.external_flash.%.$(EXE): LDSCRIPT = ion/test/device/n0110/external_flash_tests.ld -test_external_flash_src = $(ion_src) $(liba_src) $(libaxx_src) $(default_kandinsky_src) $(poincare_src) $(ion_device_dfu_relogated_src) $(runner_src) +test_external_flash_src = $(ion_src) $(liba_src) $(libaxx_src) $(default_kandinsky_src) $(poincare_src) $(ion_device_dfu_relegated_src) $(runner_src) $(BUILD_DIR)/test.external_flash.read.$(EXE): $(BUILD_DIR)/quiz/src/test_ion_external_flash_read_symbols.o $(call object_for,$(test_external_flash_src) $(test_ion_external_flash_read_src)) $(BUILD_DIR)/test.external_flash.write.$(EXE): $(BUILD_DIR)/quiz/src/test_ion_external_flash_write_symbols.o $(call object_for,$(test_external_flash_src) $(test_ion_external_flash_write_src)) diff --git a/docs/architecture.svg b/docs/architecture.svg index 8a848854e..59c37af9f 100644 --- a/docs/architecture.svg +++ b/docs/architecture.svg @@ -22,7 +22,7 @@ - Esher + Escher diff --git a/docs/build/index.md b/docs/build/index.md index 9827314db..1fd79621d 100644 --- a/docs/build/index.md +++ b/docs/build/index.md @@ -2,7 +2,7 @@ title: Installing the SDK breadcrumb: SDK --- -# Build and run your own version of Epsilon +# Build and run your own version of Upsilon ## Install the SDK @@ -46,13 +46,13 @@ apt-get install gcc-arm-none-eabi binutils-arm-none-eabi ## Retrieve the source code -The code is hosted on GitHub. You can retrieve it using the follwing command. +The code is hosted on GitHub. You can retrieve it using the following command. ``` -git clone https://github.com/numworks/epsilon.git +git clone https://github.com/Lauryy06/Upsilon.git ``` -## Run Epsilon on your computer +## Run Upsilon on your computer Once the SDK has been installed, just open your terminal (Msys2, Terminal.app, xterm…) and type the following commands: @@ -61,7 +61,7 @@ make PLATFORM=simulator clean make PLATFORM=simulator epsilon_run ``` -## Run Epsilon on your calculator +## Run Upsilon on your calculator You can also update your NumWorks calculator easily. Note that you'll need to press the Reset button and that all data on your calculator will be lost. @@ -71,4 +71,4 @@ make make epsilon_flash ``` -Congratulations, you're running your very own version of Epsilon! +Congratulations, you're running your very own version of Upsilon! diff --git a/docs/index.md b/docs/index.md index edc128688..e5418a9e3 100644 --- a/docs/index.md +++ b/docs/index.md @@ -45,7 +45,7 @@ We're listing here all the topics you should be familiar with before being able The choice of a programming language is a controversial topic. Not all of them can be used to write an operating system, but quite a few can. We settled on C++ for several reasons: - It is a [system](https://en.wikipedia.org/wiki/System_programming_language) programming language, which is something we need since we have to write some low-level code. -- It has excellent tooling: several extremly high-quality compilers +- It has excellent tooling: several extremely high-quality compilers - It is used for several high-profile projects LLVM, WebKit, MySQL, Photoshop… This ensures a strong ecosystem of tools, code and documentation. - It easily allows Object-Oriented Programming, which is a convenient abstraction. @@ -57,7 +57,7 @@ If you want to contribute to Epsilon, you'll need to learn some C++. ### Working with limited memory -Our device has 256 KB of RAM. That's very little memory by today's standards. That being said, by writing code carefuly, a huge lot can be achieved in that space. After all, that's 64 times more memory than the computer of the Apollo mission! +Our device has 256 KB of RAM. That's very little memory by today's standards. That being said, by writing code carefully, a huge lot can be achieved in that space. After all, that's 64 times more memory than the computer of the Apollo mission! #### Stack memory diff --git a/escher/image/inliner.c b/escher/image/inliner.c index c2e9d4894..df31430df 100644 --- a/escher/image/inliner.c +++ b/escher/image/inliner.c @@ -4,7 +4,7 @@ * * The inliner creates a .h and a .cpp file in the same directory as the input * file. The implementation file declares an Image in the ImageStore namespace, - * and the header exposes a pointer to this variable. The Image embedds the + * and the header exposes a pointer to this variable. The Image embedded the * bitmap data in the RGB565 format. */ #include diff --git a/escher/include/escher/text_area.h b/escher/include/escher/text_area.h index e8aa34aa5..13bd84e03 100644 --- a/escher/include/escher/text_area.h +++ b/escher/include/escher/text_area.h @@ -60,7 +60,7 @@ protected: class Position { /* column and line correspond to the visual column and line. The glyph at * the kth column is not the the glyph of kth code point, because of - * combining code points that do not fave a personnal glyph. */ + * combining code points that do not fave a personal glyph. */ public: Position(int column, int line) : m_column(column), m_line(line) {} int column() const { return m_column; } diff --git a/escher/include/escher/view_controller.h b/escher/include/escher/view_controller.h index 60243a8e0..ffee1f1a0 100644 --- a/escher/include/escher/view_controller.h +++ b/escher/include/escher/view_controller.h @@ -8,7 +8,7 @@ extern "C" { #include } -/* ViewControllers are reponsible for +/* ViewControllers are responsible for * - Building the view hierarchy * - Handling user input * @@ -23,7 +23,7 @@ extern "C" { * - willExitResponderChain * - willResignFirstResponder * - * Both methods are always called after setting a view and laying its subwiews + * Both methods are always called after setting a view and laying its subviews * out. * * The method initView is called before setting a View (or often sets itself) diff --git a/escher/src/button_row_controller.cpp b/escher/src/button_row_controller.cpp index 021c00038..94a2e67f9 100644 --- a/escher/src/button_row_controller.cpp +++ b/escher/src/button_row_controller.cpp @@ -37,7 +37,7 @@ int ButtonRowController::ContentView::numberOfSubviews() const { } View * ButtonRowController::ContentView::subviewAtIndex(int index) { - /* Warning: the order of the subviews is important for drity tracking. + /* Warning: the order of the subviews is important for dirty tracking. * Indeed, when a child is redrawn, the redrawn area is the smallest * rectangle unioniong the dirty rectangle and the previous redrawn area. * As the main view is more likely to be bigger, we prefer to set it as the @@ -217,7 +217,7 @@ void ButtonRowController::initView() { void ButtonRowController::viewWillAppear() { /* We need to layout subviews at first appearance because the number of - * buttons might have changed between 2 appearences. */ + * buttons might have changed between 2 appearances. */ m_contentView.layoutSubviews(); m_contentView.mainViewController()->viewWillAppear(); } diff --git a/escher/src/icon_view.cpp b/escher/src/icon_view.cpp index 0637d62c6..cb9a31749 100644 --- a/escher/src/icon_view.cpp +++ b/escher/src/icon_view.cpp @@ -54,7 +54,7 @@ void IconView::drawRect(KDContext * ctx, KDRect rect) const { //Then we push the rectangular part of the image ctx->fillRectWithPixels(KDRect(0, 6, m_frame.width(), 44),pixelBuffer+(6*55), nullptr); - //Finaly we push the last 5 lines of the image so that they are truncated on the sides + //Finally we push the last 5 lines of the image so that they are truncated on the sides ctx->fillRectWithPixels(KDRect(1, 50, m_frame.width()-2, 1),pixelBuffer+1+(50*55), nullptr); ctx->fillRectWithPixels(KDRect(1, 51, m_frame.width()-2, 1),pixelBuffer+1+(51*55), nullptr); ctx->fillRectWithPixels(KDRect(2, 52, m_frame.width()-4, 1),pixelBuffer+2+(52*55), nullptr); diff --git a/escher/src/selectable_table_view.cpp b/escher/src/selectable_table_view.cpp index 44804fcb5..226ed1b09 100644 --- a/escher/src/selectable_table_view.cpp +++ b/escher/src/selectable_table_view.cpp @@ -93,7 +93,7 @@ bool SelectableTableView::selectCellAtLocation(int i, int j, bool setFirstRespon * ExpressionModelListController needs to update its memoized cell before * being able to scroll; * - after scrolling: for instance, the calculation history table might - * change its cell content when selected (outup toggling, ellipsis toggling) + * change its cell content when selected (output toggling, ellipsis toggling) * and thus need to access the right used cell - which is defined only * after scrolling. */ diff --git a/escher/src/text_field.cpp b/escher/src/text_field.cpp index 4411f12a4..2587bf024 100644 --- a/escher/src/text_field.cpp +++ b/escher/src/text_field.cpp @@ -155,7 +155,7 @@ bool TextField::ContentView::removePreviousGlyph() { assert(m_isEditing); if (m_horizontalAlignment > 0.0f) { - /* Reload the view. If we do it later, the text beins supposedly shorter, we + /* Reload the view. If we do it later, the text beings supposedly shorter, we * will not clean the first char. */ reloadRectFromPosition(s_draftTextBuffer); } @@ -290,7 +290,7 @@ bool TextField::privateHandleEvent(Ion::Events::Event event) { return true; } if (isEditing() && shouldFinishEditing(event)) { - /* If textFieldDidFinishEditing displays a pop-up (because of an unvalid + /* If textFieldDidFinishEditing displays a pop-up (because of an invalid * text for instance), the text field will call willResignFirstResponder. * This will call textFieldDidAbortEditing if the textfield is still editing, * which we do not want, as we are not really aborting edition, just diff --git a/ion/Makefile b/ion/Makefile index 3558e7133..1b04baf69 100644 --- a/ion/Makefile +++ b/ion/Makefile @@ -18,7 +18,7 @@ include ion/src/$(PLATFORM)/Makefile include ion/src/shared/tools/Makefile # We need to work around a GCC bug (concerning versions < 5.1). It is valid in -# C++11 to initialize a character array by providing a string litteral (e.g. +# C++11 to initialize a character array by providing a string literal (e.g. # char test[4]= "ab"; is valid and should initialize test to 'a','b',0,0). # Older versions of GCC are not conformant so we resort to an initializer list. initializer_list = $(shell echo $(1) | sed "s/\(.\)/'\1',/g")0 diff --git a/ion/include/ion/timing.h b/ion/include/ion/timing.h index 523232f8e..45d7b6496 100644 --- a/ion/include/ion/timing.h +++ b/ion/include/ion/timing.h @@ -9,7 +9,7 @@ namespace Timing { void usleep(uint32_t us); void msleep(uint32_t ms); -/* millis is the number of milliseconds ellapsed since a random epoch. +/* millis is the number of milliseconds elapsed since a random epoch. * On the device, epoch is the boot time. */ uint64_t millis(); diff --git a/ion/include/ion/unicode/utf8_helper.h b/ion/include/ion/unicode/utf8_helper.h index edc379325..ba00c1950 100644 --- a/ion/include/ion/unicode/utf8_helper.h +++ b/ion/include/ion/unicode/utf8_helper.h @@ -19,17 +19,17 @@ private: bool m_removeParenthesesExtention; }; -// Returns the number of occurences of a code point in a string +// Returns the number of occurrences of a code point in a string int CountOccurrences(const char * s, CodePoint c); -/* Returns the first occurence of a code point in a string, the position of the +/* Returns the first occurrence of a code point in a string, the position of the * null terminating char otherwise. */ const char * CodePointSearch(const char * s, CodePoint c, const char * stoppingPosition = nullptr); // Returns true if the text had the code point bool HasCodePoint(const char * s, CodePoint c, const char * stoppingPosition = nullptr); -/* Returns the first occurence of a code point that is not c in a string, +/* Returns the first occurrence of a code point that is not c in a string, * stopping at the null-terminating char or the start of string. */ const char * NotCodePointSearch(const char * s, CodePoint c, bool goingLeft = false, const char * initialPosition = nullptr); @@ -41,9 +41,9 @@ bool CopyAndRemoveCodePoints(char * dst, size_t dstSize, const char * src, CodeP * points where removed before it. Ensure null-termination of dst. */ void RemoveCodePoint(char * buffer, CodePoint c, const char * * indexToUpdate = nullptr, const char * stoppingPosition = nullptr); -/* Slides a string by a number of chars. If slidingSize < 0, the string is slided +/* Slides a string by a number of chars. If slidingSize < 0, the string is slid * to the left losing the first chars. Returns true if successful. - * Exemples : + * Examples : * SlideStringByNumberOfChar("12345", 2, 7) gives "1212345" * SlideStringByNumberOfChar("12345", 2, 5) gives "12123" * SlideStringByNumberOfChar("12345", -2, 5) gives "34545"*/ diff --git a/ion/src/device/n0100/flash.ld b/ion/src/device/n0100/flash.ld index e9b073bb2..d22fe7b9f 100644 --- a/ion/src/device/n0100/flash.ld +++ b/ion/src/device/n0100/flash.ld @@ -71,7 +71,7 @@ SECTIONS { /* The data section is written to Flash but linked as if it were in RAM. * * This is required because its initial value matters (so it has to be in - * persistant memory in the first place), but it is a R/W area of memory + * persistent memory in the first place), but it is a R/W area of memory * so it will have to live in RAM upon execution (in linker lingo, that * translates to the data section having a LMA in Flash and a VMA in RAM). * diff --git a/ion/src/device/n0110/drivers/board.cpp b/ion/src/device/n0110/drivers/board.cpp index 98403abb6..24b8cfc36 100644 --- a/ion/src/device/n0110/drivers/board.cpp +++ b/ion/src/device/n0110/drivers/board.cpp @@ -42,7 +42,7 @@ void initMPU() { /* This is needed for interfacing with the LCD * We define the whole FMC memory bank 1 as strongly ordered, non-executable * and not accessible. We define the FMC command and data addresses as - * writeable non-cachable, non-buffereable and non shareable. */ + * writeable non-cacheable, non-buffereable and non shareable. */ int sector = 0; MPU.RNR()->setREGION(sector++); MPU.RBAR()->setADDR(0x60000000); @@ -84,7 +84,7 @@ void initMPU() { * then an AHB error is given (AN4760). To prevent this to happen, we * configure the MPU to define the whole Quad-SPI addressable space as * strongly ordered, non-executable and not accessible. Plus, we define the - * Quad-SPI region corresponding to the Expternal Chip as executable and + * Quad-SPI region corresponding to the External Chip as executable and * fully accessible (AN4861). */ MPU.RNR()->setREGION(sector++); MPU.RBAR()->setADDR(0x90000000); diff --git a/ion/src/device/n0110/drivers/config/clocks.h b/ion/src/device/n0110/drivers/config/clocks.h index 0cc551cb0..9043f71ca 100644 --- a/ion/src/device/n0110/drivers/config/clocks.h +++ b/ion/src/device/n0110/drivers/config/clocks.h @@ -59,7 +59,7 @@ constexpr static double modulationDepth = 0.25; // Must be (0.25% <= md <= 2%) constexpr static uint32_t SSCG_INCSTEP = (32767*modulationDepth*PLL_N)/(1.0*100*5*SSCG_MODPER); static_assert(SSCG_MODPER == 250, "SSCG_MODPER changed"); static_assert(SSCG_INCSTEP == 25, "SSCG_INCSTEP changed"); -static_assert(SSCG_INCSTEP * SSCG_MODPER < 32767, "Wrong values for the Spread spectrun clock generator"); +static_assert(SSCG_INCSTEP * SSCG_MODPER < 32767, "Wrong values for the Spread spectrum clock generator"); } } } diff --git a/ion/src/device/n0110/flash.ld b/ion/src/device/n0110/flash.ld index 0ae0e5910..e66cbbac1 100644 --- a/ion/src/device/n0110/flash.ld +++ b/ion/src/device/n0110/flash.ld @@ -190,7 +190,6 @@ SECTIONS { *(.text._ZN3Ion6Device9Backlight*) *(.text._ZN3Ion9Backlight*) - /* Rodata Truc Relou */ *(.text._ZNK10Statistics5Store6medianEi) *(.text._ZNK10Regression5Store12meanOfColumnEiib) *(.text._ZNK6Shared15DoublePairStore11sumOfColumnEiib) @@ -322,7 +321,7 @@ SECTIONS { /* The data section is written to Flash but linked as if it were in RAM. * * This is required because its initial value matters (so it has to be in - * persistant memory in the first place), but it is a R/W area of memory + * persistent memory in the first place), but it is a R/W area of memory * so it will have to live in RAM upon execution (in linker lingo, that * translates to the data section having a LMA in Flash and a VMA in RAM). * diff --git a/ion/src/device/n0110/internal_flash.ld b/ion/src/device/n0110/internal_flash.ld index 76089e337..2e1ce78bb 100644 --- a/ion/src/device/n0110/internal_flash.ld +++ b/ion/src/device/n0110/internal_flash.ld @@ -52,7 +52,7 @@ SECTIONS { /* The data section is written to Flash but linked as if it were in RAM. * * This is required because its initial value matters (so it has to be in - * persistant memory in the first place), but it is a R/W area of memory + * persistent memory in the first place), but it is a R/W area of memory * so it will have to live in RAM upon execution (in linker lingo, that * translates to the data section having a LMA in Flash and a VMA in RAM). * diff --git a/ion/src/device/shared/drivers/battery.cpp b/ion/src/device/shared/drivers/battery.cpp index c0f4877bd..8686c2a97 100644 --- a/ion/src/device/shared/drivers/battery.cpp +++ b/ion/src/device/shared/drivers/battery.cpp @@ -4,10 +4,10 @@ /* To measure the battery voltage, we're using the internal ADC. The ADC works * by comparing the input voltage to a reference voltage. The only fixed voltage - * we have around is 2.8V, so that's the one we're using as a refrence. However, + * we have around is 2.8V, so that's the one we're using as a reference. However, * and ADC can only measure voltage that is lower than the reference voltage. So * we need to use a voltage divider before sampling Vbat. - * To avoid draining the battery, we're using an high-impedence voltage divider, + * To avoid draining the battery, we're using a high-impedance voltage divider, * so we need to be careful when sampling the ADC. See AN2834 for more info. */ diff --git a/ion/src/device/shared/drivers/display.cpp b/ion/src/device/shared/drivers/display.cpp index 508242dde..6cc1f762c 100644 --- a/ion/src/device/shared/drivers/display.cpp +++ b/ion/src/device/shared/drivers/display.cpp @@ -51,7 +51,7 @@ bool waitForVBlank() { uint64_t startTime = Timing::millis(); uint64_t timeout = startTime + timeoutDelta; - /* If current time is big enough, currentTime + timeout wraps aroud the + /* If current time is big enough, currentTime + timeout wraps around the * uint64_t. We need to take this into account when computing the terminating * event. * diff --git a/ion/src/device/shared/drivers/exam_mode.cpp b/ion/src/device/shared/drivers/exam_mode.cpp index 51fd7be06..0f319bc0d 100644 --- a/ion/src/device/shared/drivers/exam_mode.cpp +++ b/ion/src/device/shared/drivers/exam_mode.cpp @@ -51,28 +51,28 @@ size_t numberOfBitsAfterLeadingZeroes(int i) { } uint8_t * SignificantExamModeAddress() { - uint32_t * persitence_start_32 = (uint32_t *)&_exam_mode_buffer_start; - uint32_t * persitence_end_32 = (uint32_t *)&_exam_mode_buffer_end; - assert((persitence_end_32 - persitence_start_32) % 4 == 0); - while (persitence_start_32 < persitence_end_32 && *persitence_start_32 == 0x0) { + uint32_t * persistence_start_32 = (uint32_t *)&_exam_mode_buffer_start; + uint32_t * persistence_end_32 = (uint32_t *)&_exam_mode_buffer_end; + assert((persistence_end_32 - persistence_start_32) % 4 == 0); + while (persistence_start_32 < persistence_end_32 && *persistence_start_32 == 0x0) { // Scan by groups of 32 bits to reach first non-zero bit - persitence_start_32++; + persistence_start_32++; } - uint8_t * persitence_start_8 = (uint8_t *)persitence_start_32; - uint8_t * persitence_end_8 = (uint8_t *)persitence_end_32; - while (persitence_start_8 < persitence_end_8 && *persitence_start_8 == 0x0) { + uint8_t * persistence_start_8 = (uint8_t *)persistence_start_32; + uint8_t * persistence_end_8 = (uint8_t *)persistence_end_32; + while (persistence_start_8 < persistence_end_8 && *persistence_start_8 == 0x0) { // Scan by groups of 8 bits to reach first non-zero bit - persitence_start_8++; + persistence_start_8++; } - if (persitence_start_8 == persitence_end_8 + if (persistence_start_8 == persistence_end_8 // we can't toggle from 0[3] to 2[3] when there is only one 1 bit in the whole sector - || (persitence_start_8 + 1 == persitence_end_8 && *persitence_start_8 == 1)) { + || (persistence_start_8 + 1 == persistence_end_8 && *persistence_start_8 == 1)) { assert(Ion::Device::Flash::SectorAtAddress((uint32_t)&_exam_mode_buffer_start) >= 0); Ion::Device::Flash::EraseSector(Ion::Device::Flash::SectorAtAddress((uint32_t)&_exam_mode_buffer_start)); return (uint8_t *)&_exam_mode_buffer_start; } - return persitence_start_8; + return persistence_start_8; } uint8_t FetchExamMode() { diff --git a/ion/src/device/shared/drivers/reset.cpp b/ion/src/device/shared/drivers/reset.cpp index ef6053570..67e52f3d6 100644 --- a/ion/src/device/shared/drivers/reset.cpp +++ b/ion/src/device/shared/drivers/reset.cpp @@ -49,7 +49,7 @@ void jump(uint32_t jumpIsrVectorAddress) { // Disable cache before reset Ion::Device::Cache::disable(); - /* Shutdown all clocks and periherals to mimic a hardware reset. */ + /* Shutdown all clocks and peripherals to mimic a hardware reset. */ Board::shutdownPeripherals(); internalFlashJump(jumpIsrVectorAddress); diff --git a/ion/src/device/shared/drivers/wakeup.h b/ion/src/device/shared/drivers/wakeup.h index d8cb22c7b..7bf12d585 100644 --- a/ion/src/device/shared/drivers/wakeup.h +++ b/ion/src/device/shared/drivers/wakeup.h @@ -8,7 +8,7 @@ namespace Device { namespace WakeUp { /* All wakeup functions can be called together without overwriting the same - * register. All togethed, they will set SYSCFG and EXTi registers as follow: + * register. All together, they will set SYSCFG and EXTi registers as follow: * * GPIO Pin Number|EXTI_EMR|EXTI_FTSR|EXTI_RTSR|EXTICR1|EXTICR2|EXTICR3| Wake up * ---------------+--------+---------+---------+-------+-------+-------+------------------------- diff --git a/ion/src/device/shared/regs/tim.h b/ion/src/device/shared/regs/tim.h index f92d119e6..704bd4fa9 100644 --- a/ion/src/device/shared/regs/tim.h +++ b/ion/src/device/shared/regs/tim.h @@ -17,7 +17,7 @@ public: }; class CCMR : Register64 { - /* We're declaring CCMR as a 64 bits register. CCMR doesn't exsist per se, + /* We're declaring CCMR as a 64 bits register. CCMR doesn't exist per se, * it is in fact the consolidation of CCMR1 and CCMR2. Both are 16 bits * registers, so one could expect the consolidation to be 32 bits. However, * both CCMR1 and CCMR2 live on 32-bits boundaries, so the consolidation has diff --git a/ion/src/device/shared/usb/calculator.h b/ion/src/device/shared/usb/calculator.h index bf0a04db4..5a3d898ef 100644 --- a/ion/src/device/shared/usb/calculator.h +++ b/ion/src/device/shared/usb/calculator.h @@ -154,7 +154,7 @@ private: ExtendedCompatIDDescriptor m_extendedCompatIdDescriptor; Descriptor * m_descriptors[8]; - /* m_descriptors contains only descriptors that sould be returned via the + /* m_descriptors contains only descriptors that should be returned via the * method descriptor(uint8_t type, uint8_t index), so do not count descriptors * included in other descriptors or returned by other functions. */ diff --git a/ion/src/device/shared/usb/dfu.ld b/ion/src/device/shared/usb/dfu.ld index 957bcfdd5..70aff4acc 100644 --- a/ion/src/device/shared/usb/dfu.ld +++ b/ion/src/device/shared/usb/dfu.ld @@ -1,5 +1,5 @@ /* DFU transfers can serve two purposes: - * - Transfering RAM data between the machine and the host, e.g. Python scripts + * - Transferring RAM data between the machine and the host, e.g. Python scripts * - Upgrading the flash memory to perform a software update * * The second case raises a huge issue: code cannot be executed from memory that diff --git a/ion/src/device/shared/usb/dfu_interface.h b/ion/src/device/shared/usb/dfu_interface.h index f05604e77..44ccdb558 100644 --- a/ion/src/device/shared/usb/dfu_interface.h +++ b/ion/src/device/shared/usb/dfu_interface.h @@ -74,7 +74,7 @@ private: Unlock = 11 }; - // DFU Download Commmand Codes + // DFU Download Command Codes enum class DFUDownloadCommand { GetCommand = 0x00, SetAddressPointer = 0x21, diff --git a/ion/src/device/shared/usb/dfu_relocated.cpp b/ion/src/device/shared/usb/dfu_relocated.cpp index f68cd2e96..9b68244c4 100644 --- a/ion/src/device/shared/usb/dfu_relocated.cpp +++ b/ion/src/device/shared/usb/dfu_relocated.cpp @@ -57,7 +57,7 @@ void DFU(bool exitWithKeyboard, bool unlocked, int level) { /* 4- Disable all interrupts * The interrupt service routines live in the Flash and could be overwritten - * by garbage during a firmware upgrade opration, so we disable them. */ + * by garbage during a firmware upgrade operation, so we disable them. */ Device::Timing::shutdown(); /* 5- Jump to DFU bootloader code. We made sure in the linker script that the diff --git a/ion/src/device/shared/usb/stack/descriptor/device_capability_descriptor.h b/ion/src/device/shared/usb/stack/descriptor/device_capability_descriptor.h index f434352f2..8b67cabc6 100644 --- a/ion/src/device/shared/usb/stack/descriptor/device_capability_descriptor.h +++ b/ion/src/device/shared/usb/stack/descriptor/device_capability_descriptor.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_SHARED_USB_STACK_DEVICE_CAPABLITY_DESCRIPTOR_H -#define ION_DEVICE_SHARED_USB_STACK_DEVICE_CAPABLITY_DESCRIPTOR_H +#ifndef ION_DEVICE_SHARED_USB_STACK_DEVICE_CAPABILITY_DESCRIPTOR_H +#define ION_DEVICE_SHARED_USB_STACK_DEVICE_CAPABILITY_DESCRIPTOR_H #include "descriptor.h" diff --git a/ion/src/device/shared/usb/stack/descriptor/platform_device_capability_descriptor.h b/ion/src/device/shared/usb/stack/descriptor/platform_device_capability_descriptor.h index d2c425d4a..3c117348c 100644 --- a/ion/src/device/shared/usb/stack/descriptor/platform_device_capability_descriptor.h +++ b/ion/src/device/shared/usb/stack/descriptor/platform_device_capability_descriptor.h @@ -1,5 +1,5 @@ -#ifndef ION_DEVICE_SHARED_USB_STACK_PLATFORM_DEVICE_CAPABLITY_DESCRIPTOR_H -#define ION_DEVICE_SHARED_USB_STACK_PLATFORM_DEVICE_CAPABLITY_DESCRIPTOR_H +#ifndef ION_DEVICE_SHARED_USB_STACK_PLATFORM_DEVICE_CAPABILITY_DESCRIPTOR_H +#define ION_DEVICE_SHARED_USB_STACK_PLATFORM_DEVICE_CAPABILITY_DESCRIPTOR_H #include "device_capability_descriptor.h" diff --git a/ion/src/device/shared/usb/stack/device.cpp b/ion/src/device/shared/usb/stack/device.cpp index 294b647e1..6bfcbef7d 100644 --- a/ion/src/device/shared/usb/stack/device.cpp +++ b/ion/src/device/shared/usb/stack/device.cpp @@ -108,7 +108,7 @@ bool Device::processSetupInRequest(SetupPacket * request, uint8_t * transferBuff case (int) Request::GetStatus: return getStatus(transferBuffer, transferBufferLength, transferBufferMaxLength); case (int) Request::SetAddress: - // Make sure the request is adress is valid. + // Make sure the request is address is valid. assert(request->wValue() < 128); /* According to the reference manual, the address should be set after the * Status stage of the current transaction, but this is not true. diff --git a/ion/src/external/lz4/lz4.c b/ion/src/external/lz4/lz4.c index 4046102e6..3021a96f2 100644 --- a/ion/src/external/lz4/lz4.c +++ b/ion/src/external/lz4/lz4.c @@ -837,7 +837,7 @@ LZ4_FORCE_INLINE int LZ4_compress_generic( _next_match: /* at this stage, the following variables must be correctly set : * - ip : at start of LZ operation - * - match : at start of previous pattern occurence; can be within current prefix, or within extDict + * - match : at start of previous pattern occurrence; can be within current prefix, or within extDict * - offset : if maybe_ext_memSegment==1 (constant) * - lowLimit : must be == dictionary to mean "match is within extDict"; must be == source otherwise * - token and *token : position to write 4-bits for match length; higher 4-bits for literal length supposed already written diff --git a/ion/src/external/lz4/lz4.h b/ion/src/external/lz4/lz4.h index 059ef7c1b..517667c3f 100644 --- a/ion/src/external/lz4/lz4.h +++ b/ion/src/external/lz4/lz4.h @@ -103,7 +103,7 @@ extern "C" { #define LZ4_VERSION_STRING LZ4_EXPAND_AND_QUOTE(LZ4_LIB_VERSION) LZ4LIB_API int LZ4_versionNumber (void); /**< library version number; useful to check dll version */ -LZ4LIB_API const char* LZ4_versionString (void); /**< library version string; unseful to check dll version */ +LZ4LIB_API const char* LZ4_versionString (void); /**< library version string; useful to check dll version */ /*-************************************ diff --git a/ion/src/shared/events_benchmark.cpp b/ion/src/shared/events_benchmark.cpp index adad15e5c..9080ae27b 100644 --- a/ion/src/shared/events_benchmark.cpp +++ b/ion/src/shared/events_benchmark.cpp @@ -41,10 +41,10 @@ static constexpr Event scenariPythonMandelbrot[] = { Right, Right, OK, Down, Dow static constexpr Event scenariStatistics[] = { Down, OK, One, OK, Two, OK, Right, Five, OK, One, Zero, OK, Back, Right, OK, Right, Right, Right, OK, One, OK, Down, OK, Back, Right, OK, Back, Right, OK, Down, Down, Down, Down, Down, Down, Down, Down, Down, Down, Up, Up, Up, Up, Up, Up, Up, Up, Up, Home, Home }; -static constexpr Event scenaryProbability[] = { Down, Right, OK, Down, Down, Down, OK, Two, OK, Zero, Dot, Three, OK, OK, Left, Down, Down, OK, Right, Right, Right, Zero, Dot, Eight, OK, Home, Home +static constexpr Event scenariProbability[] = { Down, Right, OK, Down, Down, Down, OK, Two, OK, Zero, Dot, Three, OK, OK, Left, Down, Down, OK, Right, Right, Right, Zero, Dot, Eight, OK, Home, Home }; -static constexpr Event scenaryEquation[] = { Down, Right, Right, OK, OK, Down, Down, OK, Six, OK, Down, Down, OK, Left, Left, Left, Down, Down, Home, Home +static constexpr Event scenariEquation[] = { Down, Right, Right, OK, OK, Down, Down, OK, Six, OK, Down, Down, OK, Left, Left, Left, Down, Down, Home, Home }; static constexpr Scenario scenari[] = { @@ -52,8 +52,8 @@ static constexpr Scenario scenari[] = { Scenario::build("Sin/Cos graph", scenariFunctionCosSin), Scenario::build("Mandelbrot(15)", scenariPythonMandelbrot), Scenario::build("Statistics", scenariStatistics), - Scenario::build("Probability", scenaryProbability), - Scenario::build("Equation", scenaryEquation) + Scenario::build("Probability", scenariProbability), + Scenario::build("Equation", scenariEquation) }; constexpr static int numberOfScenari = sizeof(scenari)/sizeof(Scenario); diff --git a/ion/src/shared/events_keyboard.cpp b/ion/src/shared/events_keyboard.cpp index 72d6533ed..73038b619 100644 --- a/ion/src/shared/events_keyboard.cpp +++ b/ion/src/shared/events_keyboard.cpp @@ -40,14 +40,14 @@ static bool canRepeatEvent(Event e) { Event getPlatformEvent(); -void ComputeAndSetRepetionFactor(int eventRepetitionCount) { +void ComputeAndSetRepetitionFactor(int eventRepetitionCount) { // The Repetition factor is increased by 4 every 20 loops in getEvent(2 sec) setLongRepetition((eventRepetitionCount / 20) * 4 + 1); } void resetLongRepetition() { sEventRepetitionCount = 0; - ComputeAndSetRepetionFactor(sEventRepetitionCount); + ComputeAndSetRepetitionFactor(sEventRepetitionCount); } static Keyboard::Key keyFromState(Keyboard::State state) { @@ -59,7 +59,7 @@ static inline Event innerGetEvent(int * timeout) { assert(*timeout > delayBetweenRepeat); int time = 0; uint64_t keysSeenUp = 0; - uint64_t keysSeenTransitionningFromUpToDown = 0; + uint64_t keysSeenTransitioningFromUpToDown = 0; while (true) { Event platformEvent = getPlatformEvent(); if (platformEvent != None) { @@ -68,11 +68,11 @@ static inline Event innerGetEvent(int * timeout) { Keyboard::State state = Keyboard::scan(); keysSeenUp |= ~state; - keysSeenTransitionningFromUpToDown = keysSeenUp & state; + keysSeenTransitioningFromUpToDown = keysSeenUp & state; bool lock = isLockActive(); - if (keysSeenTransitionningFromUpToDown != 0) { + if (keysSeenTransitioningFromUpToDown != 0) { sEventIsRepeating = false; resetLongRepetition(); didPressNewKey(); @@ -81,7 +81,7 @@ static inline Event innerGetEvent(int * timeout) { * processors have an instruction (ARM thumb uses CLZ). * Unfortunately there's no way to express this in standard C, so we have * to resort to using a builtin function. */ - Keyboard::Key key = (Keyboard::Key)(63-__builtin_clzll(keysSeenTransitionningFromUpToDown)); + Keyboard::Key key = (Keyboard::Key)(63-__builtin_clzll(keysSeenTransitioningFromUpToDown)); bool shift = isShiftActive() || state.keyDown(Keyboard::Key::Shift); bool alpha = isAlphaActive() || state.keyDown(Keyboard::Key::Alpha); bool lock = isLockActive(); @@ -114,7 +114,7 @@ static inline Event innerGetEvent(int * timeout) { } time += 10; - // At this point, we know that keysSeenTransitionningFromUpToDown has *always* been zero + // At this point, we know that keysSeenTransitioningFromUpToDown has *always* been zero // In other words, no new key has been pressed if (canRepeatEvent(sLastEvent) && state == sLastKeyboardState @@ -125,7 +125,7 @@ static inline Event innerGetEvent(int * timeout) { if (time >= delay) { sEventIsRepeating = true; sEventRepetitionCount++; - ComputeAndSetRepetionFactor(sEventRepetitionCount); + ComputeAndSetRepetitionFactor(sEventRepetitionCount); return sLastEvent; } } diff --git a/ion/src/simulator/3ds/Makefile b/ion/src/simulator/3ds/Makefile index 4c424f65c..a7de79edd 100644 --- a/ion/src/simulator/3ds/Makefile +++ b/ion/src/simulator/3ds/Makefile @@ -35,6 +35,6 @@ sdl_simu_needs_to_be_removed += $(addprefix ion/src/simulator/shared/, \ dummy/store_script.cpp \ ) -# Remove the dummy diplay (re-implemented) and the SDL simulator stuff. +# Remove the dummy display (re-implemented) and the SDL simulator stuff. ion_src := $(filter-out $(sdl_simu_needs_to_be_removed),$(ion_src)) diff --git a/ion/src/simulator/3ds/driver/led.cpp b/ion/src/simulator/3ds/driver/led.cpp index 819390f57..8c403b513 100644 --- a/ion/src/simulator/3ds/driver/led.cpp +++ b/ion/src/simulator/3ds/driver/led.cpp @@ -21,7 +21,7 @@ void setColor(KDColor c) { /* * According to https://www.3dbrew.org/wiki/MCURTC:SetInfoLEDPattern - * annimation pattern is as follow + * animation pattern is as follow * u8 ??? | u8 loop_delay | u8 smoothing | u8 delay */ RGBLedPattern pat; @@ -44,10 +44,10 @@ void setBlinking(uint16_t period, float dutyCycle) { /* * According to https://www.3dbrew.org/wiki/MCURTC:SetInfoLEDPattern - * annimation pattern is as follow + * animation pattern is as follow * u8 ??? | u8 loop_delay | u8 smoothing | u8 delay * - * Se, we seet ??? to 0, loop_delay to 0 (to have it loop) + * Se, we set ??? to 0, loop_delay to 0 (to have it loop) */ RGBLedPattern pat; memset(&pat, 0, sizeof(pat)); diff --git a/ion/src/simulator/android/Makefile b/ion/src/simulator/android/Makefile index b4afe8767..0af9abb97 100644 --- a/ion/src/simulator/android/Makefile +++ b/ion/src/simulator/android/Makefile @@ -19,8 +19,8 @@ $(call object_for,ion/src/simulator/shared/main.cpp) : SFLAGS += -DEPSILON_SDL_F LDFLAGS += -ljnigraphics -llog -# If ARCH is not defined, we will re-trigger a build for each avaialble ARCH. -# This is used to build APKs, which needs to embbed a binary for each ARCH. +# If ARCH is not defined, we will re-trigger a build for each available ARCH. +# This is used to build APKs, which needs to embed a binary for each ARCH. ifndef ARCH diff --git a/ion/src/simulator/android/src/java/io/github/omega/simulator/OmegaActivity.java b/ion/src/simulator/android/src/java/io/github/omega/simulator/OmegaActivity.java index 259922365..317847f3a 100644 --- a/ion/src/simulator/android/src/java/io/github/omega/simulator/OmegaActivity.java +++ b/ion/src/simulator/android/src/java/io/github/omega/simulator/OmegaActivity.java @@ -32,7 +32,7 @@ public class OmegaActivity extends SDLActivity { this.getResources().getAssets().open(identifier) ); } catch (Exception e) { - Log.w("LoadTexture", "Coundn't load a file:" + identifier); + Log.w("LoadTexture", "Couldn't load a file:" + identifier); } return bitmap; } diff --git a/ion/src/simulator/android/src/java/org/libsdl/app/SDLActivity.java b/ion/src/simulator/android/src/java/org/libsdl/app/SDLActivity.java index 082ae4be1..8d6ad9845 100644 --- a/ion/src/simulator/android/src/java/org/libsdl/app/SDLActivity.java +++ b/ion/src/simulator/android/src/java/org/libsdl/app/SDLActivity.java @@ -164,7 +164,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh } public static void initialize() { - // The static nature of the singleton and Android quirkyness force us to initialize everything here + // The static nature of the singleton and Android quirkiness force us to initialize everything here // Otherwise, when exiting the app and returning to it, these variables *keep* their pre exit values mSingleton = null; mSurface = null; diff --git a/ion/src/simulator/external/sdl/src/core/winrt/SDL_winrtapp_direct3d.cpp b/ion/src/simulator/external/sdl/src/core/winrt/SDL_winrtapp_direct3d.cpp index a6f76db52..d01225f38 100644 --- a/ion/src/simulator/external/sdl/src/core/winrt/SDL_winrtapp_direct3d.cpp +++ b/ion/src/simulator/external/sdl/src/core/winrt/SDL_winrtapp_direct3d.cpp @@ -586,7 +586,7 @@ void SDL_WinRTApp::OnVisibilityChanged(CoreWindow^ sender, VisibilityChangedEven } // HACK: Prevent SDL's window-hide handling code, which currently - // triggers a fake window resize (possibly erronously), from + // triggers a fake window resize (possibly erroneously), from // marking the SDL window's surface as invalid. // // A better solution to this probably involves figuring out if the diff --git a/ion/src/simulator/external/sdl/src/hidapi/ios/hid.m b/ion/src/simulator/external/sdl/src/hidapi/ios/hid.m index a0ca7cd02..9470d44d4 100644 --- a/ion/src/simulator/external/sdl/src/hidapi/ios/hid.m +++ b/ion/src/simulator/external/sdl/src/hidapi/ios/hid.m @@ -337,7 +337,7 @@ typedef enum NSLog( @"CoreBluetooth BLE hardware is powered on and ready" ); // at startup, if we have no already attached peripherals, do a 20s scan for new unpaired devices, - // otherwise callers should occaisionally do additional scans. we don't want to continuously be + // otherwise callers should occasionally do additional scans. we don't want to continuously be // scanning because it drains battery, causes other nearby people to have a hard time pairing their // Steam Controllers, and may also trigger firmware weirdness when a device attempts to start // the pairing sequence multiple times concurrently @@ -684,7 +684,7 @@ static void process_pending_events() - (void)peripheral:(CBPeripheral *)peripheral didUpdateNotificationStateForCharacteristic:(CBCharacteristic *)characteristic error:(NSError *)error { - NSLog( @"didUpdateNotifcationStateForCharacteristic %@ (%@)", characteristic, error ); + NSLog( @"didUpdateNotificationStateForCharacteristic %@ (%@)", characteristic, error ); } @end diff --git a/ion/src/simulator/external/sdl/src/hidapi/linux/hid.c b/ion/src/simulator/external/sdl/src/hidapi/linux/hid.c index 2cc2d8b98..f4e05a264 100644 --- a/ion/src/simulator/external/sdl/src/hidapi/linux/hid.c +++ b/ion/src/simulator/external/sdl/src/hidapi/linux/hid.c @@ -143,7 +143,7 @@ static wchar_t *utf8_to_wchar_t(const char *utf8) return ret; } -/* Get an attribute value from a udev_device and return it as a whar_t +/* Get an attribute value from a udev_device and return it as a wchar_t string. The returned string must be freed with free() when done.*/ static wchar_t *copy_udev_string(struct udev_device *dev, const char *udev_name) { diff --git a/ion/src/simulator/external/sdl/src/hidapi/mac/hid.c b/ion/src/simulator/external/sdl/src/hidapi/mac/hid.c index 55daf5782..98522a60f 100644 --- a/ion/src/simulator/external/sdl/src/hidapi/mac/hid.c +++ b/ion/src/simulator/external/sdl/src/hidapi/mac/hid.c @@ -644,7 +644,7 @@ static void hid_report_callback(void *context, IOReturn result, void *sender, } -/* This gets called when the read_thred's run loop gets signaled by +/* This gets called when the read_thread's run loop gets signaled by hid_close(), and serves to stop the read_thread's run loop. */ static void perform_signal_callback(void *context) { @@ -702,7 +702,7 @@ static void *read_thread(void *param) /* Now that the read thread is stopping, Wake any threads which are waiting on data (in hid_read_timeout()). Do this under a mutex to make sure that a thread which is about to go to sleep waiting on - the condition acutally will go to sleep before the condition is + the condition actually will go to sleep before the condition is signaled. */ pthread_mutex_lock(&dev->mutex); pthread_cond_broadcast(&dev->condition); @@ -874,7 +874,7 @@ static int cond_wait(const hid_device *dev, pthread_cond_t *cond, pthread_mutex_ return res; /* A res of 0 means we may have been signaled or it may - be a spurious wakeup. Check to see that there's acutally + be a spurious wakeup. Check to see that there's actually data in the queue before returning, and if not, go back to sleep. See the pthread_cond_timedwait() man page for details. */ @@ -894,7 +894,7 @@ static int cond_timedwait(const hid_device *dev, pthread_cond_t *cond, pthread_m return res; /* A res of 0 means we may have been signaled or it may - be a spurious wakeup. Check to see that there's acutally + be a spurious wakeup. Check to see that there's actually data in the queue before returning, and if not, go back to sleep. See the pthread_cond_timedwait() man page for details. */ diff --git a/ion/src/simulator/external/sdl/src/libm/e_log.c b/ion/src/simulator/external/sdl/src/libm/e_log.c index 208df815c..e4f4c393e 100644 --- a/ion/src/simulator/external/sdl/src/libm/e_log.c +++ b/ion/src/simulator/external/sdl/src/libm/e_log.c @@ -15,7 +15,7 @@ #endif /* __ieee754_log(x) - * Return the logrithm of x + * Return the logarithm of x * * Method : * 1. Argument Reduction: find k and f such that diff --git a/ion/src/simulator/external/sdl/src/libm/e_pow.c b/ion/src/simulator/external/sdl/src/libm/e_pow.c index a3d24ced9..eed93d076 100644 --- a/ion/src/simulator/external/sdl/src/libm/e_pow.c +++ b/ion/src/simulator/external/sdl/src/libm/e_pow.c @@ -16,7 +16,7 @@ * 1. Compute and return log2(x) in two pieces: * log2(x) = w1 + w2, * where w1 has 53-24 = 29 bit trailing zeros. - * 2. Perform y*log2(x) = n+y' by simulating muti-precision + * 2. Perform y*log2(x) = n+y' by simulating multi-precision * arithmetic, where |y'|<=0.5. * 3. Return x**y = 2**n*exp(y'*log2) * diff --git a/ion/src/simulator/external/sdl/src/libm/e_sqrt.c b/ion/src/simulator/external/sdl/src/libm/e_sqrt.c index 39c83e1f3..652fc01c3 100644 --- a/ion/src/simulator/external/sdl/src/libm/e_sqrt.c +++ b/ion/src/simulator/external/sdl/src/libm/e_sqrt.c @@ -37,7 +37,7 @@ * If (2) is false, then q = q ; otherwise q = q + 2 . * i+1 i i+1 i * - * With some algebric manipulation, it is not difficult to see + * With some algebraic manipulation, it is not difficult to see * that (2) is equivalent to * -(i+1) * s + 2 <= y (3) @@ -116,7 +116,7 @@ double attribute_hidden __ieee754_sqrt(double x) ix0 |= (ix1>>(32-i)); ix1 <<= i; } - m -= 1023; /* unbias exponent */ + m -= 1023; /* unbiased exponent */ ix0 = (ix0&0x000fffff)|0x00100000; if(m&1){ /* odd m, double x to make it even */ ix0 += ix0 + ((ix1&sign)>>31); @@ -280,7 +280,7 @@ A. sqrt(x) by Newton Iteration This formula has one division fewer than the one above; however, it requires more multiplications and additions. Also x must be scaled in advance to avoid spurious overflow in evaluating the - expression 3y*y+x. Hence it is not recommended uless division + expression 3y*y+x. Hence it is not recommended unless division is slow. If division is very slow, then one should use the reciproot algorithm given in section B. @@ -330,7 +330,7 @@ B. sqrt(x) by Reciproot Iteration Let x0 and x1 be the leading and the trailing 32-bit words of a floating point number x (in IEEE double format) respectively - (see section A). By performing shifs and subtracts on x0 and y0, + (see section A). By performing shifts and subtracts on x0 and y0, we obtain a 7.8-bit approximation of 1/sqrt(x) as follows. k := 0x5fe80000 - (x0>>1); diff --git a/ion/src/simulator/external/sdl/src/libm/k_rem_pio2.c b/ion/src/simulator/external/sdl/src/libm/k_rem_pio2.c index 393db541d..d4b8155b2 100644 --- a/ion/src/simulator/external/sdl/src/libm/k_rem_pio2.c +++ b/ion/src/simulator/external/sdl/src/libm/k_rem_pio2.c @@ -47,7 +47,7 @@ * 64-bit precision 2 * 113-bit precision 3 * The actual value is the sum of them. Thus for 113-bit - * precison, one may have to do something like: + * precision, one may have to do something like: * * long double t,w,r_head, r_tail; * t = (long double)y[2] + (long double)y[1]; @@ -184,7 +184,7 @@ int32_t attribute_hidden __kernel_rem_pio2(double *x, double *y, int e0, int nx, jz = jk; recompute: - /* distill q[] into iq[] reversingly */ + /* distill q[] into iq[] reversely */ for(i=0,j=jz,z=q[jz];j>0;i++,j--) { fw = (double)((int32_t)(twon24* z)); iq[i] = (int32_t)(z-two24*fw); diff --git a/ion/src/simulator/external/sdl/src/video/khronos/vulkan/vk_icd.h b/ion/src/simulator/external/sdl/src/video/khronos/vulkan/vk_icd.h index b935fa178..e0835b7ab 100644 --- a/ion/src/simulator/external/sdl/src/video/khronos/vulkan/vk_icd.h +++ b/ion/src/simulator/external/sdl/src/video/khronos/vulkan/vk_icd.h @@ -33,7 +33,7 @@ // Version 2 - Add Loader/ICD Interface version negotiation // via vk_icdNegotiateLoaderICDInterfaceVersion. // Version 3 - Add ICD creation/destruction of KHR_surface objects. -// Version 4 - Add unknown physical device extension qyering via +// Version 4 - Add unknown physical device extension querying via // vk_icdGetPhysicalDeviceProcAddr. // Version 5 - Tells ICDs that the loader is now paying attention to the // application version of Vulkan passed into the ApplicationInfo diff --git a/ion/src/simulator/external/sdl/src/video/khronos/vulkan/vk_layer.h b/ion/src/simulator/external/sdl/src/video/khronos/vulkan/vk_layer.h index 823c88ab7..631353d58 100644 --- a/ion/src/simulator/external/sdl/src/video/khronos/vulkan/vk_layer.h +++ b/ion/src/simulator/external/sdl/src/video/khronos/vulkan/vk_layer.h @@ -52,7 +52,7 @@ typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_GetPhysicalDeviceProcAddr)(VkInstance // Version negotiation values typedef enum VkNegotiateLayerStructType { - LAYER_NEGOTIATE_UNINTIALIZED = 0, + LAYER_NEGOTIATE_UNINITIALIZED = 0, LAYER_NEGOTIATE_INTERFACE_STRUCT = 1, } VkNegotiateLayerStructType; diff --git a/ion/src/simulator/external/sdl/src/video/qnx/gl.c b/ion/src/simulator/external/sdl/src/video/qnx/gl.c index 19e1bd4f7..2aebec675 100644 --- a/ion/src/simulator/external/sdl/src/video/qnx/gl.c +++ b/ion/src/simulator/external/sdl/src/video/qnx/gl.c @@ -25,7 +25,7 @@ static EGLDisplay egl_disp; /** - * Detertmines the pixel format to use based on the current display and EGL + * Determines the pixel format to use based on the current display and EGL * configuration. * @param egl_conf EGL configuration to use * @return A SCREEN_FORMAT* constant for the pixel format to use diff --git a/ion/src/simulator/external/sdl/src/video/qnx/keyboard.c b/ion/src/simulator/external/sdl/src/video/qnx/keyboard.c index 86c6395ba..c7288a215 100644 --- a/ion/src/simulator/external/sdl/src/video/qnx/keyboard.c +++ b/ion/src/simulator/external/sdl/src/video/qnx/keyboard.c @@ -27,7 +27,7 @@ #include /** - * A map thta translates Screen key names to SDL scan codes. + * A map that translates Screen key names to SDL scan codes. * This map is incomplete, but should include most major keys. */ static int key_to_sdl[] = { diff --git a/ion/src/simulator/external/sdl/src/video/qnx/video.c b/ion/src/simulator/external/sdl/src/video/qnx/video.c index ff8223c77..84ed13cf5 100644 --- a/ion/src/simulator/external/sdl/src/video/qnx/video.c +++ b/ion/src/simulator/external/sdl/src/video/qnx/video.c @@ -182,7 +182,7 @@ createWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, * Informs the window manager that the window needs to be updated. * @param _THIS * @param window The window to update - * @param rects An array of reectangular areas to update + * @param rects An array of rectangular areas to update * @param numrects Rect array length * @return 0 if successful, -1 on error */ diff --git a/ion/src/simulator/external/sdl/src/video/winrt/SDL_winrtvideo.cpp b/ion/src/simulator/external/sdl/src/video/winrt/SDL_winrtvideo.cpp index 87c61c928..fa10a49c0 100644 --- a/ion/src/simulator/external/sdl/src/video/winrt/SDL_winrtvideo.cpp +++ b/ion/src/simulator/external/sdl/src/video/winrt/SDL_winrtvideo.cpp @@ -597,7 +597,7 @@ WINRT_CreateWindow(_THIS, SDL_Window * window) /* OpenGL ES 2 wasn't requested. Don't set up an EGL surface. */ data->egl_surface = EGL_NO_SURFACE; } else { - /* OpenGL ES 2 was reuqested. Set up an EGL surface. */ + /* OpenGL ES 2 was requested. Set up an EGL surface. */ SDL_VideoData * video_data = (SDL_VideoData *)_this->driverdata; /* Call SDL_EGL_ChooseConfig and eglCreateWindowSurface directly, diff --git a/ion/src/simulator/linux/Makefile b/ion/src/simulator/linux/Makefile index 0a58ad996..5042f976c 100644 --- a/ion/src/simulator/linux/Makefile +++ b/ion/src/simulator/linux/Makefile @@ -47,5 +47,5 @@ $(eval $(call rule_for, \ $(call object_for,ion/src/simulator/linux/platform_images.cpp): $(BUILD_DIR)/ion/src/simulator/linux/platform_images.h -# The header is refered to as so make sure it's findable this way +# The header is referred to as so make sure it's findable this way $(call object_for,ion/src/simulator/linux/platform_images.cpp): SFLAGS += -I$(BUILD_DIR) diff --git a/ion/src/simulator/shared/apple/helpers.mak b/ion/src/simulator/shared/apple/helpers.mak index bf765b0d5..6298239ee 100644 --- a/ion/src/simulator/shared/apple/helpers.mak +++ b/ion/src/simulator/shared/apple/helpers.mak @@ -1,4 +1,4 @@ -# This file contains all the recipies shared between iOS and macOS. +# This file contains all the recipes shared between iOS and macOS. # The only things that have to be customized per platform are the icons and the # Info.plist. diff --git a/ion/src/simulator/shared/apple/targets.mak b/ion/src/simulator/shared/apple/targets.mak index 027602f2e..8c790886b 100644 --- a/ion/src/simulator/shared/apple/targets.mak +++ b/ion/src/simulator/shared/apple/targets.mak @@ -1,7 +1,7 @@ .PRECIOUS: $(simulator_app_deps) # CAUTION: The empty line in this rule is important! -# Indeed, rule without receipe serve a special purpose +# Indeed, rule without recipe serve a special purpose # https://www.gnu.org/software/make/manual/html_node/Canceling-Rules.html .PRECIOUS: $(BUILD_DIR)/%.app $(BUILD_DIR)/%.app: $(simulator_app_deps) diff --git a/ion/src/simulator/shared/events_platform.cpp b/ion/src/simulator/shared/events_platform.cpp index 8eb5b894a..ad60ce0ce 100644 --- a/ion/src/simulator/shared/events_platform.cpp +++ b/ion/src/simulator/shared/events_platform.cpp @@ -163,7 +163,7 @@ Event getPlatformEvent() { SDL_GetMouseState(&p.x, &p.y); Simulator::Layout::highlightKeyAt(&p); } - /* On smarphones, don't forget to unhighlight the key when the finger is up. + /* On smartphones, don't forget to unhighlight the key when the finger is up. * (finger up doesn't imply a mouse motion!) */ if (event.type == SDL_FINGERUP) { Simulator::Layout::unhighlightKey(); diff --git a/ion/src/simulator/web/clipboard_helper.cpp b/ion/src/simulator/web/clipboard_helper.cpp index c7423cb31..1ad83287e 100644 --- a/ion/src/simulator/web/clipboard_helper.cpp +++ b/ion/src/simulator/web/clipboard_helper.cpp @@ -49,8 +49,8 @@ EM_JS(void, get_clipboard_text, (char * buffer, uint32_t bufferSize, AsyncStatus try { navigator.clipboard.readText().then( function(text) { - var lenghtBytes = Math.min(lengthBytesUTF8(text) + 1, bufferSize); - stringToUTF8(text, buffer, lenghtBytes); + var lengthBytes = Math.min(lengthBytesUTF8(text) + 1, bufferSize); + stringToUTF8(text, buffer, lengthBytes); HEAP32[status>>2] = success; }, function(text) { HEAP32[status>>2] = failure; } diff --git a/ion/src/simulator/windows/platform_files.cpp b/ion/src/simulator/windows/platform_files.cpp index 865f47179..528e8a354 100644 --- a/ion/src/simulator/windows/platform_files.cpp +++ b/ion/src/simulator/windows/platform_files.cpp @@ -15,7 +15,7 @@ static OPENFILENAME * getOFN(const char * extension) { static char filter[32]; if (snprintf(filter, sizeof(filter), "%s%c*.%s%c%c", extension, 0, extension, 0, 0) < 0) { - /* Note: We cannot use litteral \0 in the format string, otherwise snprintf + /* Note: We cannot use literal \0 in the format string, otherwise snprintf * will think the format string is finished... */ return nullptr; } diff --git a/ion/test/device/n0110/external_flash_tests.ld b/ion/test/device/n0110/external_flash_tests.ld index 61a8b97d3..bf6b07c1d 100644 --- a/ion/test/device/n0110/external_flash_tests.ld +++ b/ion/test/device/n0110/external_flash_tests.ld @@ -61,7 +61,7 @@ SECTIONS { /* The data section is written to Flash but linked as if it were in RAM. * * This is required because its initial value matters (so it has to be in - * persistant memory in the first place), but it is a R/W area of memory + * persistent memory in the first place), but it is a R/W area of memory * so it will have to live in RAM upon execution (in linker lingo, that * translates to the data section having a LMA in Flash and a VMA in RAM). * diff --git a/ion/test/utf8_helper.cpp b/ion/test/utf8_helper.cpp index 4e182142b..8a53da373 100644 --- a/ion/test/utf8_helper.cpp +++ b/ion/test/utf8_helper.cpp @@ -3,15 +3,15 @@ #include #include -void assert_occurences_count(const char * string, CodePoint c, int result) { +void assert_occurrences_count(const char * string, CodePoint c, int result) { quiz_assert(UTF8Helper::CountOccurrences(string, c) == result); } QUIZ_CASE(ion_utf8_helper_count_occurrences) { - assert_occurences_count("1234", '1', 1); - assert_occurences_count("2232", '2', 3); - assert_occurences_count("2π2∑32∑", UCodePointGreekSmallLetterPi, 1); - assert_occurences_count("2π2∑32∑", UCodePointNArySummation, 2); + assert_occurrences_count("1234", '1', 1); + assert_occurrences_count("2232", '2', 3); + assert_occurrences_count("2π2∑32∑", UCodePointGreekSmallLetterPi, 1); + assert_occurrences_count("2π2∑32∑", UCodePointNArySummation, 2); } void assert_code_point_searched_is(const char * string, CodePoint c, const char * result) { diff --git a/kandinsky/fonts/code_points.h b/kandinsky/fonts/code_points.h index 0c1509b8b..ec011e91a 100644 --- a/kandinsky/fonts/code_points.h +++ b/kandinsky/fonts/code_points.h @@ -135,7 +135,7 @@ uint32_t SimpleCodePoints[] = { 0x394, // Δ // GREEK CAPITAL LETTER DELTA 0x3a9, // Ω // GREEK CAPITAL LETTER OMEGA 0x3b8, // θ // GREEK SMALL LETTER THETA - 0x3bb, // λ // GREEK SMALL LETTER LAMDA + 0x3bb, // λ // GREEK SMALL LETTER LAMBDA 0x3bc, // μ // GREEK SMALL LETTER MU 0x3c0, // π // GREEK SMALL LETTER PI 0x3c3, // σ // GREEK SMALL LETTER SIGMA diff --git a/kandinsky/fonts/rasterizer.c b/kandinsky/fonts/rasterizer.c index 7e4e84359..fcc9a2ed1 100644 --- a/kandinsky/fonts/rasterizer.c +++ b/kandinsky/fonts/rasterizer.c @@ -185,7 +185,7 @@ int main(int argc, char * argv[]) { fprintf(sourceFile, "/* This file is auto-generated by the rasterizer */\n\n"); fprintf(sourceFile, "#include \n\n"); - // Step 1 - Build the GlyphIndex <-> UnicodeCodePoint correspondance table + // Step 1 - Build the GlyphIndex <-> UnicodeCodePoint correspondence table int previousIndex = -1; uint32_t previousCodePoint = 0; diff --git a/kandinsky/src/context_rect.cpp b/kandinsky/src/context_rect.cpp index 69f5f3338..4e46c2e4e 100644 --- a/kandinsky/src/context_rect.cpp +++ b/kandinsky/src/context_rect.cpp @@ -77,10 +77,10 @@ void KDContext::blendRectWithMask(KDRect rect, KDColor color, const uint8_t * ma startingJ = startingJ > 0 ? startingJ : 0; for (KDCoordinate j=0; j>(32-i)); ix1 <<= i; } - m -= 1023; /* unbias exponent */ + m -= 1023; /* unbiased exponent */ ix0 = (ix0&0x000fffff)|0x00100000; if(m&1){ /* odd m, double x to make it even */ ix0 += ix0 + ((ix1&sign)>>31); @@ -266,7 +266,7 @@ A. sqrt(x) by Newton Iteration This formula has one division fewer than the one above; however, it requires more multiplications and additions. Also x must be scaled in advance to avoid spurious overflow in evaluating the - expression 3y*y+x. Hence it is not recommended uless division + expression 3y*y+x. Hence it is not recommended unless division is slow. If division is very slow, then one should use the reciproot algorithm given in section B. @@ -316,7 +316,7 @@ B. sqrt(x) by Reciproot Iteration Let x0 and x1 be the leading and the trailing 32-bit words of a floating point number x (in IEEE double format) respectively - (see section A). By performing shifs and subtracts on x0 and y0, + (see section A). By performing shifts and subtracts on x0 and y0, we obtain a 7.8-bit approximation of 1/sqrt(x) as follows. k := 0x5fe80000 - (x0>>1); diff --git a/liba/src/external/openbsd/e_sqrtf.c b/liba/src/external/openbsd/e_sqrtf.c index 80d35278c..64eb82e0e 100644 --- a/liba/src/external/openbsd/e_sqrtf.c +++ b/liba/src/external/openbsd/e_sqrtf.c @@ -45,7 +45,7 @@ sqrtf(float x) for(i=0;(ix&0x00800000)==0;i++) ix<<=1; m -= i-1; } - m -= 127; /* unbias exponent */ + m -= 127; /* unbiased exponent */ ix = (ix&0x007fffff)|0x00800000; if(m&1) /* odd m, double x to make it even */ ix += ix; diff --git a/liba/src/external/openbsd/k_rem_pio2.c b/liba/src/external/openbsd/k_rem_pio2.c index 80279a743..6fec67170 100644 --- a/liba/src/external/openbsd/k_rem_pio2.c +++ b/liba/src/external/openbsd/k_rem_pio2.c @@ -48,7 +48,7 @@ * 64-bit precision 2 * 113-bit precision 3 * The actual value is the sum of them. Thus for 113-bit - * precison, one may have to do something like: + * precision, one may have to do something like: * * long double t,w,r_head, r_tail; * t = (long double)y[2] + (long double)y[1]; @@ -307,7 +307,7 @@ __kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec) jz = jk; recompute: - /* distill q[] into iq[] reversingly */ + /* distill q[] into iq[] reversely */ for(i=0,j=jz,z=q[jz];j>0;i++,j--) { fw = (double)((int32_t)(twon24* z)); iq[i] = (int32_t)(z-two24*fw); diff --git a/liba/src/external/openbsd/k_rem_pio2f.c b/liba/src/external/openbsd/k_rem_pio2f.c index 5931cbab9..50208c645 100644 --- a/liba/src/external/openbsd/k_rem_pio2f.c +++ b/liba/src/external/openbsd/k_rem_pio2f.c @@ -68,7 +68,7 @@ __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, jz = jk; recompute: - /* distill q[] into iq[] reversingly */ + /* distill q[] into iq[] reversely */ for(i=0,j=jz,z=q[jz];j>0;i++,j--) { fw = (float)((int32_t)(twon8* z)); iq[i] = (int32_t)(z-two8*fw); diff --git a/liba/src/external/sqlite/sqliteInt.h b/liba/src/external/sqlite/sqliteInt.h index 785939ca7..96f9ff0b6 100644 --- a/liba/src/external/sqlite/sqliteInt.h +++ b/liba/src/external/sqlite/sqliteInt.h @@ -29,7 +29,7 @@ typedef int64_t sqlite3_int64; #define UNUSED_PARAMETER(x) ((void)0) #define SQLITE_OK 0 -/* Completly ignore asserts: one of them contains a modulo, which our platform +/* Completely ignore asserts: one of them contains a modulo, which our platform * doesn't support in hardware. This therefore translates to a __aeabi_idivmod * call, which we do not provide. */ #define assert(x) ((void)0) diff --git a/libaxx/README.txt b/libaxx/README.txt index ee62c7629..2835e304e 100644 --- a/libaxx/README.txt +++ b/libaxx/README.txt @@ -1,3 +1,3 @@ libaxx is an adhoc libc++, just like liba is an adhoc libc. -See liba for more informations. +See liba for more information. diff --git a/poincare/include/poincare/based_integer.h b/poincare/include/poincare/based_integer.h index 4dd2627d9..58fe4aa2d 100644 --- a/poincare/include/poincare/based_integer.h +++ b/poincare/include/poincare/based_integer.h @@ -50,7 +50,7 @@ private: class BasedInteger final : public Number { friend class BasedIntegerNode; public: - /* The constructor build a irreductible fraction */ + /* The constructor build a irreducible fraction */ BasedInteger(const BasedIntegerNode * node) : Number(node) {} static BasedInteger Builder(const char * digits, size_t size, Integer::Base base); static BasedInteger Builder(const Integer & m, Integer::Base base = Integer::Base::Decimal); diff --git a/poincare/include/poincare/equal.h b/poincare/include/poincare/equal.h index 1f61b2c57..14be15df1 100644 --- a/poincare/include/poincare/equal.h +++ b/poincare/include/poincare/equal.h @@ -27,7 +27,7 @@ private: // Layout Layout createLayout(Preferences::PrintFloatMode floatDisplayMode, int numberOfSignificantDigits) const override; int serialize(char * buffer, int bufferSize, Preferences::PrintFloatMode floatDisplayMode, int numberOfSignificantDigits) const override; - // Evalutation + // Evaluation Evaluation approximate(SinglePrecision p, ApproximationContext approximationContext) const override { return templatedApproximate(approximationContext); } Evaluation approximate(DoublePrecision p, ApproximationContext approximationContext) const override { return templatedApproximate(approximationContext); } template Evaluation templatedApproximate(ApproximationContext approximationContext) const; diff --git a/poincare/include/poincare/expression.h b/poincare/include/poincare/expression.h index d75a684cf..452c078d1 100644 --- a/poincare/include/poincare/expression.h +++ b/poincare/include/poincare/expression.h @@ -338,7 +338,7 @@ protected: * Float to Symbol for instance). * * We could have overriden the operator T(). However, even with the - * 'explicit' keyword (which prevents implicit casts), direct initilization + * 'explicit' keyword (which prevents implicit casts), direct initialization * are enable which can lead to weird code: * ie, you can write: 'Rational a(2); AbsoluteValue b(a);' * */ @@ -407,7 +407,7 @@ private: static constexpr int k_maxSymbolReplacementsCount = 10; static bool sSymbolReplacementsCountLock; - /* Add missing parenthesis will add parentheses that easen the reading of the + /* Add missing parenthesis will add parentheses that ease the reading of the * expression or that are required by math rules. For example: * 2+-1 --> 2+(-1) * *(+(2,1),3) --> (2+1)*3 diff --git a/poincare/include/poincare/expression_node.h b/poincare/include/poincare/expression_node.h index 5a5dbccb2..ce0a702cf 100644 --- a/poincare/include/poincare/expression_node.h +++ b/poincare/include/poincare/expression_node.h @@ -298,7 +298,7 @@ public: virtual Expression unaryFunctionDifferential(ReductionContext reductionContext); /* Return a clone of the denominator part of the expression */ /*!*/ virtual Expression denominator(ExpressionNode::ReductionContext reductionContext) const; - /* LayoutShape is used to check if the multiplication sign can be omitted between two expressions. It depends on the "layout syle" of the on the right of the left expression */ + /* LayoutShape is used to check if the multiplication sign can be omitted between two expressions. It depends on the "layout style" of the on the right of the left expression */ enum class LayoutShape { Decimal, Integer, diff --git a/poincare/include/poincare/float.h b/poincare/include/poincare/float.h index 1c08efe3b..ae0a7dd7d 100644 --- a/poincare/include/poincare/float.h +++ b/poincare/include/poincare/float.h @@ -6,7 +6,7 @@ namespace Poincare { -/* Float reprensents an approximated number. This class is use to avoid turning +/* Float represents an approximated number. This class is use to avoid turning * float/double into Decimal back and forth because performances are * dramatically affected when doing so. For instance, when plotting a graph, we * need to set a float/double value for a symbol and approximate an expression diff --git a/poincare/include/poincare/infinity.h b/poincare/include/poincare/infinity.h index bc17f0101..1a3023c04 100644 --- a/poincare/include/poincare/infinity.h +++ b/poincare/include/poincare/infinity.h @@ -39,7 +39,7 @@ public: int serialize(char * buffer, int bufferSize, Preferences::PrintFloatMode floatDisplayMode = Preferences::PrintFloatMode::Decimal, int numberOfSignificantDigits = 0) const override; /* Derivation - * Unlike Numbers that derivate to 0, Infinity derivates to Undefined. */ + * Unlike Numbers that derivate to 0, Infinity derivatives to Undefined. */ bool derivate(ReductionContext reductionContext, Expression symbol, Expression symbolValue) override; private: diff --git a/poincare/include/poincare/n_ary_expression.h b/poincare/include/poincare/n_ary_expression.h index 64dedd156..c27c8f0e8 100644 --- a/poincare/include/poincare/n_ary_expression.h +++ b/poincare/include/poincare/n_ary_expression.h @@ -48,7 +48,7 @@ public: /* allChildrenAreReal returns: * - 1 if all children are real * - 0 if all non real children are ComplexCartesian - * - -1 if some chidren are non-real and non ComplexCartesian */ + * - -1 if some children are non-real and non ComplexCartesian */ int allChildrenAreReal(Context * context) const; protected: void sortChildrenInPlace(NAryExpressionNode::ExpressionOrder order, Context * context, bool canSwapMatrices, bool canBeInterrupted) { diff --git a/poincare/include/poincare/print_float.h b/poincare/include/poincare/print_float.h index a3d2474be..c12da059c 100644 --- a/poincare/include/poincare/print_float.h +++ b/poincare/include/poincare/print_float.h @@ -21,13 +21,13 @@ public: constexpr static int k_maxFloatGlyphLength = 2 // '-' and '.' + k_numberOfStoredSignificantDigits // mantissa + 1 // ᴇ - + 1 // exponant '-' - + 3; // exponant + + 1 // exponent '-' + + 3; // exponent constexpr static int k_maxFloatCharSize = 2 // '-' and '.' + k_numberOfStoredSignificantDigits // mantissa + k_specialECodePointByteLength // ᴇ - + 1 // exponant '-' - + 3 // exponant + + 1 // exponent '-' + + 3 // exponent + 1; // null-terminated constexpr static int glyphLengthForFloatWithPrecision(int numberOfSignificantDigits) { @@ -36,15 +36,15 @@ public: + numberOfSignificantDigits // mantissa + 1 // glyph ᴇ + 1 // '-' - + 3; // exponant + + 3; // exponent } constexpr static int charSizeForFloatsWithPrecision(int numberOfSignificantDigits) { // The worst case is -1.234ᴇ-328 return 2 // '-' and '.' + numberOfSignificantDigits // mantissa + k_specialECodePointByteLength // ᴇ - + 1 // exponant '-' - + 3 // exponant + + 1 // exponent '-' + + 3 // exponent + 1; // null-terminated } diff --git a/poincare/include/poincare/rational.h b/poincare/include/poincare/rational.h index 2b7bf6271..0e1b38374 100644 --- a/poincare/include/poincare/rational.h +++ b/poincare/include/poincare/rational.h @@ -73,7 +73,7 @@ class Rational final : public Number { friend class PowerNode; friend class Power; public: - /* The constructor build a irreductible fraction */ + /* The constructor build a irreducible fraction */ Rational(const RationalNode * node) : Number(node) {} static Rational Builder(Integer & num, Integer & den); static Rational Builder(const Integer & numerator); diff --git a/poincare/include/poincare/store.h b/poincare/include/poincare/store.h index cc89d40ec..e32f50cc9 100644 --- a/poincare/include/poincare/store.h +++ b/poincare/include/poincare/store.h @@ -22,7 +22,7 @@ public: private: // Simplification Expression shallowReduce(ReductionContext reductionContext) override; - // Evalutation + // Evaluation Evaluation approximate(SinglePrecision p, ApproximationContext approximationContext) const override { return templatedApproximate(approximationContext); } Evaluation approximate(DoublePrecision p, ApproximationContext approximationContext) const override { return templatedApproximate(approximationContext); } template Evaluation templatedApproximate(ApproximationContext approximationContext) const; diff --git a/poincare/include/poincare/undefined.h b/poincare/include/poincare/undefined.h index 7dfb094f3..e10b6b16f 100644 --- a/poincare/include/poincare/undefined.h +++ b/poincare/include/poincare/undefined.h @@ -30,7 +30,7 @@ public: } /* Derivation - * Unlike Numbers that derivate to 0, Undefined derivates to Undefined. */ + * Unlike Numbers that derivate to 0, Undefined derivatives to Undefined. */ bool derivate(ReductionContext reductionContext, Expression symbol, Expression symbolValue) override { return true; } // Layout diff --git a/poincare/include/poincare/unit.h b/poincare/include/poincare/unit.h index 4d4eee249..f99d2d59d 100644 --- a/poincare/include/poincare/unit.h +++ b/poincare/include/poincare/unit.h @@ -60,15 +60,15 @@ public: static Vector FromBaseUnits(const Expression baseUnits); const T coefficientAtIndex(size_t i) const { assert(i < k_numberOfBaseUnits); - const T coefficients[k_numberOfBaseUnits] = {time, distance, mass, current, temperature, amountOfSubstance, luminuousIntensity}; + const T coefficients[k_numberOfBaseUnits] = {time, distance, mass, current, temperature, amountOfSubstance, luminousIntensity}; return coefficients[i]; } void setCoefficientAtIndex(size_t i, T c) { assert(i < k_numberOfBaseUnits); - T * coefficientsAddresses[k_numberOfBaseUnits] = {&time, &distance, &mass, ¤t, &temperature, &amountOfSubstance, &luminuousIntensity}; + T * coefficientsAddresses[k_numberOfBaseUnits] = {&time, &distance, &mass, ¤t, &temperature, &amountOfSubstance, &luminousIntensity}; *(coefficientsAddresses[i]) = c; } - bool operator==(const Vector &rhs) const { return time == rhs.time && distance == rhs.distance && mass == rhs.mass && current == rhs.current && temperature == rhs.temperature && amountOfSubstance == rhs.amountOfSubstance && luminuousIntensity == rhs.luminuousIntensity; } + bool operator==(const Vector &rhs) const { return time == rhs.time && distance == rhs.distance && mass == rhs.mass && current == rhs.current && temperature == rhs.temperature && amountOfSubstance == rhs.amountOfSubstance && luminousIntensity == rhs.luminousIntensity; } bool operator!=(const Vector &rhs) const { return !(*this == rhs); } void addAllCoefficients(const Vector other, int factor); Expression toBaseUnits() const; @@ -78,7 +78,7 @@ public: T current; T temperature; T amountOfSubstance; - T luminuousIntensity; + T luminousIntensity; }; class Representative { @@ -104,7 +104,7 @@ public: m_outputPrefixable(outputPrefixable) {} - virtual const Vector dimensionVector() const { return Vector{.time = 0, .distance = 0, .mass = 0, .current = 0, .temperature = 0, .amountOfSubstance = 0, .luminuousIntensity = 0}; }; + virtual const Vector dimensionVector() const { return Vector{.time = 0, .distance = 0, .mass = 0, .current = 0, .temperature = 0, .amountOfSubstance = 0, .luminousIntensity = 0}; }; virtual int numberOfRepresentatives() const { return 0; }; /* representativesOfSameDimension returns a pointer to the array containing * all representatives for this's dimension. */ @@ -113,7 +113,7 @@ public: virtual bool isBaseUnit() const { return false; } virtual const Representative * standardRepresentative(double value, double exponent, ExpressionNode::ReductionContext reductionContext, const Prefix * * prefix) const { return DefaultFindBestRepresentative(value, exponent, representativesOfSameDimension(), numberOfRepresentatives(), prefix); } /* hasSpecialAdditionalExpressions return true if the unit has special - * forms suchas as splits (for time and imperial units) or common + * forms such as as splits (for time and imperial units) or common * conversions (such as speed and energy). */ virtual bool hasSpecialAdditionalExpressions(double value, Preferences::UnitFormat unitFormat) const { return false; } virtual int setAdditionalExpressions(double value, Expression * dest, int availableLength, ExpressionNode::ReductionContext reductionContext) const { return 0; } @@ -145,7 +145,7 @@ public: friend class Unit; public: constexpr static TimeRepresentative Default() { return TimeRepresentative(nullptr, 0., Prefixable::None, Prefixable::None); } - const Vector dimensionVector() const override { return Vector{.time = 1, .distance = 0, .mass = 0, .current = 0, .temperature = 0, .amountOfSubstance = 0, .luminuousIntensity = 0}; } + const Vector dimensionVector() const override { return Vector{.time = 1, .distance = 0, .mass = 0, .current = 0, .temperature = 0, .amountOfSubstance = 0, .luminousIntensity = 0}; } int numberOfRepresentatives() const override { return 7; } const Representative * representativesOfSameDimension() const override; bool isBaseUnit() const override { return this == representativesOfSameDimension(); } @@ -159,7 +159,7 @@ public: friend class Unit; public: constexpr static DistanceRepresentative Default() { return DistanceRepresentative(nullptr, 0., Prefixable::None, Prefixable::None); } - const Vector dimensionVector() const override { return Vector{.time = 0, .distance = 1, .mass = 0, .current = 0, .temperature = 0, .amountOfSubstance = 0, .luminuousIntensity = 0}; } + const Vector dimensionVector() const override { return Vector{.time = 0, .distance = 1, .mass = 0, .current = 0, .temperature = 0, .amountOfSubstance = 0, .luminousIntensity = 0}; } int numberOfRepresentatives() const override { return 8; } const Representative * representativesOfSameDimension() const override; bool isBaseUnit() const override { return this == representativesOfSameDimension(); } @@ -174,7 +174,7 @@ public: friend class Unit; public: constexpr static MassRepresentative Default() { return MassRepresentative(nullptr, 0., Prefixable::None, Prefixable::None); } - const Vector dimensionVector() const override { return Vector{.time = 0, .distance = 0, .mass = 1, .current = 0, .temperature = 0, .amountOfSubstance = 0, .luminuousIntensity = 0}; } + const Vector dimensionVector() const override { return Vector{.time = 0, .distance = 0, .mass = 1, .current = 0, .temperature = 0, .amountOfSubstance = 0, .luminousIntensity = 0}; } int numberOfRepresentatives() const override { return 7; } const Representative * representativesOfSameDimension() const override; const Prefix * basePrefix() const override; @@ -190,7 +190,7 @@ public: friend class Unit; public: constexpr static CurrentRepresentative Default() { return CurrentRepresentative(nullptr, 0., Prefixable::None, Prefixable::None); } - const Vector dimensionVector() const override { return Vector{.time = 0, .distance = 0, .mass = 0, .current = 1, .temperature = 0, .amountOfSubstance = 0, .luminuousIntensity = 0}; } + const Vector dimensionVector() const override { return Vector{.time = 0, .distance = 0, .mass = 0, .current = 1, .temperature = 0, .amountOfSubstance = 0, .luminousIntensity = 0}; } int numberOfRepresentatives() const override { return 1; } const Representative * representativesOfSameDimension() const override; bool isBaseUnit() const override { return this == representativesOfSameDimension(); } @@ -203,7 +203,7 @@ public: public: static double ConvertTemperatures(double value, const Representative * source, const Representative * target); constexpr static TemperatureRepresentative Default() { return TemperatureRepresentative(nullptr, 0., Prefixable::None, Prefixable::None); } - const Vector dimensionVector() const override { return Vector{.time = 0, .distance = 0, .mass = 0, .current = 0, .temperature = 1, .amountOfSubstance = 0, .luminuousIntensity = 0}; } + const Vector dimensionVector() const override { return Vector{.time = 0, .distance = 0, .mass = 0, .current = 0, .temperature = 1, .amountOfSubstance = 0, .luminousIntensity = 0}; } int numberOfRepresentatives() const override { return 3; } const Representative * representativesOfSameDimension() const override; bool isBaseUnit() const override { return this == representativesOfSameDimension(); } @@ -220,7 +220,7 @@ public: friend class Unit; public: constexpr static AmountOfSubstanceRepresentative Default() { return AmountOfSubstanceRepresentative(nullptr, 0., Prefixable::None, Prefixable::None); } - const Vector dimensionVector() const override { return Vector{.time = 0, .distance = 0, .mass = 0, .current = 0, .temperature = 0, .amountOfSubstance = 1, .luminuousIntensity = 0}; } + const Vector dimensionVector() const override { return Vector{.time = 0, .distance = 0, .mass = 0, .current = 0, .temperature = 0, .amountOfSubstance = 1, .luminousIntensity = 0}; } int numberOfRepresentatives() const override { return 1; } const Representative * representativesOfSameDimension() const override; bool isBaseUnit() const override { return this == representativesOfSameDimension(); } @@ -232,7 +232,7 @@ public: friend class Unit; public: constexpr static LuminousIntensityRepresentative Default() { return LuminousIntensityRepresentative(nullptr, 0., Prefixable::None, Prefixable::None); } - const Vector dimensionVector() const override { return Vector{.time = 0, .distance = 0, .mass = 0, .current = 0, .temperature = 0, .amountOfSubstance = 0, .luminuousIntensity = 1}; } + const Vector dimensionVector() const override { return Vector{.time = 0, .distance = 0, .mass = 0, .current = 0, .temperature = 0, .amountOfSubstance = 0, .luminousIntensity = 1}; } int numberOfRepresentatives() const override { return 1; } const Representative * representativesOfSameDimension() const override; bool isBaseUnit() const override { return this == representativesOfSameDimension(); } @@ -244,7 +244,7 @@ public: friend class Unit; public: constexpr static FrequencyRepresentative Default() { return FrequencyRepresentative(nullptr, 0., Prefixable::None, Prefixable::None); } - const Vector dimensionVector() const override { return Vector{.time = -1, .distance = 0, .mass = 0, .current = 0, .temperature = 0, .amountOfSubstance = 0, .luminuousIntensity = 0}; } + const Vector dimensionVector() const override { return Vector{.time = -1, .distance = 0, .mass = 0, .current = 0, .temperature = 0, .amountOfSubstance = 0, .luminousIntensity = 0}; } int numberOfRepresentatives() const override { return 1; } const Representative * representativesOfSameDimension() const override; private: @@ -255,7 +255,7 @@ public: friend class Unit; public: constexpr static ForceRepresentative Default() { return ForceRepresentative(nullptr, 0., Prefixable::None, Prefixable::None); } - const Vector dimensionVector() const override { return Vector{.time = -2, .distance = 1, .mass = 1, .current = 0, .temperature = 0, .amountOfSubstance = 0, .luminuousIntensity = 0}; } + const Vector dimensionVector() const override { return Vector{.time = -2, .distance = 1, .mass = 1, .current = 0, .temperature = 0, .amountOfSubstance = 0, .luminousIntensity = 0}; } int numberOfRepresentatives() const override { return 1; } const Representative * representativesOfSameDimension() const override; private: @@ -266,7 +266,7 @@ public: friend class Unit; public: constexpr static PressureRepresentative Default() { return PressureRepresentative(nullptr, 0., Prefixable::None, Prefixable::None); } - const Vector dimensionVector() const override { return Vector{.time = -2, .distance = -1, .mass = 1, .current = 0, .temperature = 0, .amountOfSubstance = 0, .luminuousIntensity = 0}; } + const Vector dimensionVector() const override { return Vector{.time = -2, .distance = -1, .mass = 1, .current = 0, .temperature = 0, .amountOfSubstance = 0, .luminousIntensity = 0}; } int numberOfRepresentatives() const override { return 3; } const Representative * representativesOfSameDimension() const override; private: @@ -277,7 +277,7 @@ public: friend class Unit; public: constexpr static EnergyRepresentative Default() { return EnergyRepresentative(nullptr, 0., Prefixable::None, Prefixable::None); } - const Vector dimensionVector() const override { return Vector{.time = -2, .distance = 2, .mass = 1, .current = 0, .temperature = 0, .amountOfSubstance = 0, .luminuousIntensity = 0}; } + const Vector dimensionVector() const override { return Vector{.time = -2, .distance = 2, .mass = 1, .current = 0, .temperature = 0, .amountOfSubstance = 0, .luminousIntensity = 0}; } int numberOfRepresentatives() const override { return 2; } const Representative * representativesOfSameDimension() const override; bool hasSpecialAdditionalExpressions(double value, Preferences::UnitFormat unitFormat) const override { return true; } @@ -290,7 +290,7 @@ public: friend class Unit; public: constexpr static PowerRepresentative Default() { return PowerRepresentative(nullptr, 0., Prefixable::None, Prefixable::None); } - const Vector dimensionVector() const override { return Vector{.time = -3, .distance = 2, .mass = 1, .current = 0, .temperature = 0, .amountOfSubstance = 0, .luminuousIntensity = 0}; } + const Vector dimensionVector() const override { return Vector{.time = -3, .distance = 2, .mass = 1, .current = 0, .temperature = 0, .amountOfSubstance = 0, .luminousIntensity = 0}; } int numberOfRepresentatives() const override { return 1; } const Representative * representativesOfSameDimension() const override; private: @@ -302,7 +302,7 @@ public: public: using Representative::Representative; constexpr static ElectricChargeRepresentative Default() { return ElectricChargeRepresentative(nullptr, 0., Prefixable::None, Prefixable::None); } - const Vector dimensionVector() const override { return Vector{.time = 1, .distance = 0, .mass = 0, .current = 1, .temperature = 0, .amountOfSubstance = 0, .luminuousIntensity = 0}; } + const Vector dimensionVector() const override { return Vector{.time = 1, .distance = 0, .mass = 0, .current = 1, .temperature = 0, .amountOfSubstance = 0, .luminousIntensity = 0}; } int numberOfRepresentatives() const override { return 1; } const Representative * representativesOfSameDimension() const override; }; @@ -311,7 +311,7 @@ public: friend class Unit; public: constexpr static ElectricPotentialRepresentative Default() { return ElectricPotentialRepresentative(nullptr, 0., Prefixable::None, Prefixable::None); } - const Vector dimensionVector() const override { return Vector{.time = -3, .distance = 2, .mass = 1, .current = -1, .temperature = 0, .amountOfSubstance = 0, .luminuousIntensity = 0}; } + const Vector dimensionVector() const override { return Vector{.time = -3, .distance = 2, .mass = 1, .current = -1, .temperature = 0, .amountOfSubstance = 0, .luminousIntensity = 0}; } int numberOfRepresentatives() const override { return 1; } const Representative * representativesOfSameDimension() const override; private: @@ -322,7 +322,7 @@ public: friend class Unit; public: constexpr static ElectricCapacitanceRepresentative Default() { return ElectricCapacitanceRepresentative(nullptr, 0., Prefixable::None, Prefixable::None); } - const Vector dimensionVector() const override { return Vector{.time = 4, .distance = -2, .mass = -1, .current = 2, .temperature = 0, .amountOfSubstance = 0, .luminuousIntensity = 0}; } + const Vector dimensionVector() const override { return Vector{.time = 4, .distance = -2, .mass = -1, .current = 2, .temperature = 0, .amountOfSubstance = 0, .luminousIntensity = 0}; } int numberOfRepresentatives() const override { return 1; } const Representative * representativesOfSameDimension() const override; private: @@ -333,7 +333,7 @@ public: friend class Unit; public: constexpr static ElectricResistanceRepresentative Default() { return ElectricResistanceRepresentative(nullptr, 0., Prefixable::None, Prefixable::None); } - const Vector dimensionVector() const override { return Vector{.time = -3, .distance = 2, .mass = 1, .current = -2, .temperature = 0, .amountOfSubstance = 0, .luminuousIntensity = 0}; } + const Vector dimensionVector() const override { return Vector{.time = -3, .distance = 2, .mass = 1, .current = -2, .temperature = 0, .amountOfSubstance = 0, .luminousIntensity = 0}; } int numberOfRepresentatives() const override { return 1; } const Representative * representativesOfSameDimension() const override; private: @@ -344,7 +344,7 @@ public: friend class Unit; public: constexpr static ElectricConductanceRepresentative Default() { return ElectricConductanceRepresentative(nullptr, 1., Prefixable::None, Prefixable::None); } - const Vector dimensionVector() const override { return Vector{.time = 3, .distance = -2, .mass = -1, .current = 2, .temperature = 0, .amountOfSubstance = 0, .luminuousIntensity = 0}; } + const Vector dimensionVector() const override { return Vector{.time = 3, .distance = -2, .mass = -1, .current = 2, .temperature = 0, .amountOfSubstance = 0, .luminousIntensity = 0}; } int numberOfRepresentatives() const override { return 1; } const Representative * representativesOfSameDimension() const override; private: @@ -355,7 +355,7 @@ public: friend class Unit; public: constexpr static MagneticFluxRepresentative Default() { return MagneticFluxRepresentative(nullptr, 0., Prefixable::None, Prefixable::None); } - const Vector dimensionVector() const override { return Vector{.time = -2, .distance = 2, .mass = 1, .current = -1, .temperature = 0, .amountOfSubstance = 0, .luminuousIntensity = 0}; } + const Vector dimensionVector() const override { return Vector{.time = -2, .distance = 2, .mass = 1, .current = -1, .temperature = 0, .amountOfSubstance = 0, .luminousIntensity = 0}; } int numberOfRepresentatives() const override { return 1; } const Representative * representativesOfSameDimension() const override; private: @@ -366,7 +366,7 @@ public: friend class Unit; public: constexpr static MagneticFieldRepresentative Default() { return MagneticFieldRepresentative(nullptr, 0., Prefixable::None, Prefixable::None); } - const Vector dimensionVector() const override { return Vector{.time = -2, .distance = 0, .mass = 1, .current = -1, .temperature = 0, .amountOfSubstance = 0, .luminuousIntensity = 0}; } + const Vector dimensionVector() const override { return Vector{.time = -2, .distance = 0, .mass = 1, .current = -1, .temperature = 0, .amountOfSubstance = 0, .luminousIntensity = 0}; } int numberOfRepresentatives() const override { return 1; } const Representative * representativesOfSameDimension() const override; private: @@ -377,7 +377,7 @@ public: friend class Unit; public: constexpr static InductanceRepresentative Default() { return InductanceRepresentative(nullptr, 0., Prefixable::None, Prefixable::None); } - const Vector dimensionVector() const override { return Vector{.time = -2, .distance = 2, .mass = 1, .current = -2, .temperature = 0, .amountOfSubstance = 0, .luminuousIntensity = 0}; } + const Vector dimensionVector() const override { return Vector{.time = -2, .distance = 2, .mass = 1, .current = -2, .temperature = 0, .amountOfSubstance = 0, .luminousIntensity = 0}; } int numberOfRepresentatives() const override { return 1; } const Representative * representativesOfSameDimension() const override; private: @@ -388,7 +388,7 @@ public: friend class Unit; public: constexpr static CatalyticActivityRepresentative Default() { return CatalyticActivityRepresentative(nullptr, 0., Prefixable::None, Prefixable::None); } - const Vector dimensionVector() const override { return Vector{.time = -1, .distance = 0, .mass = 0, .current = 0, .temperature = 0, .amountOfSubstance = 1, .luminuousIntensity = 0}; } + const Vector dimensionVector() const override { return Vector{.time = -1, .distance = 0, .mass = 0, .current = 0, .temperature = 0, .amountOfSubstance = 1, .luminousIntensity = 0}; } int numberOfRepresentatives() const override { return 1; } const Representative * representativesOfSameDimension() const override; private: @@ -399,7 +399,7 @@ public: friend class Unit; public: constexpr static SurfaceRepresentative Default() { return SurfaceRepresentative(nullptr, 0., Prefixable::None, Prefixable::None); } - const Vector dimensionVector() const override { return Vector{.time = 0, .distance = 2, .mass = 0, .current = 0, .temperature = 0, .amountOfSubstance = 0, .luminuousIntensity = 0}; } + const Vector dimensionVector() const override { return Vector{.time = 0, .distance = 2, .mass = 0, .current = 0, .temperature = 0, .amountOfSubstance = 0, .luminousIntensity = 0}; } int numberOfRepresentatives() const override { return 2; } const Representative * representativesOfSameDimension() const override; const Representative * standardRepresentative(double value, double exponent, ExpressionNode::ReductionContext reductionContext, const Prefix * * prefix) const override; @@ -413,7 +413,7 @@ public: friend class Unit; public: constexpr static VolumeRepresentative Default() { return VolumeRepresentative(nullptr, 0., Prefixable::None, Prefixable::None); } - const Vector dimensionVector() const override { return Vector{.time = 0, .distance = 3, .mass = 0, .current = 0, .temperature = 0, .amountOfSubstance = 0, .luminuousIntensity = 0}; } + const Vector dimensionVector() const override { return Vector{.time = 0, .distance = 3, .mass = 0, .current = 0, .temperature = 0, .amountOfSubstance = 0, .luminousIntensity = 0}; } int numberOfRepresentatives() const override { return 8; } const Representative * representativesOfSameDimension() const override; const Representative * standardRepresentative(double value, double exponent, ExpressionNode::ReductionContext reductionContext, const Prefix * * prefix) const override; @@ -427,7 +427,7 @@ public: friend class Unit; public: constexpr static SpeedRepresentative Default() { return SpeedRepresentative(nullptr, 0., Prefixable::None, Prefixable::None); } - const VectordimensionVector() const override { return Vector{.time = -1, .distance = 1, .mass = 0, .current = 0, .temperature = 0, .amountOfSubstance = 0, .luminuousIntensity = 0}; } + const VectordimensionVector() const override { return Vector{.time = -1, .distance = 1, .mass = 0, .current = 0, .temperature = 0, .amountOfSubstance = 0, .luminousIntensity = 0}; } const Representative * standardRepresentative(double value, double exponent, ExpressionNode::ReductionContext reductionContext, const Prefix * * prefix) const override { return nullptr; } bool hasSpecialAdditionalExpressions(double value, Preferences::UnitFormat unitFormat) const override { return true; } int setAdditionalExpressions(double value, Expression * dest, int availableLength, ExpressionNode::ReductionContext reductionContext) const override; @@ -494,7 +494,7 @@ constexpr bool strings_equal(const char * s1, const char * s2) { return *s1 == * class Unit : public Expression { friend class UnitNode; public: - /* Prefixes and Representativees defined below must be defined only once and + /* Prefixes and Representatives defined below must be defined only once and * all units must be constructed from their pointers. This way we can easily * check if two Unit objects are equal by comparing pointers. This saves us * from overloading the == operator on Prefix and Representative and saves @@ -613,7 +613,7 @@ public: VolumeRepresentative("gal", 128*0.0000295735295625, Prefixable::None, Prefixable::None), }; /* FIXME : Some ratio are too precise too be well approximated by double. - * Maybe switch to a rationnal representation with two int. */ + * Maybe switch to a rational representation with two int. */ /* Define access points to some prefixes and representatives. */ static constexpr int k_emptyPrefixIndex = 6; diff --git a/poincare/include/poincare/unit_convert.h b/poincare/include/poincare/unit_convert.h index c97eb3cdf..b3e55776d 100644 --- a/poincare/include/poincare/unit_convert.h +++ b/poincare/include/poincare/unit_convert.h @@ -25,7 +25,7 @@ private: void deepReduceChildren(ExpressionNode::ReductionContext reductionContext) override; void deepBeautifyChildren(ExpressionNode::ReductionContext reductionContext) override; Expression shallowBeautify(ReductionContext * reductionContext) override; - // Evalutation + // Evaluation Evaluation approximate(SinglePrecision p, ApproximationContext approximationContext) const override { return templatedApproximate(approximationContext); } Evaluation approximate(DoublePrecision p, ApproximationContext approximationContext) const override { return templatedApproximate(approximationContext); } template Evaluation templatedApproximate(ApproximationContext approximationContext) const; diff --git a/poincare/include/poincare/unreal.h b/poincare/include/poincare/unreal.h index d53facec4..7c9c55d38 100644 --- a/poincare/include/poincare/unreal.h +++ b/poincare/include/poincare/unreal.h @@ -28,7 +28,7 @@ public: } /* Derivation - * Unlike Numbers that derivate to 0, Unreal derivates to Unreal. */ + * Unlike Numbers that derivate to 0, Unreal derivatives to Unreal. */ bool derivate(ReductionContext reductionContext, Expression symbol, Expression symbolValue) override { return true; } // Layout diff --git a/poincare/include/poincare/zoom.h b/poincare/include/poincare/zoom.h index 56bd45871..293b35062 100644 --- a/poincare/include/poincare/zoom.h +++ b/poincare/include/poincare/zoom.h @@ -6,7 +6,7 @@ /* FIXME : This class is concerned with manipulating the ranges of graphing * window, often represented by four float xMin, xMax, yMin, yMax. Handling - * those same four values has proven repetititve, tredious, and prone to error. + * those same four values has proven repetitive, tedious, and prone to error. * This code could benefit from a data structure to regroup those values in a * single object. */ diff --git a/poincare/src/approximation_helper.cpp b/poincare/src/approximation_helper.cpp index 77b924eb4..20eae31ce 100644 --- a/poincare/src/approximation_helper.cpp +++ b/poincare/src/approximation_helper.cpp @@ -10,7 +10,7 @@ extern "C" { namespace Poincare { -template bool isNegligeable(T x, T precision, T norm1, T norm2) { +template bool isNegligible(T x, T precision, T norm1, T norm2) { T absX = std::fabs(x); return absX <= 10.0*precision && absX/norm1 <= precision && absX/norm2 <= precision; } @@ -70,10 +70,10 @@ template std::complex ApproximationHelper::NeglectRealOrImaginar T magnitude1 = minimalNonNullMagnitudeOfParts(input1); T magnitude2 = minimalNonNullMagnitudeOfParts(input2); T precision = Epsilon(); - if (isNegligeable(result.imag(), precision, magnitude1, magnitude2)) { + if (isNegligible(result.imag(), precision, magnitude1, magnitude2)) { result.imag(0); } - if (isNegligeable(result.real(), precision, magnitude1, magnitude2)) { + if (isNegligible(result.real(), precision, magnitude1, magnitude2)) { result.real(0); } return result; diff --git a/poincare/src/complex_cartesian.cpp b/poincare/src/complex_cartesian.cpp index 758829eab..4972f13d4 100644 --- a/poincare/src/complex_cartesian.cpp +++ b/poincare/src/complex_cartesian.cpp @@ -39,18 +39,18 @@ Expression ComplexCartesianNode::shallowBeautify(ReductionContext * reductionCon template Complex ComplexCartesianNode::templatedApproximate(ApproximationContext approximationContext) const { Evaluation realEvaluation = childAtIndex(0)->approximate(T(), approximationContext); - Evaluation imagEvalution = childAtIndex(1)->approximate(T(), approximationContext); + Evaluation imagEvaluation = childAtIndex(1)->approximate(T(), approximationContext); assert(realEvaluation.type() == EvaluationNode::Type::Complex); - assert(imagEvalution.type() == EvaluationNode::Type::Complex); + assert(imagEvaluation.type() == EvaluationNode::Type::Complex); std::complex a = static_cast &>(realEvaluation).stdComplex(); - std::complex b = static_cast &>(imagEvalution).stdComplex(); + std::complex b = static_cast &>(imagEvaluation).stdComplex(); if ((a.imag() != (T)0.0 && !std::isnan(a.imag())) || (b.imag() != (T)0.0 && !std::isnan(b.imag()))) { /* a and b are supposed to be real (if they are not undefined). However, * due to double precision limit, the approximation of the real part or the * imaginary part can lead to complex values. * For instance, let the real part be * sqrt(2*sqrt(5E23+1)-1E12*sqrt(2)) ~ 1.1892E-6. Due to std::sqrt(2.0) - * unprecision, 2*sqrt(5E23+1)-1E12*sqrt(2) < 0 which leads to + * imprecision, 2*sqrt(5E23+1)-1E12*sqrt(2) < 0 which leads to * sqrt(2*sqrt(5E23+1)-1E12*sqrt(2)) being a complex number. * In this case, we return an undefined complex because the approximation * is very likely to be false. */ diff --git a/poincare/src/decimal.cpp b/poincare/src/decimal.cpp index 30ee799eb..9612fd824 100644 --- a/poincare/src/decimal.cpp +++ b/poincare/src/decimal.cpp @@ -234,7 +234,7 @@ int DecimalNode::convertToText(char * buffer, int bufferSize, Preferences::Print * * We should use the UTF8Helper to manipulate chars, but it is clearer to * manipulate chars directly, so we just put assumptions on the char size - * of the code points we manipuate. */ + * of the code points we manipulate. */ assert(UTF8Decoder::CharSizeOfCodePoint('.') == 1); currentChar++; if (currentChar >= bufferSize-1) { return bufferSize-1; } @@ -275,7 +275,7 @@ int DecimalNode::convertToText(char * buffer, int bufferSize, Preferences::Print } } currentChar += mantissaLength; - if (currentChar >= bufferSize - 1) { return bufferSize-1; } // Check if strlcpy returned prematuraly + if (currentChar >= bufferSize - 1) { return bufferSize-1; } // Check if strlcpy returned prematurely if (exponent >= 0 && exponent < mantissaLength-1) { if (currentChar+1 >= bufferSize-1) { return bufferSize-1; } int decimalMarkerPosition = m_negative ? exponent + 1 : exponent; diff --git a/poincare/src/derivative.cpp b/poincare/src/derivative.cpp index 0d139fd73..3096db102 100644 --- a/poincare/src/derivative.cpp +++ b/poincare/src/derivative.cpp @@ -102,7 +102,7 @@ T DerivativeNode::growthRateAroundAbscissa(T x, T h, ApproximationContext approx template T DerivativeNode::riddersApproximation(ApproximationContext approximationContext, T x, T h, T * error) const { /* Ridders' Algorithm - * Blibliography: + * Bibliography: * - Ridders, C.J.F. 1982, Advances in Helperering Software, vol. 4, no. 2, * pp. 75–76. */ diff --git a/poincare/src/erf_inv.cpp b/poincare/src/erf_inv.cpp index 63b0323ae..2be51c68b 100644 --- a/poincare/src/erf_inv.cpp +++ b/poincare/src/erf_inv.cpp @@ -31,7 +31,7 @@ namespace Poincare { * library. */ double erfInv(double x) { // beware that the logarithm argument must be - // commputed as (1.0 - x) * (1.0 + x), + // computed as (1.0 - x) * (1.0 + x), // it must NOT be simplified as 1.0 - x * x as this // would induce rounding errors near the boundaries +/-1 double w = - std::log((1.0 - x) * (1.0 + x)); diff --git a/poincare/src/expression.cpp b/poincare/src/expression.cpp index a5c5f2b8f..4c066e6c1 100644 --- a/poincare/src/expression.cpp +++ b/poincare/src/expression.cpp @@ -570,7 +570,7 @@ bool Expression::isReal(Context * context) const { bool Expression::isIdenticalTo(const Expression e) const { /* We use the simplification order only because it is a already-coded total - * order on expresssions. */ + * order on expressions. */ return ExpressionNode::SimplificationOrder(node(), e.node(), true, true) == 0; } @@ -656,7 +656,7 @@ void Expression::beautifyAndApproximateScalar(Expression * simplifiedExpression, if (approximateExpression) { /* Step 1: Approximation * We compute the approximate expression from the Cartesian form to avoid - * unprecision. For example, if the result is the ComplexCartesian(a,b), + * imprecision. For example, if the result is the ComplexCartesian(a,b), * the final expression is going to be sqrt(a^2+b^2)*exp(i*atan(b/a)... * in Polar ComplexFormat. If we approximate this expression instead of * ComplexCartesian(a,b), we are going to loose precision on the resulting diff --git a/poincare/src/hyperbolic_arc_tangent.cpp b/poincare/src/hyperbolic_arc_tangent.cpp index 09453d22a..8f23f085f 100644 --- a/poincare/src/hyperbolic_arc_tangent.cpp +++ b/poincare/src/hyperbolic_arc_tangent.cpp @@ -23,7 +23,7 @@ Complex HyperbolicArcTangentNode::computeOnComplex(const std::complex c, P * this cut. We followed the convention chosen by the lib c++ of llvm on * ]-inf+0i, -1+0i[ (warning: atanh takes the other side of the cut values on * ]-inf-0i, -1-0i[) and choose the values on ]1+0i, +inf+0i[ to comply with - * atanh(-x) = -atanh(x) and sin(artanh(x)) = x/sqrt(1-x^2). */ + * atanh(-x) = -atanh(x) and sin(atanh(x)) = x/sqrt(1-x^2). */ if (c.imag() == 0 && c.real() > 1) { result.imag(-result.imag()); // other side of the cut } diff --git a/poincare/src/logarithm.cpp b/poincare/src/logarithm.cpp index c2cd788c3..d8187d861 100644 --- a/poincare/src/logarithm.cpp +++ b/poincare/src/logarithm.cpp @@ -247,8 +247,8 @@ Expression Logarithm::shallowReduce(ExpressionNode::ReductionContext reductionCo if (childAtIndex(1).type() == ExpressionNode::Type::Rational && childAtIndex(1).convert().isInteger()) { Integer b = childAtIndex(1).convert().signedIntegerNumerator(); Integer newNumerator = simplifyLogarithmIntegerBaseInteger(r.signedIntegerNumerator(), b, a, false); - Integer newDenomitor = simplifyLogarithmIntegerBaseInteger(r.integerDenominator(), b, a, true); - r = Rational::Builder(newNumerator, newDenomitor); + Integer newDenominator = simplifyLogarithmIntegerBaseInteger(r.integerDenominator(), b, a, true); + r = Rational::Builder(newNumerator, newDenominator); } // log(r) = a0log(p0)+a1log(p1)+... with r = p0^a0*p1^a1*... (Prime decomposition) a.addChildAtIndexInPlace(splitLogarithmInteger(r.signedIntegerNumerator(), false, reductionContext), a.numberOfChildren(), a.numberOfChildren()); diff --git a/poincare/src/matrix.cpp b/poincare/src/matrix.cpp index 48422d6b6..43a169962 100644 --- a/poincare/src/matrix.cpp +++ b/poincare/src/matrix.cpp @@ -185,7 +185,7 @@ int Matrix::ArrayInverse(T * array, int numberOfRows, int numberOfColumns) { } } ArrayRowCanonize(operands, dim, 2*dim); - // Check inversibility + // Check invertibility for (int i = 0; i < dim; i++) { T cell = operands[i*2*dim+i]; if (!std::isfinite(std::abs(cell)) || std::abs(cell - (T)1.0) > Expression::Epsilon()) { @@ -407,7 +407,7 @@ Expression Matrix::createRef(ExpressionNode::ReductionContext reductionContext, if (ExceptionRun(ecp)) { /* We clone the current matrix to extract its children later. We can't clone * its children directly. Indeed, the current matrix node (this->node()) is - * located before the exception checkpoint. In order to clone its chidlren, + * located before the exception checkpoint. In order to clone its children, * we would temporary increase the reference counter of each child (also * located before the checkpoint). If an exception is raised before * destroying the child handle, its reference counter would be off by one @@ -568,7 +568,7 @@ Expression Matrix::computeInverseOrDeterminant(bool computeDeterminant, Expressi if (ExceptionRun(ecp)) { /* We clone the current matrix to extract its children later. We can't clone * its children directly. Indeed, the current matrix node (this->node()) is - * located before the exception checkpoint. In order to clone its chidlren, + * located before the exception checkpoint. In order to clone its children, * we would temporary increase the reference counter of each child (also * located before the checkpoint). If an exception is raised before * destroying the child handle, its reference counter would be off by one @@ -596,7 +596,7 @@ Expression Matrix::computeInverseOrDeterminant(bool computeDeterminant, Expressi } // Compute the inverse matrixAI = matrixAI.rowCanonize(reductionContext, nullptr); - // Check inversibility + // Check invertibility for (int i = 0; i < dim; i++) { if (!matrixAI.matrixChild(i, i).isRationalOne()) { return Undefined::Builder(); diff --git a/poincare/src/multiplication.cpp b/poincare/src/multiplication.cpp index 1b95a31c0..a5ba391fc 100644 --- a/poincare/src/multiplication.cpp +++ b/poincare/src/multiplication.cpp @@ -444,7 +444,7 @@ Expression Multiplication::shallowBeautify(ExpressionNode::ReductionContext * re if (hasUnit()) { Expression units; /* removeUnit has to be called on reduced expression but we want to modify - * the least the expression so we use the uninvasive reduction context. */ + * the least the expression so we use the noninvasive reduction context. */ self = self.reduceAndRemoveUnit(ExpressionNode::ReductionContext::NonInvasiveReductionContext(*reductionContext), &units); if (self.isUndefined() || units.isUninitialized()) { diff --git a/poincare/src/parsing/parser.cpp b/poincare/src/parsing/parser.cpp index 55090711e..953c64d4c 100644 --- a/poincare/src/parsing/parser.cpp +++ b/poincare/src/parsing/parser.cpp @@ -159,7 +159,7 @@ void Parser::parseNumber(Expression & leftHandSide, Token::Type stoppingType) { leftHandSide = m_currentToken.expression(); // No implicit multiplication between two numbers if (m_nextToken.isNumber() - // No implicit multiplication between a hexadecimal number and an identifer (avoid parsing 0x2abch as 0x2ABC*h) + // No implicit multiplication between a hexadecimal number and an identifier (avoid parsing 0x2abch as 0x2ABC*h) || (m_currentToken.is(Token::Type::HexadecimalNumber) && m_nextToken.is(Token::Type::Identifier))) { m_status = Status::Error; return; @@ -239,7 +239,7 @@ void Parser::parseCaret(Expression & leftHandSide, Token::Type stoppingType) { void Parser::parseCaretWithParenthesis(Expression & leftHandSide, Token::Type stoppingType) { /* When parsing 2^(4) ! (with system parentheses), the factorial should stay * out of the power. To do this, we tokenized ^( as one token that should be - * matched by a closing parenthesis. Otherwise, the ! would take precendence + * matched by a closing parenthesis. Otherwise, the ! would take precedence * over the power. */ if (leftHandSide.isUninitialized()) { m_status = Status::Error; // Power must have a left operand diff --git a/poincare/src/power.cpp b/poincare/src/power.cpp index 68d80943d..c69b0111e 100644 --- a/poincare/src/power.cpp +++ b/poincare/src/power.cpp @@ -195,10 +195,10 @@ Complex PowerNode::compute(const std::complex c, const std::complex d, * avoid weird results as e(i*pi) = -1+6E-17*i, we compute the argument of * the result of c^d and if arg ~ 0 [Pi], we discard the residual imaginary * part and if arg ~ Pi/2 [Pi], we discard the residual real part. - * Let's determine when the arg [Pi] (or arg [Pi/2]) is negligeable: + * Let's determine when the arg [Pi] (or arg [Pi/2]) is negligible: * With c = r*e^(iθ) and d = x+iy, c^d = r^x*e^(yθ)*e^i(yln(r)+xθ) * so arg(c^d) = y*ln(r)+xθ. - * We consider that arg[π] is negligeable if it is negligeable compared to + * We consider that arg[π] is negligible if it is negligible compared to * norm(d) = sqrt(x^2+y^2) and ln(r) = ln(norm(c)).*/ return Complex::Builder(ApproximationHelper::NeglectRealOrImaginaryPartIfNeglectable(result, c, d, false)); } diff --git a/poincare/src/print_float.cpp b/poincare/src/print_float.cpp index d9147a275..09d06ed7a 100644 --- a/poincare/src/print_float.cpp +++ b/poincare/src/print_float.cpp @@ -243,7 +243,7 @@ PrintFloat::TextLengths PrintFloat::ConvertFloatToTextPrivate(T f, char * buffer if (mode == Preferences::PrintFloatMode::Decimal && exponentInBase10 >= numberOfSignificantDigits) { /* Exception 1: avoid inventing digits to fill the printed float: when - * displaying 12345 with 2 significant digis in Decimal mode for instance. + * displaying 12345 with 2 significant digits in Decimal mode for instance. * This exception is caught by ConvertFloatToText and forces the mode to * Scientific */ return exceptionResult; diff --git a/poincare/src/tree_handle.cpp b/poincare/src/tree_handle.cpp index 3c1a6cdfd..057a237db 100644 --- a/poincare/src/tree_handle.cpp +++ b/poincare/src/tree_handle.cpp @@ -233,7 +233,7 @@ TreeHandle TreeHandle::BuildWithGhostChildren(TreeNode * node) { assert(node != nullptr); TreePool * pool = TreePool::sharedPool(); int expectedNumberOfChildren = node->numberOfChildren(); - /* Ensure the pool is syntaxically correct by creating ghost children for + /* Ensure the pool is syntactically correct by creating ghost children for * nodes that have a fixed, non-zero number of children. */ for (int i = 0; i < expectedNumberOfChildren; i++) { GhostNode * ghost = new (pool->alloc(sizeof(GhostNode))) GhostNode(); diff --git a/poincare/src/trigonometry.cpp b/poincare/src/trigonometry.cpp index bdaa0a165..b2279f27f 100644 --- a/poincare/src/trigonometry.cpp +++ b/poincare/src/trigonometry.cpp @@ -230,9 +230,9 @@ Expression Trigonometry::shallowReduceDirectFunction(Expression & e, ExpressionN /* Step 4.1. In radians: * We first check if p/q * π is already in the right quadrant: * p/q * π < π/2 => p/q < 2 => 2p < q */ - Integer dividand = Integer::Addition(r.unsignedIntegerNumerator(), r.unsignedIntegerNumerator()); + Integer dividend = Integer::Addition(r.unsignedIntegerNumerator(), r.unsignedIntegerNumerator()); Integer divisor = Integer::Multiplication(r.integerDenominator(), Integer(s_piDivisor[(int)angleUnit])); - if (divisor.isLowerThan(dividand)) { + if (divisor.isLowerThan(dividend)) { /* Step 4.2. p/q * π is not in the wanted trigonometrical quadrant. * We could subtract n*π to p/q with n an integer. * Given p/q = (q'*q+r')/q, we have @@ -241,8 +241,8 @@ Expression Trigonometry::shallowReduceDirectFunction(Expression & e, ExpressionN int unaryCoefficient = 1; // store 1 or -1 for the final result. Integer piDivisor = Integer::Multiplication(r.integerDenominator(), Integer(s_piDivisor[(int)angleUnit])); IntegerDivision div = Integer::Division(r.unsignedIntegerNumerator(), piDivisor); - dividand = Integer::Addition(div.remainder, div.remainder); - if (divisor.isLowerThan(dividand)) { + dividend = Integer::Addition(div.remainder, div.remainder); + if (divisor.isLowerThan(dividend)) { /* Step 4.3. r'/q * π is not in the wanted trigonometrical quadrant, * and because r' UnitNode::Vector::FromBaseUnits(const Expression base .current = 0, .temperature = 0, .amountOfSubstance = 0, - .luminuousIntensity = 0, + .luminousIntensity = 0, }; int numberOfFactors; int factorIndex = 0; diff --git a/poincare/test/approximation.cpp b/poincare/test/approximation.cpp index f66a92b24..7fa582062 100644 --- a/poincare/test/approximation.cpp +++ b/poincare/test/approximation.cpp @@ -987,7 +987,7 @@ QUIZ_CASE(poincare_approximation_complex_format) { QUIZ_CASE(poincare_approximation_mix) { assert_expression_approximates_to("-2-3", "-5"); assert_expression_approximates_to("1.2×ℯ^(1)", "3.261938"); - assert_expression_approximates_to("2ℯ^(3)", "40.1711", Radian, Metric, Cartesian, 6); // WARNING: the 7th significant digit is wrong on blackbos simulator + assert_expression_approximates_to("2ℯ^(3)", "40.1711", Radian, Metric, Cartesian, 6); // WARNING: the 7th significant digit is wrong on blackbox simulator assert_expression_approximates_to("ℯ^2×ℯ^(1)", "20.0855", Radian, Metric, Cartesian, 6); // WARNING: the 7th significant digit is wrong on simulator assert_expression_approximates_to("ℯ^2×ℯ^(1)", "20.085536923188"); assert_expression_approximates_to("2×3^4+2", "164"); diff --git a/poincare/test/expression_properties.cpp b/poincare/test/expression_properties.cpp index 337bcca17..3fe80a1b1 100644 --- a/poincare/test/expression_properties.cpp +++ b/poincare/test/expression_properties.cpp @@ -393,7 +393,7 @@ QUIZ_CASE(poincare_properties_get_polynomial_coefficients) { assert_reduced_expression_has_polynomial_coefficient("x^2+x+2", "x", coefficient0); const char * coefficient1[] = {"12+(-6)×π", "12", "3", 0}; //3×x^2+12×x-6×π+12 assert_reduced_expression_has_polynomial_coefficient("3×(x+2)^2-6×π", "x", coefficient1); - // TODO: decomment when enable 3-degree polynomes + // TODO: uncomment when enable 3-degree polynomials //const char * coefficient2[] = {"2+32×x", "2", "6", "2", 0}; //2×n^3+6×n^2+2×n+2+32×x //assert_reduced_expression_has_polynomial_coefficient("2×(n+1)^3-4n+32×x", "n", coefficient2); const char * coefficient3[] = {"1", "-π", "1", 0}; //x^2-π×x+1 diff --git a/python/Makefile b/python/Makefile index a957082c1..95b95bbab 100644 --- a/python/Makefile +++ b/python/Makefile @@ -201,7 +201,7 @@ $(call object_for,python/src/py/objmodule.c): SFLAGS += -DMP_QSTR_urandom="MP_QS $(call object_for,python/src/extmod/modurandom.c): SFLAGS += -DMP_QSTR_urandom="MP_QSTR_random" # Rename usys to sys -# In order to change the name of the micropython module 'usys' to 'usys' +# In order to change the name of the micropython module 'usys' to 'sys' # (without altering micropython files), we redefined the macro MP_QSTR_usys # by DMP_QSTR_sys. $(call object_for,python/src/py/objmodule.c): SFLAGS += -DMP_QSTR_usys="MP_QSTR_sys" diff --git a/python/port/mod/ion/file.cpp b/python/port/mod/ion/file.cpp index 2efe8e091..721d79eee 100644 --- a/python/port/mod/ion/file.cpp +++ b/python/port/mod/ion/file.cpp @@ -762,7 +762,7 @@ STATIC mp_obj_t file_writelines(mp_obj_t o_in, mp_obj_t o_lines) { } /* - * Simpler read function usef by read and readline. + * Simpler read function used by read and readline. */ STATIC mp_obj_t __file_read_backend(file_obj_t* file, mp_int_t size, bool with_line_sep) { size_t file_size = file->record.value().size; diff --git a/python/port/mod/ion/modion_table.cpp b/python/port/mod/ion/modion_table.cpp index 0e07b006b..aa496a955 100644 --- a/python/port/mod/ion/modion_table.cpp +++ b/python/port/mod/ion/modion_table.cpp @@ -4,7 +4,7 @@ extern "C" { #include -/* We cannot use C99-style struct initizalition in C++. As a result, we cannot +/* We cannot use C99-style struct initialization in C++. As a result, we cannot * use the macros that micropython recommends, and we have to hand build those * structs. To avoid errors, we drop in a few static_asserts. */ diff --git a/python/port/mod/matplotlib/pyplot/modpyplot.cpp b/python/port/mod/matplotlib/pyplot/modpyplot.cpp index c81eeb7bf..76c4bfc2c 100644 --- a/python/port/mod/matplotlib/pyplot/modpyplot.cpp +++ b/python/port/mod/matplotlib/pyplot/modpyplot.cpp @@ -26,7 +26,7 @@ static size_t extractArgument(mp_obj_t arg, mp_obj_t ** items) { return itemLength; } -// Extract two scalar or array arguments and check for their strickly equal dimension +// Extract two scalar or array arguments and check for their strictly equal dimension static size_t extractArgumentsAndCheckEqualSize(mp_obj_t x, mp_obj_t y, mp_obj_t ** xItems, mp_obj_t ** yItems) { size_t xLength = extractArgument(x, xItems); diff --git a/python/port/mod/time/modtime.cpp b/python/port/mod/time/modtime.cpp index 58ae09b49..a87bd1f8b 100644 --- a/python/port/mod/time/modtime.cpp +++ b/python/port/mod/time/modtime.cpp @@ -21,7 +21,7 @@ mp_obj_t modtime_monotonic() { } // -// Omega extensions, based off MicroPython's modutime.c +// Upsilon extensions, based off MicroPython's modutime.c // // LEAPOCH corresponds to 2000-03-01, which is a mod-400 year, immediately diff --git a/python/port/mod/time/modtime.h b/python/port/mod/time/modtime.h index f52ebaffc..785bf806b 100644 --- a/python/port/mod/time/modtime.h +++ b/python/port/mod/time/modtime.h @@ -4,14 +4,14 @@ mp_obj_t modtime_sleep(mp_obj_t seconds_o); mp_obj_t modtime_monotonic(); // -// Omega extensions. +// Upsilon extensions. // mp_obj_t modtime_localtime(size_t n_args, const mp_obj_t *args); mp_obj_t modtime_mktime(mp_obj_t tuple); mp_obj_t modtime_time(void); -// Omega private extensions. +// Upsilon private extensions. mp_obj_t modtime_rtcmode(void); mp_obj_t modtime_setrtcmode(mp_obj_t mode); diff --git a/python/port/mod/ulab/ndarray.c b/python/port/mod/ulab/ndarray.c index 45e19c262..88fbcfbda 100644 --- a/python/port/mod/ulab/ndarray.c +++ b/python/port/mod/ulab/ndarray.c @@ -849,7 +849,7 @@ STATIC uint8_t ndarray_init_helper(size_t n_args, const mp_obj_t *pos_args, mp_m if(mp_obj_is_type(args[1].u_obj, &ulab_dtype_type)) { dtype_obj_t *dtype = MP_OBJ_TO_PTR(args[1].u_obj); _dtype = dtype->dtype; - } else { // this must be an integer defined as a class constant (ulba.uint8 etc.) + } else { // this must be an integer defined as a class constant (ulab.uint8 etc.) _dtype = mp_obj_get_int(args[1].u_obj); } #else diff --git a/python/port/mod/ulab/numpy/fft/fft.c b/python/port/mod/ulab/numpy/fft/fft.c index 6f6534f49..5c6af832d 100644 --- a/python/port/mod/ulab/numpy/fft/fft.c +++ b/python/port/mod/ulab/numpy/fft/fft.c @@ -55,7 +55,7 @@ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(fft_fft_obj, 1, 2, fft_fft); //| :param ulab.numpy.ndarray c: An optional 1-dimension array of values whose size is a power of 2, giving the complex part of the value //| :return tuple (r, c): The real and complex parts of the inverse FFT //| -//| Perform an Inverse Fast Fourier Transform from the frequeny domain into the time domain""" +//| Perform an Inverse Fast Fourier Transform from the frequency domain into the time domain""" //| ... //| diff --git a/python/port/mod/ulab/numpy/poly.c b/python/port/mod/ulab/numpy/poly.c index 124d3bc86..7ea7feb1a 100644 --- a/python/port/mod/ulab/numpy/poly.c +++ b/python/port/mod/ulab/numpy/poly.c @@ -164,7 +164,7 @@ mp_obj_t poly_polyval(mp_obj_t o_p, mp_obj_t o_x) { mp_float_t (*func)(void *) = ndarray_get_float_function(source->dtype); - // TODO: these loops are really nothing, but the re-impplementation of + // TODO: these loops are really nothing, but the re-implementation of // ITERATE_VECTOR from vectorise.c. We could pass a function pointer here #if ULAB_MAX_DIMS > 3 size_t i = 0; diff --git a/python/port/mod/ulab/scipy/optimize/optimize.c b/python/port/mod/ulab/scipy/optimize/optimize.c index c2ed6fff8..30b61283d 100644 --- a/python/port/mod/ulab/scipy/optimize/optimize.c +++ b/python/port/mod/ulab/scipy/optimize/optimize.c @@ -121,7 +121,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(optimize_bisect_obj, 3, optimize_bisect); //| Find a minimum of the function ``f(x)`` using the downhill simplex method. //| The located ``x`` is within ``fxtol`` of the actual minimum, and ``f(x)`` //| is within ``fatol`` of the actual minimum unless more than ``maxiter`` -//| steps are requried.""" +//| steps are required.""" //| ... //| @@ -344,7 +344,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(optimize_curve_fit_obj, 2, optimize_curve_fit); //| //| Find a solution (zero) of the function ``f(x)`` using Newton's Method. //| The result is accurate to within ``xtol * rtol * |f(x)|`` unless more than -//| ``maxiter`` steps are requried.""" +//| ``maxiter`` steps are required.""" //| ... //| diff --git a/python/port/mod/ulab/user/user.c b/python/port/mod/ulab/user/user.c index 835c091c7..f69089da5 100644 --- a/python/port/mod/ulab/user/user.c +++ b/python/port/mod/ulab/user/user.c @@ -74,7 +74,7 @@ static mp_obj_t user_square(mp_obj_t arg) { *rarray++ = (*array) * (*array); } } - // at the end, return a micrppython object + // at the end, return a micropython object return MP_OBJ_FROM_PTR(results); } diff --git a/python/port/port.cpp b/python/port/port.cpp index 21c9645df..e86a6ef22 100644 --- a/python/port/port.cpp +++ b/python/port/port.cpp @@ -212,7 +212,7 @@ void MicroPython::collectRootsAtAddress(char * address, int byteLength) { uintptr_t alignedAddress = reinterpret_cast(address) & bitMaskZeros; /* Increase the length consequently with the new alignment * (We don't need to increase the byteLength to a sizeof(uintptr_t)-aligned - * lenght because no pointer can be stored on less than sizeof(uintptr_t) + * length because no pointer can be stored on less than sizeof(uintptr_t) * bytes.) */ int alignedByteLength = byteLength; alignedByteLength += reinterpret_cast(address) & bitMaskOnes; diff --git a/python/src/py/compile.c b/python/src/py/compile.c index 0b02746a5..3d5c5f21e 100644 --- a/python/src/py/compile.c +++ b/python/src/py/compile.c @@ -705,7 +705,7 @@ STATIC void compile_funcdef_lambdef_param(compiler_t *comp, mp_parse_node_t pn) } else { // this parameter has a default value - // in CPython, None (and True, False?) as default parameters are loaded with LOAD_NAME; don't understandy why + // in CPython, None (and True, False?) as default parameters are loaded with LOAD_NAME; don't understand why if (comp->have_star) { comp->num_dict_params += 1; diff --git a/python/src/py/emitnative.c b/python/src/py/emitnative.c index 7c7c34283..f63b6d289 100644 --- a/python/src/py/emitnative.c +++ b/python/src/py/emitnative.c @@ -574,7 +574,7 @@ STATIC void emit_native_start_pass(emit_t *emit, pass_kind_t pass, scope_t *scop if (emit->pass == MP_PASS_CODE_SIZE) { // Commit to the encoding size based on the value of prelude_offset in this pass. // By using 32768 as the cut-off it is highly unlikely that prelude_offset will - // grow beyond 65535 by the end of thiss pass, and so require the larger encoding. + // grow beyond 65535 by the end of this pass, and so require the larger encoding. emit->prelude_offset_uses_u16_encoding = emit->prelude_offset < 32768; } if (emit->prelude_offset_uses_u16_encoding) { @@ -874,7 +874,7 @@ STATIC vtype_kind_t load_reg_stack_imm(emit_t *emit, int reg_dest, const stack_i } } -// Copies all unsettled registers and immediates that are Python values into the +// Copies all unsettled registers and immediate that are Python values into the // concrete Python stack. This ensures the concrete Python stack holds valid // values for the current stack_size. // This function may clobber REG_TEMP1. @@ -1070,7 +1070,7 @@ STATIC void emit_get_stack_pointer_to_reg_for_pop(emit_t *emit, mp_uint_t reg_de } } - // Adujust the stack for a pop of n_pop items, and load the stack pointer into reg_dest. + // Adjust the stack for a pop of n_pop items, and load the stack pointer into reg_dest. adjust_stack(emit, -n_pop); emit_native_mov_reg_state_addr(emit, reg_dest, emit->stack_start + emit->stack_size); } diff --git a/python/src/py/formatfloat.c b/python/src/py/formatfloat.c index 9d28b2317..6f4eee822 100644 --- a/python/src/py/formatfloat.c +++ b/python/src/py/formatfloat.c @@ -318,7 +318,7 @@ int mp_format_float(FPTYPE f, char *buf, size_t buf_size, char fmt, int prec, ch // We now have num.f as a floating point number between >= 1 and < 10 // (or equal to zero), and e contains the absolute value of the power of - // 10 exponent. and (dec + 1) == the number of dgits before the decimal. + // 10 exponent. and (dec + 1) == the number of digits before the decimal. // For e, prec is # digits after the decimal // For f, prec is # digits after the decimal diff --git a/python/src/py/gc.c b/python/src/py/gc.c index 8284c435b..1256d3524 100644 --- a/python/src/py/gc.c +++ b/python/src/py/gc.c @@ -512,7 +512,7 @@ found: // Set last free ATB index to block after last block we found, for start of // next scan. To reduce fragmentation, we only do this if we were looking // for a single free block, which guarantees that there are no free blocks - // before this one. Also, whenever we free or shink a block we must check + // before this one. Also, whenever we free or shrink a block we must check // if this index needs adjusting (see gc_realloc and gc_free). if (n_free == 1) { MP_STATE_MEM(gc_last_free_atb_index) = (i + 1) / BLOCKS_PER_ATB; diff --git a/python/src/py/lexer.c b/python/src/py/lexer.c index 69c7d14a7..e1858d8ee 100644 --- a/python/src/py/lexer.c +++ b/python/src/py/lexer.c @@ -594,7 +594,7 @@ void mp_lexer_to_next(mp_lexer_t *lex) { // a string or bytes literal // Python requires adjacent string/bytes literals to be automatically - // concatenated. We do it here in the tokeniser to make efficient use of RAM, + // concatenated. We do it here in the tokenizer to make efficient use of RAM, // because then the lexer's vstr can be used to accumulate the string literal, // in contrast to creating a parse tree of strings and then joining them later // in the compiler. It's also more compact in code size to do it here. diff --git a/python/src/py/lexer.h b/python/src/py/lexer.h index e16b9a8ce..4b0c097af 100644 --- a/python/src/py/lexer.h +++ b/python/src/py/lexer.h @@ -32,7 +32,7 @@ #include "py/qstr.h" #include "py/reader.h" -/* lexer.h -- simple tokeniser for MicroPython +/* lexer.h -- simple tokenizer for MicroPython * * Uses (byte) length instead of null termination. * Tokens are the same - UTF-8 with (byte) length. diff --git a/python/src/py/makecompresseddata.py b/python/src/py/makecompresseddata.py index 9603de871..1bce3e8e8 100644 --- a/python/src/py/makecompresseddata.py +++ b/python/src/py/makecompresseddata.py @@ -24,7 +24,7 @@ def check_non_ascii(msg): # Replace with . -# Trival scheme to demo/test. +# Trivial scheme to demo/test. def space_compression(error_strings): for line in error_strings: check_non_ascii(line) diff --git a/python/src/py/mkrules.mk b/python/src/py/mkrules.mk index d0c0a53c2..bde96c7b4 100644 --- a/python/src/py/mkrules.mk +++ b/python/src/py/mkrules.mk @@ -16,7 +16,7 @@ endif # QSTR generation uses the same CFLAGS, with these modifications. QSTR_GEN_FLAGS = -DNO_QSTR -# Note: := to force evalulation immediately. +# Note: := to force evaluation immediately. QSTR_GEN_CFLAGS := $(CFLAGS) QSTR_GEN_CFLAGS += $(QSTR_GEN_FLAGS) QSTR_GEN_CXXFLAGS := $(CXXFLAGS) @@ -28,7 +28,7 @@ QSTR_GEN_CXXFLAGS += $(QSTR_GEN_FLAGS) # tree. # # So for example, py/map.c would have an object file name py/map.o -# The object files will go into the build directory and mantain the same +# The object files will go into the build directory and maintain the same # directory structure as the source tree. So the final dependency will look # like this: # @@ -184,7 +184,7 @@ endif ifneq ($(PROG),) # Build a standalone executable (unix does this) -# The executable should have an .exe extension for builds targetting 'pure' +# The executable should have an .exe extension for builds targeting 'pure' # Windows, i.e. msvc or mingw builds, but not when using msys or cygwin's gcc. COMPILER_TARGET := $(shell $(CC) -dumpmachine) ifneq (,$(findstring mingw,$(COMPILER_TARGET))) diff --git a/python/src/py/modbuiltins.c b/python/src/py/modbuiltins.c index a7e49a1ed..2a142a6bb 100644 --- a/python/src/py/modbuiltins.c +++ b/python/src/py/modbuiltins.c @@ -79,7 +79,7 @@ STATIC mp_obj_t mp_builtin___build_class__(size_t n_args, const mp_obj_t *args) meta_args[2] = class_locals; // dict of members mp_obj_t new_class = mp_call_function_n_kw(meta, 3, 0, meta_args); - // store into cell if neede + // store into cell if needed if (cell != mp_const_none) { mp_obj_cell_set(cell, new_class); } diff --git a/python/src/py/mpconfig.h b/python/src/py/mpconfig.h index 26268403d..680b43d62 100644 --- a/python/src/py/mpconfig.h +++ b/python/src/py/mpconfig.h @@ -1221,7 +1221,7 @@ typedef double mp_float_t; // the semantics of CPython's pkg_resources.resource_stream() // (allows to access binary resources in frozen source packages). // Note that the same functionality can be achieved in "pure -// Python" by prepocessing binary resources into Python source +// Python" by preprocessing binary resources into Python source // and bytecode-freezing it (with a simple helper module available // e.g. in micropython-lib). #ifndef MICROPY_PY_IO_RESOURCE_STREAM diff --git a/python/src/py/obj.c b/python/src/py/obj.c index f66a9d183..e7a23be53 100644 --- a/python/src/py/obj.c +++ b/python/src/py/obj.c @@ -279,7 +279,7 @@ mp_obj_t mp_obj_equal_not_equal(mp_binary_op_t op, mp_obj_t o1, mp_obj_t o2) { o2 = temp; } - // equality not implemented, so fall back to pointer conparison + // equality not implemented, so fall back to pointer comparison return (o1 == o2) ? local_true : local_false; } diff --git a/python/src/py/parsenum.c b/python/src/py/parsenum.c index 1cfe84257..54cd2bf86 100644 --- a/python/src/py/parsenum.c +++ b/python/src/py/parsenum.c @@ -98,7 +98,7 @@ mp_obj_t mp_parse_num_integer(const char *restrict str_, size_t len, int base, m break; } - // add next digi and check for overflow + // add next digit and check for overflow if (mp_small_int_mul_overflow(int_val, base)) { goto overflow; } diff --git a/python/test/basics.cpp b/python/test/basics.cpp index 84a7a2275..8d1358d17 100644 --- a/python/test/basics.cpp +++ b/python/test/basics.cpp @@ -2,7 +2,7 @@ #include "execution_environment.h" QUIZ_CASE(python_basics) { - TestExecutionEnvironment env = init_environement(); + TestExecutionEnvironment env = init_environnement(); assert_command_execution_succeeds(env, "2+3","5\n"); deinit_environment(); } diff --git a/python/test/execution_environment.cpp b/python/test/execution_environment.cpp index 7fb6ae91c..da5ea3f68 100644 --- a/python/test/execution_environment.cpp +++ b/python/test/execution_environment.cpp @@ -51,7 +51,7 @@ bool execute_input(TestExecutionEnvironment env, bool singleCommandLine, const c return executionResult; } -TestExecutionEnvironment init_environement() { +TestExecutionEnvironment init_environnement() { MicroPython::init(TestExecutionEnvironment::s_pythonHeap, TestExecutionEnvironment::s_pythonHeap + TestExecutionEnvironment::s_pythonHeapSize); return TestExecutionEnvironment(); } @@ -61,7 +61,7 @@ void deinit_environment() { } void assert_script_execution_result(bool expectedResult, const char * script, const char * outputText = nullptr) { - TestExecutionEnvironment env = init_environement(); + TestExecutionEnvironment env = init_environnement(); quiz_assert(expectedResult == execute_input(env, false, script, outputText)); deinit_environment(); } diff --git a/python/test/execution_environment.h b/python/test/execution_environment.h index cc711ad60..aaa81e39e 100644 --- a/python/test/execution_environment.h +++ b/python/test/execution_environment.h @@ -15,7 +15,7 @@ private: size_t m_printTextIndex; }; -TestExecutionEnvironment init_environement(); +TestExecutionEnvironment init_environnement(); void deinit_environment(); void assert_script_execution_succeeds(const char * script, const char * outputText = nullptr); diff --git a/python/test/ion.cpp b/python/test/ion.cpp index 991f47a6b..e1fb7c9fb 100644 --- a/python/test/ion.cpp +++ b/python/test/ion.cpp @@ -3,14 +3,14 @@ QUIZ_CASE(python_ion_import) { // Test "from ion import *" - TestExecutionEnvironment env = init_environement(); + TestExecutionEnvironment env = init_environnement(); assert_command_execution_fails(env, "keydown(KEY_LEFT)"); assert_command_execution_succeeds(env, "from ion import *"); assert_command_execution_succeeds(env, "keydown(KEY_LEFT)"); deinit_environment(); // "import ion" - env = init_environement(); + env = init_environnement(); assert_command_execution_fails(env, "ion.keydown(ion.KEY_LEFT)"); assert_command_execution_succeeds(env, "import ion"); assert_command_execution_succeeds(env, "ion.keydown(ion.KEY_LEFT)"); @@ -18,7 +18,7 @@ QUIZ_CASE(python_ion_import) { } QUIZ_CASE(python_ion_keydown) { - TestExecutionEnvironment env = init_environement(); + TestExecutionEnvironment env = init_environnement(); assert_command_execution_succeeds(env, "from ion import *"); assert_command_execution_succeeds(env, "keydown(KEY_LEFT)", "False\n"); deinit_environment(); diff --git a/python/test/kandinsky.cpp b/python/test/kandinsky.cpp index 516e0d008..0226f83f6 100644 --- a/python/test/kandinsky.cpp +++ b/python/test/kandinsky.cpp @@ -3,14 +3,14 @@ QUIZ_CASE(python_kandinsky_import) { // Test "from kandinsky import *" - TestExecutionEnvironment env = init_environement(); + TestExecutionEnvironment env = init_environnement(); assert_command_execution_fails(env, "get_pixel(0,0)"); assert_command_execution_succeeds(env, "from kandinsky import *"); assert_command_execution_succeeds(env, "get_pixel(0,0)"); deinit_environment(); // "import kandinsky" - env = init_environement(); + env = init_environnement(); assert_command_execution_fails(env, "kandinsky.get_pixel(0,0)"); assert_command_execution_succeeds(env, "import kandinsky"); assert_command_execution_succeeds(env, "kandinsky.get_pixel(0,0)"); @@ -18,7 +18,7 @@ QUIZ_CASE(python_kandinsky_import) { } QUIZ_CASE(python_kandinsky_basics) { - TestExecutionEnvironment env = init_environement(); + TestExecutionEnvironment env = init_environnement(); assert_command_execution_succeeds(env, "from kandinsky import *"); assert_command_execution_succeeds(env, "set_pixel(0,0,color(12,12,12))"); assert_command_execution_succeeds(env, "get_pixel(0,0)"); diff --git a/python/test/math.cpp b/python/test/math.cpp index e7e4c06f7..0c63d8676 100644 --- a/python/test/math.cpp +++ b/python/test/math.cpp @@ -2,7 +2,7 @@ #include "execution_environment.h" QUIZ_CASE(python_math) { - TestExecutionEnvironment env = init_environement(); + TestExecutionEnvironment env = init_environnement(); assert_command_execution_succeeds(env, "from math import *"); assert_command_execution_succeeds(env, "e", "2.718281828459045\n"); assert_command_execution_succeeds(env, "gamma(3)", "2.0\n"); @@ -10,7 +10,7 @@ QUIZ_CASE(python_math) { } QUIZ_CASE(python_cmath) { - TestExecutionEnvironment env = init_environement(); + TestExecutionEnvironment env = init_environnement(); assert_command_execution_succeeds(env, "from cmath import *"); assert_command_execution_succeeds(env, "cos(0)", "(1+-0j)\n"); deinit_environment(); diff --git a/python/test/matplotlib.cpp b/python/test/matplotlib.cpp index 3ba0bd6df..d7fb456de 100644 --- a/python/test/matplotlib.cpp +++ b/python/test/matplotlib.cpp @@ -3,28 +3,28 @@ QUIZ_CASE(python_matplotlib_pyplot_import) { // Test "from matplotlib.pyplot import *" - TestExecutionEnvironment env = init_environement(); + TestExecutionEnvironment env = init_environnement(); assert_command_execution_fails(env, "arrow(2,3,4,5)"); assert_command_execution_succeeds(env, "from matplotlib.pyplot import *"); assert_command_execution_succeeds(env, "arrow(2,3,4,5)"); deinit_environment(); // "from matplotlib import *" - env = init_environement(); + env = init_environnement(); assert_command_execution_fails(env, "pyplot.arrow(2,3,4,5)"); assert_command_execution_succeeds(env, "from matplotlib import *"); assert_command_execution_succeeds(env, "pyplot.arrow(2,3,4,5)"); deinit_environment(); // "import matplotlib" - env = init_environement(); + env = init_environnement(); assert_command_execution_fails(env, "matplotlib.pyplot.arrow(2,3,4,5)"); assert_command_execution_succeeds(env, "import matplotlib"); assert_command_execution_succeeds(env, "matplotlib.pyplot.arrow(2,3,4,5)"); deinit_environment(); // "import matplotlib.pyplot" - env = init_environement(); + env = init_environnement(); assert_command_execution_fails(env, "matplotlib.pyplot.arrow(2,3,4,5)"); assert_command_execution_succeeds(env, "import matplotlib.pyplot"); assert_command_execution_succeeds(env, "matplotlib.pyplot.arrow(2,3,4,5)"); @@ -32,7 +32,7 @@ QUIZ_CASE(python_matplotlib_pyplot_import) { } QUIZ_CASE(python_matplotlib_pyplot_arrow) { - TestExecutionEnvironment env = init_environement(); + TestExecutionEnvironment env = init_environnement(); assert_command_execution_succeeds(env, "from matplotlib.pyplot import *"); assert_command_execution_succeeds(env, "arrow(2,3,4,5)"); assert_command_execution_fails(env, "arrow(2,3,4,5, 0.1)"); @@ -45,7 +45,7 @@ QUIZ_CASE(python_matplotlib_pyplot_arrow) { } QUIZ_CASE(python_matplotlib_pyplot_axis) { - TestExecutionEnvironment env = init_environement(); + TestExecutionEnvironment env = init_environnement(); assert_command_execution_succeeds(env, "from matplotlib.pyplot import *"); assert_command_execution_succeeds(env, "axis((2,3,4,5))"); assert_command_execution_succeeds(env, "axis([2,3,4,5])"); @@ -57,7 +57,7 @@ QUIZ_CASE(python_matplotlib_pyplot_axis) { } QUIZ_CASE(python_matplotlib_pyplot_bar) { - TestExecutionEnvironment env = init_environement(); + TestExecutionEnvironment env = init_environnement(); assert_command_execution_succeeds(env, "from matplotlib.pyplot import *"); assert_command_execution_succeeds(env, "bar([0,2,3],[10,12,23])"); assert_command_execution_succeeds(env, "bar([0,2,3],10)"); @@ -71,7 +71,7 @@ QUIZ_CASE(python_matplotlib_pyplot_bar) { } QUIZ_CASE(python_matplotlib_pyplot_grid) { - TestExecutionEnvironment env = init_environement(); + TestExecutionEnvironment env = init_environnement(); assert_command_execution_succeeds(env, "from matplotlib.pyplot import *"); assert_command_execution_succeeds(env, "grid(True)"); assert_command_execution_succeeds(env, "grid()"); @@ -79,7 +79,7 @@ QUIZ_CASE(python_matplotlib_pyplot_grid) { } QUIZ_CASE(python_matplotlib_pyplot_hist) { - TestExecutionEnvironment env = init_environement(); + TestExecutionEnvironment env = init_environnement(); assert_command_execution_succeeds(env, "from matplotlib.pyplot import *"); assert_command_execution_succeeds(env, "hist([2,3,4,5,6])"); assert_command_execution_succeeds(env, "hist([2,3,4,5,6],23)"); @@ -91,7 +91,7 @@ QUIZ_CASE(python_matplotlib_pyplot_hist) { } QUIZ_CASE(python_matplotlib_pyplot_plot) { - TestExecutionEnvironment env = init_environement(); + TestExecutionEnvironment env = init_environnement(); assert_command_execution_succeeds(env, "from matplotlib.pyplot import *"); assert_command_execution_succeeds(env, "plot([2,3,4,5,6])"); assert_command_execution_succeeds(env, "plot(2,3)"); @@ -103,7 +103,7 @@ QUIZ_CASE(python_matplotlib_pyplot_plot) { } QUIZ_CASE(python_matplotlib_pyplot_scatter) { - TestExecutionEnvironment env = init_environement(); + TestExecutionEnvironment env = init_environnement(); assert_command_execution_succeeds(env, "from matplotlib.pyplot import *"); assert_command_execution_succeeds(env, "scatter(2,3)"); assert_command_execution_succeeds(env, "scatter([2,3,4,5,6],[3,4,5,6,7])"); @@ -114,7 +114,7 @@ QUIZ_CASE(python_matplotlib_pyplot_scatter) { } QUIZ_CASE(python_matplotlib_pyplot_text) { - TestExecutionEnvironment env = init_environement(); + TestExecutionEnvironment env = init_environnement(); assert_command_execution_succeeds(env, "from matplotlib.pyplot import *"); assert_command_execution_succeeds(env, "text(2,3,'hello')"); assert_command_execution_succeeds(env, "show()"); diff --git a/python/test/random.cpp b/python/test/random.cpp index 9ff3acb09..c3a2db3b0 100644 --- a/python/test/random.cpp +++ b/python/test/random.cpp @@ -2,7 +2,7 @@ #include "execution_environment.h" QUIZ_CASE(python_random) { - TestExecutionEnvironment env = init_environement(); + TestExecutionEnvironment env = init_environnement(); assert_command_execution_fails(env, "random()"); assert_command_execution_succeeds(env, "from random import *"); assert_command_execution_succeeds(env, "random()"); diff --git a/python/test/time.cpp b/python/test/time.cpp index a2baa3fa0..f1c2b7896 100644 --- a/python/test/time.cpp +++ b/python/test/time.cpp @@ -2,7 +2,7 @@ #include "execution_environment.h" QUIZ_CASE(python_time) { - TestExecutionEnvironment env = init_environement(); + TestExecutionEnvironment env = init_environnement(); assert_command_execution_fails(env, "monotonic()"); assert_command_execution_succeeds(env, "from time import *"); assert_command_execution_succeeds(env, "monotonic()"); diff --git a/python/test/turtle.cpp b/python/test/turtle.cpp index e5f5572af..f69849703 100644 --- a/python/test/turtle.cpp +++ b/python/test/turtle.cpp @@ -4,7 +4,7 @@ // TODO: to be completed QUIZ_CASE(python_turtle) { - TestExecutionEnvironment env = init_environement(); + TestExecutionEnvironment env = init_environnement(); assert_command_execution_fails(env, "forward(3)"); assert_command_execution_succeeds(env, "from turtle import *"); assert_command_execution_succeeds(env, "reset()"); @@ -28,7 +28,7 @@ QUIZ_CASE(python_turtle) { QUIZ_CASE(python_turtle_circle) { // Turtle position should be unchanged after a complete circle - TestExecutionEnvironment env = init_environement(); + TestExecutionEnvironment env = init_environnement(); assert_command_execution_succeeds(env, "from turtle import *"); assert_command_execution_succeeds(env, "goto(0,0)"); assert_command_execution_succeeds(env, "circle(28)"); diff --git a/themes/themes_manager.py b/themes/themes_manager.py index 18551e8fb..b13d2bcb2 100644 --- a/themes/themes_manager.py +++ b/themes/themes_manager.py @@ -215,7 +215,7 @@ def main(args): if __name__ == "__main__": parser = argparse.ArgumentParser(description="Process the themes.") - parser.add_argument("repo", nargs="?", help="git remote from wtich to get the themes from. Set to \"local\" for included themes") + parser.add_argument("repo", nargs="?", help="git remote from witch to get the themes from. Set to \"local\" for included themes") parser.add_argument("theme", nargs="?", help="the name of the theme") parser.add_argument("output", nargs="?", help="path to the output header file") parser.add_argument("build_dir", nargs="?", help="path to the output folder")