diff --git a/Exercices/mcq/mcq.py b/Exercices/mcq/mcq.py index 7c25c416dc1b77471940d38242fdd2cc7a2cc8b1..44bcf2f31fdae66c3adb821ec5848c96475f0f68 100644 --- a/Exercices/mcq/mcq.py +++ b/Exercices/mcq/mcq.py @@ -339,7 +339,7 @@ def html_add_content(app, doctree, docname): builder = app.builder if not hasattr(builder, 'format') or builder.format != 'html': return - h = hashlib.md5(str(doctree)).hexdigest() + h = hashlib.md5(str(doctree).encode('utf-8')).hexdigest() title = '' node = doctree for t in doctree.traverse(nodes.title): @@ -354,12 +354,12 @@ def html_add_content(app, doctree, docname): section += nodes.raw(format='html', text=text) node += section js = nodes.raw(format='html') - js += nodes.Text(u'\n<script type="text/javascript">var language = "' + unicode(language) + '";' - u' var upload_url = "' + unicode(app.config.mcq_upload_url) + '";' - u' var hash = "' + unicode(h) + '"; var title = "' + unicode(title) + '";' - u' var html_title = "' + unicode(app.config.html_title) + '";') + js += nodes.Text(u'\n<script type="text/javascript">var language = "' + str(language.encode('utf-8')) + '";' + u' var upload_url = "' + str(app.config.mcq_upload_url.encode('utf-8')) + '";' + u' var hash = "' + str(h.encode('utf-8')) + '"; var title = "' + str(title.encode('utf-8')) + '";' + u' var html_title = "' + str(app.config.html_title.encode('utf-8')) + '";') if app.config.mcq_inginious_url and task_id: - js += nodes.Text(u' var task_id = "' + unicode(task_id) + '"; var inginious_url = "' + unicode(app.config.mcq_inginious_url) + '";') + js += nodes.Text(u' var task_id = "' + str(task_id.encode('utf-8')) + '"; var inginious_url = "' + str(app.config.mcq_inginious_url.encode('utf-8')) + '";') js += nodes.Text(u'</script>'); doctree += js diff --git a/Outils/conf.py b/Outils/conf.py index 7a9e81ee239169140d54a09166c62e63a9c2e7ee..95b583153ca86add28bd0e6bbe61ef906c779ecb 100644 --- a/Outils/conf.py +++ b/Outils/conf.py @@ -18,6 +18,8 @@ import sys, os # documentation root, use os.path.abspath to make it absolute, like shown here. #sys.path.insert(0, os.path.abspath('.')) + + # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. @@ -25,7 +27,7 @@ import sys, os # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.todo', 'sphinx.ext.ifconfig', 'sphinx.ext.mathjax', 'sphinx.ext.intersphinx' ] +extensions = ['sphinx.ext.todo', 'sphinx.ext.ifconfig', 'sphinx.ext.mathjax', 'sphinx.ext.intersphinx', 'sphinxcontrib.spelling' ] # ucomment #sys.path.append(os.path.abspath(os.getcwd())) @@ -105,7 +107,10 @@ rst_epilog = """ # Intersphinx intersphinx_mapping = {'theorie': ('https://sites.uclouvain.be/SystInfo/notes/Theorie/html/', None), 'outils': ('https://sites.uclouvain.be/SystInfo/notes/Outils/html/', None), 'exercices': ('https://sites.uclouvain.be/SystInfo/notes/Exercices/html/', None)} +# -- Options for Spelling extension ------------------------------------------ +spelling_lang='fr' +spelling_word_list_filename='../dict.txt' # -- Options for HTML output --------------------------------------------------- diff --git a/Outils/cunit.rst b/Outils/cunit.rst index ccb5c35aad56fabdf743c6a279acd2dadf171c6e..ef2f27cecfe2888a076977145c19bba4351c5376 100644 --- a/Outils/cunit.rst +++ b/Outils/cunit.rst @@ -105,10 +105,10 @@ Assertion Définition ``CU_ASSERT_PTR_NOT_EQUAL(actual, expected)`` Vérifie que le pointeur ``actual`` est différent du pointeur ``expected``. ``CU_ASSERT_PTR_NULL(value)`` Vérifie que le pointeur est ``NULL``. ``CU_ASSERT_PTR_NOT_NULL(value)`` Vérifie que le pointeur n'est pas ``NULL``. -``CU_ASSERT_STRING_EQUAL(actual, expected)`` Vérifie que la chaine de caractère ``actual`` est égale à la chaine de caractère ``expected``. -``CU_ASSERT_STRING_NOT_EQUAL(actual, expected)`` Vérifie que la chaine de caractère ``actual`` n'est pas égale à la chaine de caractère ``expected``. -``CU_ASSERT_NSTRING_EQUAL(actual, expected, count)`` Vérifie que les ``count`` premiers caractères de la chaine ``actual`` sont égaux aux ``count`` premiers caractères de la chaine ``expected``. -``CU_ASSERT_NSTRING_NOT_EQUAL(actual, expected, count)`` Vérifie que les ``count`` premiers caractères de la chaine ``actual`` ne sont pas égaux aux ``count`` premiers caractères de la chaine ``expected``. +``CU_ASSERT_STRING_EQUAL(actual, expected)`` Vérifie que la chaîne de caractère ``actual`` est égale à la chaîne de caractère ``expected``. +``CU_ASSERT_STRING_NOT_EQUAL(actual, expected)`` Vérifie que la chaîne de caractère ``actual`` n'est pas égale à la chaîne de caractère ``expected``. +``CU_ASSERT_NSTRING_EQUAL(actual, expected, count)`` Vérifie que les ``count`` premiers caractères de la chaîne ``actual`` sont égaux aux ``count`` premiers caractères de la chaîne ``expected``. +``CU_ASSERT_NSTRING_NOT_EQUAL(actual, expected, count)`` Vérifie que les ``count`` premiers caractères de la chaîne ``actual`` ne sont pas égaux aux ``count`` premiers caractères de la chaîne ``expected``. ``CU_ASSERT_DOUBLE_EQUAL(actual, expected, granularity)`` Vérifie que ``actual`` et ``expected`` ne diffèrent pas plus que ``granularity`` (:math:`|actual-expected| \leq |granularity|`) ``CU_ASSERT_DOUBLE_NOT_EQUAL(actual, expected, granularity)`` Vérifie que ``actual`` et ``expected`` diffèrent de plus que ``granularity`` (:math:`|actual-expected| > |granularity|`) ``CU_PASS(message)`` Ne vérifie rien mais notifie que le test est réussis @@ -273,4 +273,4 @@ suivants : 2. cunit.c:29 - CU_ASSERT_STRING_EQUAL("string #1","string #2") Enfin, il est nécessaire de libérer les ressources en appelant -``CU_cleanup_registry()``. \ No newline at end of file +``CU_cleanup_registry()``. diff --git a/Theorie/conf.py b/Theorie/conf.py index ddd3ce4384a51d841c87886b0176ddb94e791af6..bd1f8d6a7163f84bf372df7fae05386f451b9b53 100644 --- a/Theorie/conf.py +++ b/Theorie/conf.py @@ -1,51 +1,42 @@ # -*- coding: utf-8 -*- +# Configuration file for the Sphinx documentation builder. # -# SINF1252 documentation build configuration file, created by -# sphinx-quickstart on Tue Jan 3 16:17:09 2012. -# -# This file is execfile()d with the current directory set to its containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html -import sys, os +# -- Path setup -------------------------------------------------------------- # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -#sys.path.insert(0, os.path.abspath('.')) +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) -# -- General configuration ----------------------------------------------------- +import sys, os -# If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' -# Add any Sphinx extension module names here, as strings. They can be extensions -# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.todo', 'sphinx.ext.ifconfig', 'sphinx.ext.mathjax', 'sphinx.ext.intersphinx', 'sphinxcontrib.spelling' ] +# -- Project information ----------------------------------------------------- -#spelling -spelling_lang='fr' -spelling_word_list_filename='../dict.txt' -# ucomment -#sys.path.append(os.path.abspath(os.getcwd())) -#extensions.append('ucomment-extension') -#html_translator_class = 'ucomment-extension.ucomment_html_translator' +extensions = ['sphinx.ext.todo', 'sphinx.ext.ifconfig', 'sphinx.ext.mathjax', 'sphinx.ext.intersphinx', 'sphinxcontrib.spelling' ] -# Point to your Django application, which contains all -# the other settings required. -#ucomment = {} -#ucomment['django_application_path'] = '/home/cpaasch/sinf1252/ucommentsite/ucommentapp' +project = 'Syllabus C' +copyright = '2019, Olivier Bonaventure, Gregory Detal, Christoph Paasch' +author = 'Olivier Bonaventure, Gregory Detal, Christoph Paasch' + +# The full version, including alpha/beta/rc tags +release = '2019' -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] -# The suffix of source filenames. +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. source_suffix = '.rst' # The encoding of source files. @@ -56,8 +47,8 @@ source_encoding = 'utf-8' master_doc = 'index' # General information about the project. -project = u'LEPL1503 : Introduction au langage C' -copyright = u'2013, 2019, O. Bonaventure, G. Detal, C. Paasch' +project = 'LEPL1503 : Introduction au langage C' +copyright = '2013, 2019, O. Bonaventure, G. Detal, C. Paasch' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -72,47 +63,31 @@ release = '2019' # for a list of supported languages. language = 'fr' -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -#today = '' -# Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = 'fr' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. exclude_patterns = ['_build/**', '.#*', '**/.#**', 'Exercices/QCM/**', "**.BASE.**", "**.REMOTE.**", "**.LOCAL.**", "**.BACKUP.**", "MemoireVirtuelle/**", "Assembleur/**", "Fichiers/fichiers-signaux.rst", "Threads/processus.rst" ] -# The reST default role (used for this markup: `text`) to use for all documents. -#default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -#add_module_names = True +#rst_prolog = """ +#.. include:: /links.rst +#.. include:: /man_links.rst +#.. include:: /incl_links.rst +#""" -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -#show_authors = False +# recommended to avoid problems with mobi conversion +smartquotes=False -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] - -rst_epilog = """ -.. include:: /links.rst -.. include:: /man_links.rst -.. include:: /incl_links.rst -""" - -# Intersphinx -intersphinx_mapping = {'theorie': ('https://sites.uclouvain.be/SystInfo/notes/Theorie/html/', None), 'outils': ('https://sites.uclouvain.be/SystInfo/notes/Outils/html/', None), 'exercices': ('https://sites.uclouvain.be/SystInfo/notes/Exercices/html/', None)} - - -# -- Options for HTML output --------------------------------------------------- +# -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. @@ -128,7 +103,7 @@ html_theme = 'haiku' # The name for this set of Sphinx documents. If None, it defaults to # "<project> v<release> documentation". -html_title = u'Langage C' +html_title = 'Langage C' # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None @@ -163,7 +138,7 @@ html_static_path = ['_static'] #html_additional_pages = {} # If false, no module index is generated. -#html_domain_indices = True +html_domain_indices = False # If false, no index is generated. #html_use_index = True @@ -172,7 +147,7 @@ html_static_path = ['_static'] #html_split_index = False # If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True +html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. #html_show_sphinx = True @@ -180,17 +155,11 @@ html_static_path = ['_static'] # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. #html_show_copyright = True -# If true, an OpenSearch description file will be output, and all pages will -# contain a <link> tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -#html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None -# Output file base name for HTML help builder. -htmlhelp_basename = 'SINF1252doc' +# -- Options for Spelling extension ------------------------------------------ +spelling_lang='fr' +spelling_word_list_filename='../dict.txt' # -- Options for LaTeX output -------------------------------------------------- @@ -202,7 +171,7 @@ latex_elements = { 'pointsize': '10pt', # Additional stuff for the LaTeX preamble. -#'preamble': '', +'preamble': '', 'preamble': ''' \\hypersetup{unicode=true} ''' @@ -212,8 +181,8 @@ latex_elements = { # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('index', 'LEPL1503.tex', u'LEPL1503 : Introduction au langage C', - u'O. Bonaventure, G. Detal, C. Paasch', 'manual'), + ('index', 'LEPL1503.tex', 'LEPL1503 : Introduction au langage C', + 'O. Bonaventure, G. Detal, C. Paasch', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -234,90 +203,5 @@ latex_documents = [ #latex_appendices = [] # If false, no module index is generated. -#latex_domain_indices = True - - -# -- Options for manual page output -------------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - ('index', 'sinf1252', u'SINF1252', - [u'O. Bonaventure, G. Detal, C. Paasch'], 1) -] - -# If true, show URL addresses after external links. -#man_show_urls = False - - -# -- Options for Texinfo output ------------------------------------------------ - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - ('index', 'SINF1252', u'SINF1252 : Systèmes informatiques', - u'O. Bonaventure, G. Detal, C. Paasch', 'SINF1252', 'One line description of project.', - 'Miscellaneous'), -] - -# Documents to append as an appendix to all manuals. -#texinfo_appendices = [] - -# If false, no module index is generated. -#texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -#texinfo_show_urls = 'footnote' - - -# -- Options for Epub output --------------------------------------------------- - -# Bibliographic Dublin Core info. -epub_title = u'LEPL1503 : Introduction au langage C' -epub_author = u'O. Bonaventure, G. Detal, C. Paasch' -epub_publisher = u'O. Bonaventure, G. Detal, C. Paasch' -epub_copyright = u'2013, 2019, O. Bonaventure, G. Detal, C. Paasch' - -# The language of the text. It defaults to the language option -# or en if the language is not set. -#epub_language = '' - -# The scheme of the identifier. Typical schemes are ISBN or URL. -#epub_scheme = '' - -# The unique identifier of the text. This can be a ISBN number -# or the project homepage. -#epub_identifier = '' - -# A unique identification for the text. -#epub_uid = '' - -# A tuple containing the cover image and cover page html template filenames. -#epub_cover = () - -# HTML files that should be inserted before the pages created by sphinx. -# The format is a list of tuples containing the path and title. -#epub_pre_files = [] - -# HTML files shat should be inserted after the pages created by sphinx. -# The format is a list of tuples containing the path and title. -#epub_post_files = [] - -# A list of files that should not be packed into the epub file. -#epub_exclude_files = [] - -# The depth of the table of contents in toc.ncx. -#epub_tocdepth = 3 - -# Allow duplicate toc entries. -#epub_tocdup = True - -#try: -# open('.staff','r') -# tags.add('staff') -# print "Build as staff member" -#except: -# print "Build as student" +latex_domain_indices = False -mathjax_path="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML" diff --git a/Theorie/index.rst b/Theorie/index.rst index 96b2f00c9d89ef5caa334c72e6f5b8f7237d4b1d..596b1402997478e33e4ad87e3f02750fd6bceb79 100644 --- a/Theorie/index.rst +++ b/Theorie/index.rst @@ -50,6 +50,8 @@ Systèmes Multiprocesseurs Threads/threads Threads/threads2 Threads/coordination + + .. Threads/processus diff --git a/travis.sh b/travis.sh index d43b6422c14e3fa589a95e1ad0dab569a9271b87..c95e624a877a7a57a5cbb58f8f544ac98e3cf94d 100755 --- a/travis.sh +++ b/travis.sh @@ -11,9 +11,10 @@ cd Theorie echo "**** Theorie ****" sphinx-build -nWNT --keep-going -b html . /tmp sphinx-build -b spelling . /tmp -#cd ../Outils -#echo "**** Outils ****" -#sphinx-build -nWNT --keep-going -b html . /tmp +cd ../Outils +echo "**** Outils ****" +sphinx-build -nWNT --keep-going -b html . /tmp +sphinx-build -b spelling . /tmp #cd ../Exercices #echo "**** Exercices ****" #sphinx-build -nWNT --keep-going -b html . /tmp