4 |
5 |
6 | int
7 | main(argc, argv)
8 | char **argv;
9 | {
10 | int nl = 1;
11 | int i;
12 |
13 | if ( (argc > 1) && (strcmp(argv[1], "-n") == 0) ) {
14 | ++argv;
15 | --argc;
16 | nl = 0;
17 | }
18 |
19 | for ( i=1; i < argc; i++ ) {
20 | if ( i > 1 ) putchar(' ');
21 | fputs(argv[i], stdout);
22 | }
23 | if (nl) putchar('\n');
24 | exit(0);
25 | }
26 |
--------------------------------------------------------------------------------
/admin/documentation/Octave/README.md:
--------------------------------------------------------------------------------
1 | ### Steps to extract the indices from `octave's official documentation` to add them to `qhp` under `keywords`
2 | Simply get the QtHelp files from the official Octave repository. Get the files from `octave-5.2.0/doc/interpreter/`. The files are having `.qch` and `.qhc` extension. You could also run the perl script named `mk-qthelp.pl` and pass in the arguments as `octave.html` and `help`. ie `mk-qthelp.pl octave.html help`. After running this script, the help files are generated.
3 |
--------------------------------------------------------------------------------
/thirdparty/discount-2.2.6-patched/tests/data/f01.html:
--------------------------------------------------------------------------------
1 | is there a footnote here?1
2 |
3 | And this is not part of the footnote
4 |
22 |
23 |
--------------------------------------------------------------------------------
/src/backends/lua/luavariablemodel.h:
--------------------------------------------------------------------------------
1 | #ifndef LUAVARIABLEMODEL_H
2 | #define LUAVARIABLEMODEL_H
3 |
4 | #include "defaultvariablemodel.h"
5 |
6 | class LuaVariableModel : public Cantor::DefaultVariableModel
7 | {
8 | public:
9 | LuaVariableModel(Cantor::Session* session);
10 |
11 | void update() override;
12 |
13 | private Q_SLOTS:
14 | void parseResult(Cantor::Expression::Status status);
15 |
16 | private:
17 | Cantor::Expression* m_expression{nullptr};
18 | };
19 |
20 | #endif // LUAVARIABLEMODEL_H
21 |
--------------------------------------------------------------------------------
/admin/documentation/apply_css.py:
--------------------------------------------------------------------------------
1 | import os
2 | from bs4 import BeautifulSoup
3 |
4 | css_link = BeautifulSoup('', 'html.parser')
5 |
6 | for filename in os.listdir('.'):
7 | if filename.endswith('.html'):
8 | with open(filename, 'r+') as f:
9 | soup = BeautifulSoup(f, 'html.parser')
10 | head = soup.head
11 | head.append(css_link)
12 | f.seek(0)
13 | f.write(str(soup))
14 | f.truncate()
15 |
--------------------------------------------------------------------------------
/src/panelplugins/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | function(add_panel name)
2 |
3 | kcoreaddons_add_plugin("cantor_${name}"
4 | SOURCES ${ARGN}
5 | INSTALL_NAMESPACE "cantor_plugins/panels")
6 |
7 | target_link_libraries("cantor_${name}"
8 | cantorlibs)
9 |
10 | endfunction()
11 |
12 | add_subdirectory(helppanel)
13 | add_subdirectory(variablemgr)
14 | add_subdirectory(filebrowserpanel)
15 | add_subdirectory(tocpanel)
16 | if (ENABLE_EMBEDDED_DOCUMENTATION)
17 | add_subdirectory(documentationpanel)
18 | endif ()
19 |
--------------------------------------------------------------------------------
/thirdparty/discount-2.2.6-patched/tests/githubtags.t:
--------------------------------------------------------------------------------
1 | . tests/functions.sh
2 |
3 | title "github tags"
4 |
5 | rc=0
6 | MARKDOWN_FLAGS=
7 |
8 | SRC='content'
9 |
10 | try 'github tags disabled by default' \
11 | "$SRC" \
12 | '<element-name>content</element-name>
'
13 |
14 | try -fgithubtags 'github tags' \
15 | "$SRC" \
16 | 'content
'
17 |
18 | try 'normal tags pass through' \
19 | 'sdf' \
20 | 'sdf
'
21 |
22 | summary $0
23 | exit $rc
24 |
--------------------------------------------------------------------------------
/src/backends/qalculate/plotassistant/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | set( QalculatePlotAssistant_SRCS
2 | qalculateplotassistant.cpp
3 | qalculateplotassistant.qrc
4 | )
5 |
6 | kconfig_add_kcfg_files(QalculatePlotAssistant_SRCS ../settings.kcfgc)
7 | ki18n_wrap_ui(QalculatePlotAssistant_SRCS qalculateplotdialog.ui)
8 |
9 | kcoreaddons_add_plugin(cantor_qalculateplotassistant
10 | SOURCES ${QalculatePlotAssistant_SRCS}
11 | INSTALL_NAMESPACE "cantor_plugins/assistants")
12 |
13 | target_link_libraries(cantor_qalculateplotassistant cantorlibs)
14 |
--------------------------------------------------------------------------------
/thirdparty/discount-2.2.6-patched/html5.c:
--------------------------------------------------------------------------------
1 | /* block-level tags for passing html5 blocks through the blender
2 | */
3 | #include "tags.h"
4 |
5 | void
6 | mkd_with_html5_tags()
7 | {
8 | static int populated = 0;
9 |
10 | if ( populated ) return;
11 | populated = 1;
12 |
13 | mkd_define_tag("ASIDE", 0);
14 | mkd_define_tag("FOOTER", 0);
15 | mkd_define_tag("HEADER", 0);
16 | mkd_define_tag("NAV", 0);
17 | mkd_define_tag("SECTION", 0);
18 | mkd_define_tag("ARTICLE", 0);
19 |
20 | mkd_sort_tags();
21 | }
22 |
--------------------------------------------------------------------------------
/admin/documentation/Qalculate/README.md:
--------------------------------------------------------------------------------
1 | ### Steps for adding custom style to the Qalculate documentation
2 |
3 | 1. Copy and paste the main.css file as it is in the Qalculate folder.
4 |
5 | 2. Link this file with the HTML files of Qalculte Documentation.
6 |
7 | 3. This can be done by running the `script.py` file.
8 |
9 | 4. Using this main.css file one can customize the Qalculte Documentation by adding custom css rules in it.
10 |
11 | 5. Along with that `script.py` will also run the code for converting the Qalculate documentation in Qt Help files.
12 |
--------------------------------------------------------------------------------
/thirdparty/discount-2.2.6-patched/tests/strikethrough.t:
--------------------------------------------------------------------------------
1 | . tests/functions.sh
2 |
3 | title "strikethrough"
4 |
5 | rc=0
6 | MARKDOWN_FLAGS=
7 |
8 | try 'strikethrough' '~~deleted~~' 'deleted
'
9 | try -fnodel '... with -fnodel' '~~deleted~~' '~~deleted~~
'
10 | try 'mismatched tildes' '~~~tick~~' '~tick
'
11 | try 'mismatched tildes(2)' '~~tick~~~' '~~tick~~~
'
12 | try 'single tildes' '~tick~' '~tick~
'
13 | try 'tildes wrapped in spaces' '~~~ ~~~' '~~~ ~~~
'
14 |
15 | summary $0
16 | exit $rc
17 |
--------------------------------------------------------------------------------
/src/backends/julia/scripts/variables_saver.jl:
--------------------------------------------------------------------------------
1 | # Variable saving script
2 | #
3 | # Install JLD script with `Pkg.add(JLD)` to use it
4 | import JLD
5 | JLD.jldopen("%1", "w") do file
6 | for name in names(Main)[4:end]
7 | if name == :__originalSTDOUT__ || name == :__originalSTDERR__
8 | continue
9 | end
10 | var_info = summary(eval(name))
11 | if var_info == "Function" || var_info == "Module"
12 | continue
13 | end
14 | JLD.write(file, repr(name)[2:end], eval(name))
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/thirdparty/discount-2.2.6-patched/msvc/README.md:
--------------------------------------------------------------------------------
1 | # *Discount* Markdown compiler on Windows with Visual C++
2 |
3 | Makefile for NMAKE utility to build Discount using Visual C++
4 | and pre-digested `config.h` template.
5 |
6 | ## Build
7 |
8 | Build generates default optimised binaries.
9 | Edit `CFLAGS` in `Makefile` to customize generated binaries (eg. switch to debug build).
10 |
11 | * Generate static library `libmarkdown.lib` and utility programs:
12 |
13 | nmake /f msvc/Makefile
14 |
15 | * Clean source tree
16 |
17 | nmake /f msvc/Makefile clean
18 |
--------------------------------------------------------------------------------
/thirdparty/discount-2.2.6-patched/tests/flow.t:
--------------------------------------------------------------------------------
1 | . tests/functions.sh
2 |
3 | title "paragraph flow"
4 |
5 | rc=0
6 | MARKDOWN_FLAGS=
7 |
8 | try 'header followed by paragraph' \
9 | '###Hello, sailor###
10 | And how are you today?' \
11 | 'Hello, sailor
12 |
13 | And how are you today?
'
14 |
15 | try 'two lists punctuated with a HR' \
16 | '* A
17 | * * *
18 | * B
19 | * C' \
20 | '
23 |
24 |
25 |
26 |
27 | '
31 |
32 | summary $0
33 | exit $rc
34 |
--------------------------------------------------------------------------------
/admin/documentation/main.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: Arial, sans-serif;
3 | line-height: 1.6;
4 | color: #333;
5 | margin: 20px;
6 | padding: 20px;
7 | background-color: #f4f4f4;
8 | }
9 |
10 | h1 {
11 | color: #444;
12 | }
13 |
14 | p {
15 | margin-bottom: 20px;
16 | }
17 |
18 | blockquote {
19 | border-left: 5px solid #ccc;
20 | padding-left: 15px;
21 | margin-left: 0;
22 | color: #666;
23 | }
24 |
25 | a {
26 | color: #3498db;
27 | text-decoration: none;
28 | }
29 |
30 | a:hover {
31 | color: #226897;
32 | }
--------------------------------------------------------------------------------
/src/backends/qalculate/qalculatevariablemodel.h:
--------------------------------------------------------------------------------
1 | #ifndef QALCULATE_VARIABLE_MODEL_H
2 | #define QALCULATE_VARIABLE_MODEL_H
3 |
4 | #include "defaultvariablemodel.h"
5 |
6 | class QalculateSession;
7 |
8 | class QalculateVariableModel : public Cantor::DefaultVariableModel
9 | {
10 | Q_OBJECT
11 | public:
12 | explicit QalculateVariableModel(QalculateSession*);
13 | ~QalculateVariableModel() override;
14 |
15 | void update() override;
16 |
17 | private:
18 | QalculateSession* m_session{nullptr};
19 | };
20 |
21 | #endif // QALCULATE_VARIABLE_MODEL_H
22 |
--------------------------------------------------------------------------------
/src/backends/sage/sagevariablemodel.h:
--------------------------------------------------------------------------------
1 | #ifndef SAGEVARIABLEMODEL_H
2 | #define SAGEVARIABLEMODEL_H
3 |
4 | #include "defaultvariablemodel.h"
5 |
6 | class SageVariableModel : public Cantor::DefaultVariableModel
7 | {
8 | Q_OBJECT
9 | public:
10 | explicit SageVariableModel(Cantor::Session*);
11 | ~SageVariableModel() override;
12 |
13 | void update() override;
14 |
15 | private Q_SLOTS:
16 | void parseResult(Cantor::Expression::Status);
17 |
18 | private:
19 | Cantor::Expression* m_expression{nullptr};
20 | };
21 |
22 | #endif //SAGEVARIABLEMODEL_H
23 |
--------------------------------------------------------------------------------
/thirdparty/discount-2.2.6-patched/tests/defects.t:
--------------------------------------------------------------------------------
1 | . tests/functions.sh
2 |
3 | title "reported defects"
4 |
5 | rc=0
6 | MARKDOWN_FLAGS=
7 |
8 | try 'masses of non-block html' \
9 | 'foo
10 |
11 | bar
' \
12 | 'foo
13 |
14 | bar
'
15 |
16 | try -fautolink -G 'autolink + github-flavoured markdown' \
17 | 'http://foo
18 | bar' \
19 | 'http://foo
20 | bar
'
21 |
22 | try 'unterminated block' '
>*' '
>*
'
23 |
24 | summary $0
25 | exit $rc
26 |
--------------------------------------------------------------------------------
/src/lib/cantor_macros.h:
--------------------------------------------------------------------------------
1 | /*
2 | SPDX-License-Identifier: GPL-2.0-or-later
3 | SPDX-FileCopyrightText: 2009 Alexander Rieder
4 | */
5 |
6 | #ifndef _CANTOR_MACROS_H
7 | #define _CANTOR_MACROS_H
8 |
9 | #include
10 |
11 | /**
12 | Exports Backend plugin.
13 | */
14 | #define K_EXPORT_CANTOR_PLUGIN(libname, classname) \
15 | K_PLUGIN_FACTORY(factory, registerPlugin();) \
16 | K_EXPORT_PLUGIN(factory("cantor_" #libname)) \
17 | K_EXPORT_PLUGIN_VERSION(CANTOR_VERSION)
18 |
19 | #endif /* _CANTOR_MACROS_H */
20 |
--------------------------------------------------------------------------------
/cmake/FindLuaJIT.cmake:
--------------------------------------------------------------------------------
1 | find_package(PkgConfig)
2 |
3 | pkg_check_modules(LUAJIT QUIET luajit)
4 |
5 | find_path(LUAJIT_INCLUDE_DIR lua.hpp HINTS ${LUAJIT_INCLUDEDIR} ${LUAJIT_INCLUDE_DIRS})
6 | find_library(LUAJIT_LIBRARY NAMES luajit-5.1 luajit HINTS ${LUAJIT_LIBDIR} ${LUAJIT_LIBRARY_DIRS})
7 |
8 | set(LUAJIT_LIBRARIES ${LUAJIT_LIBRARY})
9 | set(LUAJIT_INCLUDE_DIRS ${LUAJIT_INCLUDE_DIR})
10 |
11 | include(FindPackageHandleStandardArgs)
12 | find_package_handle_standard_args(LuaJIT DEFAULT_MSG LUAJIT_LIBRARY LUAJIT_INCLUDE_DIR)
13 | mark_as_advanced(LUAJIT_INCLUDE_DIR LUAJIT_LIBRARY)
14 |
--------------------------------------------------------------------------------
/thirdparty/discount-2.2.6-patched/tests/linkypix.t:
--------------------------------------------------------------------------------
1 | . tests/functions.sh
2 |
3 | title "embedded images"
4 |
5 | rc=0
6 | MARKDOWN_FLAGS=
7 |
8 | try 'image with size extension' \
9 | '' \
10 | '
'
11 |
12 | try 'image with height' \
13 | '' \
14 | '
'
15 |
16 | try 'image with width' \
17 | '' \
18 | '
'
19 |
20 | summary $0
21 | exit $rc
22 |
--------------------------------------------------------------------------------
/src/backends/kalgebra/kalgebrabackend.kcfg:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/lib/keywordsmanager.h:
--------------------------------------------------------------------------------
1 | #ifndef CANTOR_SYMBOLMANAGER_H
2 | #define CANTOR_SYMBOLMANAGER_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include "cantor_export.h"
9 |
10 | class CANTOR_EXPORT KeywordsManager
11 | {
12 | public:
13 | explicit KeywordsManager(const QString& syntaxDefinitionName);
14 |
15 | const QSet& symbolList(const QString& listName) const;
16 |
17 | QStringList symbolLists() const;
18 |
19 | private:
20 | QHash> m_symbolSets;
21 | };
22 |
23 | #endif // CANTOR_SYMBOLMANAGER_H
24 |
--------------------------------------------------------------------------------
/src/assistants/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | function(add_assistant name)
2 |
3 | kcoreaddons_add_plugin("cantor_${name}"
4 | SOURCES ${ARGN}
5 | INSTALL_NAMESPACE "cantor_plugins/assistants")
6 |
7 | target_link_libraries("cantor_${name}"
8 | cantorlibs)
9 |
10 | endfunction()
11 |
12 |
13 | add_subdirectory(solve)
14 | add_subdirectory(integrate)
15 | add_subdirectory(differentiate)
16 | add_subdirectory(linearalgebra)
17 | add_subdirectory(runscript)
18 | add_subdirectory(plot2d)
19 | add_subdirectory(plot3d)
20 | add_subdirectory(advancedplot)
21 | add_subdirectory(importpackage)
22 |
--------------------------------------------------------------------------------
/src/assistants/advancedplot/directivecontainer.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | directiveContainer
4 |
5 |
6 |
7 | 0
8 | 0
9 | 400
10 | 300
11 |
12 |
13 |
14 | Option active
15 |
16 |
17 | true
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/assistants/solve/solveassistant.h:
--------------------------------------------------------------------------------
1 | /*
2 | SPDX-License-Identifier: GPL-2.0-or-later
3 | SPDX-FileCopyrightText: 2009 Alexander Rieder
4 | */
5 |
6 | #ifndef _SOLVEASSISTANT_H
7 | #define _SOLVEASSISTANT_H
8 |
9 | #include "assistant.h"
10 |
11 | class SolveAssistant : public Cantor::Assistant
12 | {
13 | public:
14 | SolveAssistant( QObject* parent, QList args );
15 | ~SolveAssistant() override = default;
16 |
17 | void initActions() override;
18 |
19 | QStringList run(QWidget* parentt) override;
20 |
21 | };
22 |
23 | #endif /* _SOLVEASSISTANT_H */
24 |
--------------------------------------------------------------------------------
/src/assistants/plot2d/plot2dassistant.h:
--------------------------------------------------------------------------------
1 | /*
2 | SPDX-License-Identifier: GPL-2.0-or-later
3 | SPDX-FileCopyrightText: 2009 Alexander Rieder
4 | */
5 |
6 | #ifndef _PLOT2DASSISTANT_H
7 | #define _PLOT2DASSISTANT_H
8 |
9 | #include "assistant.h"
10 |
11 | class Plot2dAssistant : public Cantor::Assistant
12 | {
13 | Q_OBJECT
14 | public:
15 | Plot2dAssistant( QObject* parent, QList args );
16 | ~Plot2dAssistant() override = default;
17 |
18 | void initActions() override;
19 | QStringList run(QWidget* parentt) override;
20 | };
21 |
22 | #endif /* _PLOT2DASSISTANT_H */
23 |
--------------------------------------------------------------------------------
/src/assistants/plot3d/plot3dassistant.h:
--------------------------------------------------------------------------------
1 | /*
2 | SPDX-License-Identifier: GPL-2.0-or-later
3 | SPDX-FileCopyrightText: 2009 Alexander Rieder
4 | */
5 |
6 | #ifndef _PLOT3DASSISTANT_H
7 | #define _PLOT3DASSISTANT_H
8 |
9 | #include "assistant.h"
10 |
11 | class Plot3dAssistant : public Cantor::Assistant
12 | {
13 | Q_OBJECT
14 | public:
15 | Plot3dAssistant( QObject* parent, QList args );
16 | ~Plot3dAssistant() override = default;
17 |
18 | void initActions() override;
19 | QStringList run(QWidget* parentt) override;
20 | };
21 |
22 | #endif /* _PLOT3DASSISTANT_H */
23 |
--------------------------------------------------------------------------------
/src/backends/R/rserver/tools/envvars.r:
--------------------------------------------------------------------------------
1 | #!/usr/bin/Rscript
2 | #
3 | # script taken from RInside library
4 | #
5 | # This owes a lot to littler.R in the littler sources
6 |
7 | ExcludeVars <- c("R_SESSION_TMPDIR","R_HISTFILE")
8 | IncludeVars <- Sys.getenv()
9 | IncludeVars <- IncludeVars[grep("^R_",names(IncludeVars),perl=TRUE)]
10 | cat(" const char *R_VARS[] = {\n")
11 | for (i in 1:length(IncludeVars)){
12 | if (names(IncludeVars)[i] %in% ExcludeVars)
13 | next
14 | IncludeVars[i] <- gsub("\\\\",'/',IncludeVars[i])
15 | cat(' "',names(IncludeVars)[i],'","',IncludeVars[i],'",\n',sep='')
16 | }
17 | cat(" nullptr\n };\n")
18 |
--------------------------------------------------------------------------------
/thirdparty/discount-2.2.6-patched/tests/backslash.t:
--------------------------------------------------------------------------------
1 | . tests/functions.sh
2 |
3 | title "backslash escapes"
4 |
5 | rc=0
6 | MARKDOWN_FLAGS=
7 |
8 | try 'backslashes in []()' '[foo](http://\this\is\.a\test\(here\))' \
9 | 'foo
'
10 |
11 | try -fautolink 'autolink url with trailing \' \
12 | 'http://a.com/\' \
13 | 'http://a.com/\
'
14 |
15 |
16 | try 'backslashes before ' '\
'
17 | try 'backslashes before <{EOF}' '\<' '<
'
18 | try 'backslashes before <[space]' '\< j' '< j
'
19 |
20 | summary $0
21 | exit $rc
22 |
--------------------------------------------------------------------------------
/src/backends/kalgebra/kalgebrasyntaxhelpobject.h:
--------------------------------------------------------------------------------
1 | /*
2 | SPDX-FileCopyrightText: 2009 Aleix Pol
3 |
4 | SPDX-License-Identifier: GPL-2.0-or-later
5 | */
6 |
7 | #ifndef KALGEBRASYNTAXHELPOBJECT_H
8 | #define KALGEBRASYNTAXHELPOBJECT_H
9 |
10 | #include
11 |
12 | class KAlgebraSession;
13 |
14 | class KAlgebraSyntaxHelpObject : public Cantor::SyntaxHelpObject
15 | {
16 | public:
17 | KAlgebraSyntaxHelpObject( const QString& command, KAlgebraSession* session );
18 |
19 | protected:
20 | void fetchInformation() override;
21 | };
22 |
23 | #endif // KALGEBRASYNTAXHELPOBJECT_H
24 |
--------------------------------------------------------------------------------
/src/assistants/integrate/integrateassistant.h:
--------------------------------------------------------------------------------
1 | /*
2 | SPDX-License-Identifier: GPL-2.0-or-later
3 | SPDX-FileCopyrightText: 2009 Alexander Rieder
4 | */
5 |
6 | #ifndef _INTEGRATEASSISTANT_H
7 | #define _INTEGRATEASSISTANT_H
8 |
9 | #include "assistant.h"
10 |
11 | class IntegrateAssistant : public Cantor::Assistant
12 | {
13 | public:
14 | IntegrateAssistant( QObject* parent, QList args );
15 | ~IntegrateAssistant() override = default;
16 |
17 | void initActions() override;
18 |
19 | QStringList run(QWidget* parentt) override;
20 |
21 | };
22 |
23 | #endif /* _INTEGRATEASSISTANT_H */
24 |
--------------------------------------------------------------------------------
/src/assistants/runscript/runscriptassistant.h:
--------------------------------------------------------------------------------
1 | /*
2 | SPDX-License-Identifier: GPL-2.0-or-later
3 | SPDX-FileCopyrightText: 2009 Alexander Rieder
4 | */
5 |
6 | #ifndef _RUNSCRIPTASSISTANT_H
7 | #define _RUNSCRIPTASSISTANT_H
8 |
9 | #include "assistant.h"
10 |
11 | class RunScriptAssistant : public Cantor::Assistant
12 | {
13 | public:
14 | RunScriptAssistant( QObject* parent, QList args );
15 | ~RunScriptAssistant() override = default;
16 |
17 | void initActions() override;
18 |
19 | QStringList run(QWidget* parentt) override;
20 |
21 | };
22 |
23 | #endif /* _RUNSCRIPTASSISTANT_H */
24 |
--------------------------------------------------------------------------------
/thirdparty/discount-2.2.6-patched/amalloc.h:
--------------------------------------------------------------------------------
1 | /*
2 | * debugging malloc()/realloc()/calloc()/free() that attempts
3 | * to keep track of just what's been allocated today.
4 | */
5 | #ifndef AMALLOC_D
6 | #define AMALLOC_D
7 |
8 | #include "config.h"
9 |
10 | #ifdef USE_AMALLOC
11 |
12 | extern void *amalloc(int);
13 | extern void *acalloc(int,int);
14 | extern void *arealloc(void*,int);
15 | extern void afree(void*);
16 | extern void adump();
17 |
18 | #define malloc amalloc
19 | #define calloc acalloc
20 | #define realloc arealloc
21 | #define free afree
22 |
23 | #else
24 |
25 | #define adump() (void)1
26 |
27 | #endif
28 |
29 | #endif/*AMALLOC_D*/
30 |
--------------------------------------------------------------------------------
/thirdparty/discount-2.2.6-patched/tools/branch.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | #include "config.h"
5 |
6 | int
7 | main(argc, argv)
8 | int argc;
9 | char **argv;
10 | {
11 | #if HAS_GIT
12 | FILE * pipe;
13 |
14 | char line[1024];
15 |
16 | freopen("/dev/null", "w", stderr);
17 | pipe = popen("git branch | awk '$1 ~ /\\*/ { print $2; }'", "r");
18 | if ( pipe == NULL )
19 | return 0;
20 |
21 | if ( fgets(line, sizeof line, pipe) != 0 ) {
22 | strtok(line, "\n");
23 | if ( strcmp(line, "master" ) != 0 )
24 | printf("\"(%s)\"", line);
25 | }
26 | pclose(pipe);
27 | #endif
28 | return 0;
29 | }
30 |
--------------------------------------------------------------------------------
/src/backends/python/pythonutils.h:
--------------------------------------------------------------------------------
1 | /*
2 | SPDX-License-Identifier: GPL-2.0-or-later
3 | SPDX-FileCopyrightText: 2015 Minh Ngo
4 | */
5 |
6 | #ifndef _PYTHONUTILS_H
7 | #define _PYTHONUTILS_H
8 |
9 | #include
10 | #include
11 |
12 | inline QString fromSource(const QString& resourceName)
13 | {
14 | QFile text(resourceName);
15 | if (text.open(QIODevice::ReadOnly))
16 | return QString::fromUtf8(text.readAll());
17 | else
18 | {
19 | qWarning() << "Cantor Python resource" << resourceName << "didn't open - something wrong";
20 | return QString();
21 | }
22 | }
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/thirdparty/discount-2.2.6-patched/tests/safelinks.t:
--------------------------------------------------------------------------------
1 | . tests/functions.sh
2 |
3 | title "safe links"
4 |
5 | rc=0
6 | MARKDOWN_FLAGS=
7 |
8 | try -fsafelink 'bogus url' '[test](bad:protocol)' \
9 | '[test](bad:protocol)
'
10 | try -fsafelink 'illegal url' '[test](b?d:protocol)' \
11 | 'test
'
12 | try -fsafelink 'url fragment (1)' '[test](#bar)' 'test
'
13 | try -fsafelink 'url fragment (2)' '[test](/bar)' 'test
'
14 | try -fnosafelink 'bogus url (-fnosafelink)' '[test](bad:protocol)' 'test
'
15 |
16 |
17 | summary $0
18 | exit $rc
19 |
--------------------------------------------------------------------------------
/src/assistants/importpackage/importpackageassistant.h:
--------------------------------------------------------------------------------
1 | /*
2 | SPDX-License-Identifier: GPL-2.0-or-later
3 | SPDX-FileCopyrightText: 2013 Filipe Saraiva
4 | */
5 |
6 | #ifndef _IMPORTPACKAGEASSISTANT_H
7 | #define _IMPORTPACKAGEASSISTANT_H
8 |
9 | #include "assistant.h"
10 |
11 | class ImportPackageAssistant : public Cantor::Assistant
12 | {
13 | public:
14 | ImportPackageAssistant( QObject* parent, QList args );
15 | ~ImportPackageAssistant() override = default;
16 |
17 | void initActions() override;
18 |
19 | QStringList run(QWidget* parentt) override;
20 |
21 | };
22 |
23 | #endif /* _IMPORTPACKAGEASSISTANT_H */
24 |
--------------------------------------------------------------------------------
/src/backends/sage/sagesettingswidget.h:
--------------------------------------------------------------------------------
1 | /*
2 | SPDX-FileCopyrightText: 2020-2023 by Alexander Semke (alexander.semke@web.de)
3 |
4 | SPDX-License-Identifier: GPL-2.0-or-later
5 | */
6 |
7 | #ifndef SAGESETTINGSWIDGET_H
8 | #define SAGESETTINGSWIDGET_H
9 |
10 | #include "ui_settings.h"
11 | #include "../backendsettingswidget.h"
12 |
13 | class SageSettingsWidget : public BackendSettingsWidget, public Ui::SageSettingsBase
14 | {
15 | Q_OBJECT
16 |
17 | public:
18 | explicit SageSettingsWidget(QWidget* parent = nullptr, const QString& id = QString());
19 |
20 | private Q_SLOTS:
21 | void integratePlotsChanged(bool);
22 | };
23 |
24 | #endif /* SAGESETTINGSWIDGET_H */
25 |
--------------------------------------------------------------------------------
/admin/documentation/Python/NumPy_v1.19/README.md:
--------------------------------------------------------------------------------
1 | ### Steps to generate `qhp` and `qhcp`
2 | Copy the file named `qthelp_generator.py` to the location where the `NumPy` HTML files exists. Then simply run the command `python qthelp_generator.py`. This script does the task of extracting the keywords from `Numpy_v1.19/genindex.html` and generation of QtHelp files named `qhp` and `qhcp`.
3 | NOTE: Copy the script named `qthelp_generator.py` inside the directory `Numpy_v1.19/`. Official python documentation can be downloaded from https://numpy.org/doc/.
4 |
5 | ### Creation of `qhc` and `qch`
6 | Use the following command to generate the above said files.
7 |
8 | qhelpgenerator help.qhcp -o help.qhc
9 |
--------------------------------------------------------------------------------
/src/assistants/linearalgebra/eigenvalues/eigenvaluesassistant.h:
--------------------------------------------------------------------------------
1 | /*
2 | SPDX-License-Identifier: GPL-2.0-or-later
3 | SPDX-FileCopyrightText: 2009 Alexander Rieder
4 | */
5 |
6 | #ifndef _EIGENVALUESASSISTANT_H
7 | #define _EIGENVALUESASSISTANT_H
8 |
9 | #include "assistant.h"
10 |
11 | class EigenValuesAssistant : public Cantor::Assistant
12 | {
13 | public:
14 | EigenValuesAssistant( QObject* parent, QList args );
15 | ~EigenValuesAssistant() override = default;
16 |
17 | void initActions() override;
18 |
19 | QStringList run(QWidget* parentt) override;
20 |
21 | };
22 |
23 | #endif /* _EIGENVALUESASSISTANT_H */
24 |
--------------------------------------------------------------------------------
/src/backends/julia/juliasettingswidget.h:
--------------------------------------------------------------------------------
1 | /*
2 | SPDX-FileCopyrightText: 2020-2025 by Alexander Semke (alexander.semke@web.de)
3 | SPDX-License-Identifier: GPL-2.0-or-later
4 | */
5 |
6 | #ifndef JULIASETTINGSWIDGET_H
7 | #define JULIASETTINGSWIDGET_H
8 |
9 | #include "ui_settings.h"
10 | #include "../backendsettingswidget.h"
11 |
12 | class JuliaSettingsWidget : public BackendSettingsWidget, public Ui::JuliaSettingsBase
13 | {
14 | Q_OBJECT
15 |
16 | public:
17 | explicit JuliaSettingsWidget(QWidget* parent = nullptr, const QString& id = QString());
18 |
19 | private Q_SLOTS:
20 | void integratePlotsChanged(bool);
21 | };
22 |
23 | #endif /* JULIASETTINGSWIDGET_H */
24 |
--------------------------------------------------------------------------------
/src/assistants/differentiate/differentiateassistant.h:
--------------------------------------------------------------------------------
1 | /*
2 | SPDX-License-Identifier: GPL-2.0-or-later
3 | SPDX-FileCopyrightText: 2009 Alexander Rieder
4 | */
5 |
6 | #ifndef _DIFFERENTIATEASSISTANT_H
7 | #define _DIFFERENTIATEASSISTANT_H
8 |
9 | #include "assistant.h"
10 |
11 | class DifferentiateAssistant : public Cantor::Assistant
12 | {
13 | public:
14 | DifferentiateAssistant( QObject* parent, QList args );
15 | ~DifferentiateAssistant() override = default;
16 |
17 | void initActions() override;
18 |
19 | QStringList run(QWidget* parentt) override;
20 |
21 | };
22 |
23 | #endif /* _DIFFERENTIATEASSISTANT_H */
24 |
--------------------------------------------------------------------------------
/thirdparty/discount-2.2.6-patched/tests/crash.t:
--------------------------------------------------------------------------------
1 | . tests/functions.sh
2 |
3 | title "crashes"
4 |
5 | rc=0
6 | MARKDOWN_FLAGS=
7 |
8 | try 'zero-length input' '' ''
9 |
10 | try 'hanging quote in list' \
11 | ' * > this should not die
12 |
13 | no.' \
14 | '
15 | this should not die
16 |
17 |
18 |
19 | no.
'
20 |
21 | try 'dangling list item' ' - ' \
22 | ''
25 |
26 | try -bHOHO 'empty []() with baseurl' '[]()' '
'
27 | try 'unclosed html block' '</table'
28 | try 'unclosed style block' '' ''
9 |
10 | ASK=''
13 |
14 | try 'multiple lines' "$ASK" ''
15 |
16 | try 'unclosed' '