WIP: Docstrings unsing Doxygen; parsing functions names (a Python3 script)
This commit is contained in:
parent
f685651197
commit
300524adbf
67
read_me.doc
67
read_me.doc
|
@ -33,31 +33,54 @@
|
||||||
* ----------
|
* ----------
|
||||||
*
|
*
|
||||||
* 1) localisées dans les headers; une avant chaque fonction;
|
* 1) localisées dans les headers; une avant chaque fonction;
|
||||||
|
* 2) structure: (ref: Doxygen)
|
||||||
*
|
*
|
||||||
* 2) structure:
|
* @fn (une phrase) décrit ce que fait la fonction
|
||||||
|
* @brief (texte libre) détaille comment, pourquoi, le type d'algorithme,
|
||||||
|
* historique, discussion avantages/inconvénients,...
|
||||||
|
* @warning (si besoin de préciser)
|
||||||
|
* @todo
|
||||||
|
* @fixme (on espère que pas, mais...)
|
||||||
|
* @file
|
||||||
|
* @callgraph
|
||||||
|
* @see (liste des fonctions qui dépendent de cette fonction)
|
||||||
|
* @callergraph
|
||||||
|
* @see (liste des fonctions dont cette fonction dépend)
|
||||||
|
* @param
|
||||||
|
* @return
|
||||||
|
* @author (1,2,...)
|
||||||
|
* @since (date)
|
||||||
|
* @struct pour documenter une structure C.
|
||||||
|
* @union pour documenter une union C.
|
||||||
|
* @enum pour documenter un type énuméré.
|
||||||
|
* @var pour documenter une variable / un typedef / un énuméré.
|
||||||
|
* @def pour documenter un #define.
|
||||||
|
* @typedef pour documenter la définition d'un type.
|
||||||
*
|
*
|
||||||
* texte libre: décrit ce que fait la fonction,
|
* 3) prioritaires:
|
||||||
* où elle est définie (dans quel fichier),
|
* @file
|
||||||
* et par quelles fonctions elle est appelée.
|
* @callgraph
|
||||||
* @param les paramètres pris en entrée
|
* @see (liste des fonctions qui dépendent de cette fonction)
|
||||||
* @return la valeur retournée en sortie
|
* @callergraph
|
||||||
* @use la liste de fonctions GTK appelées par cette fonction, dont:
|
* @see (liste des fonctions dont cette fonction dépend)
|
||||||
* @use_mem? celles qui doivent être 'free' après usage
|
* @param
|
||||||
|
* @return
|
||||||
*
|
*
|
||||||
* TODO : actuellement, valgrind bin/gem-graph-client détecte :
|
|
||||||
*
|
*
|
||||||
* HEAP SUMMARY:
|
* 4) TODO : actuellement, valgrind bin/gem-graph-client détecte :
|
||||||
* in use at exit: 11,537,505 bytes in 42,285 blocks
|
*
|
||||||
* total heap usage: 483,548 allocs,
|
* HEAP SUMMARY:
|
||||||
* 441,263 frees,
|
* in use at exit: 11,537,505 bytes in 42,285 blocks
|
||||||
* 112,049,363 bytes allocated
|
* total heap usage: 483,548 allocs,
|
||||||
* LEAK SUMMARY:
|
* 441,263 frees,
|
||||||
* definitely lost: 40,161 bytes in 79 blocks
|
* 112,049,363 bytes allocated
|
||||||
* indirectly lost: 11,233 bytes in 489 blocks
|
* LEAK SUMMARY:
|
||||||
* possibly lost: 7,879,639 bytes in 7,844 blocks
|
* definitely lost: 40,161 bytes in 79 blocks
|
||||||
* still reachable: 3,412,408 bytes in 32,248 blocks
|
* indirectly lost: 11,233 bytes in 489 blocks
|
||||||
* suppressed: 0 bytes in 0 blocks
|
* possibly lost: 7,879,639 bytes in 7,844 blocks
|
||||||
* Rerun with --leak-check=full to see details of leaked memory
|
* still reachable: 3,412,408 bytes in 32,248 blocks
|
||||||
|
* suppressed: 0 bytes in 0 blocks
|
||||||
|
* Rerun with --leak-check=full to see details of leaked memory
|
||||||
*
|
*
|
||||||
* valgrind --leak-check=full > ERROR SUMMARY: 1572 errors from 680 contexts
|
* valgrind --leak-check=full > ERROR SUMMARY: 1572 errors from 680 contexts
|
||||||
* --track-origins=yes ERROR SUMMARY: 896 errors from 4 contexts
|
* --track-origins=yes ERROR SUMMARY: 896 errors from 4 contexts
|
||||||
|
@ -66,7 +89,7 @@
|
||||||
* sanitize <<
|
* sanitize <<
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* 3) TODO des scripts devraient pouvoir recueillir ces informations
|
* 5) TODO des scripts devraient pouvoir recueillir ces informations
|
||||||
* pour produire automatiquement, à la demande, des listes comme celle qui suit.
|
* pour produire automatiquement, à la demande, des listes comme celle qui suit.
|
||||||
* (voir le dossier 'scripts')
|
* (voir le dossier 'scripts')
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,7 +1,2 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# uses scripts/doctext
|
|
||||||
|
|
||||||
#https://python.developpez.com/tutoriels/python-basic-par-exemple/?page=gestion-des-fichiers
|
|
||||||
#https://note.nkmk.me/en/python-docstring/
|
|
||||||
|
|
||||||
print("Hello World, I'm back ! 😄")
|
print("Hello World, I'm back ! 😄")
|
||||||
|
|
39
scripts/junk
39
scripts/junk
|
@ -1 +1,38 @@
|
||||||
* C O N V E N T I O N S E T R È G L E S D E N O M M A G E - 2 0 2 4
|
widget_set_item_text
|
||||||
|
*widget_get_address_text_alpha_index
|
||||||
|
*widget_get_address_text_practice
|
||||||
|
*widget_get_address_text_theory
|
||||||
|
char
|
||||||
|
char
|
||||||
|
char
|
||||||
|
char
|
||||||
|
|
||||||
|
TreeNode_t
|
||||||
|
TreeNode_t
|
||||||
|
*widget_get_an_impression_of_what_a_rules_comparator_could_be();
|
||||||
|
|
||||||
|
*widget_get_dialog_window();
|
||||||
|
|
||||||
|
*widget_get_graph_view_control();
|
||||||
|
*widget_get_main_window();
|
||||||
|
|
||||||
|
*widget_get_non_time_dependent();
|
||||||
|
|
||||||
|
*widget_get_page_data();
|
||||||
|
*widget_get_page_engine();
|
||||||
|
*widget_get_page_measure();//
|
||||||
|
*widget_get_page_state();
|
||||||
|
*widget_get_page_synth();
|
||||||
|
*widget_get_pane_all_rules_left();
|
||||||
|
|
||||||
|
*widget_get_pane_selected_rule_right();
|
||||||
|
|
||||||
|
*widget_get_results_box_display();
|
||||||
|
|
||||||
|
*widget_get_results_box_organize();
|
||||||
|
|
||||||
|
*widget_get_results_box_time
|
||||||
|
*widget_get_rule_edition_tools();
|
||||||
|
*widget_get_rule_investigation_tools();
|
||||||
|
*widget_get_rules_pilot_box();
|
||||||
|
*widget_get_rules_tree_tools();
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
rr = open('read_me.doc', 'r', encoding='UTF-8')
|
|
||||||
ww = open('scripts/junk', "w")
|
|
||||||
|
|
||||||
for line in rr:
|
|
||||||
if (line == " * C O N V E N T I O N S E T R È G L E S D E N O M M A G E - 2 0 2 4\n"):
|
|
||||||
print(line)
|
|
||||||
ww.write(line)
|
|
||||||
|
|
||||||
rr.close()
|
|
||||||
ww.close()
|
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
filename = 'read_me.doc'
|
|
||||||
f = open(filename, 'r', encoding='UTF-8')
|
|
||||||
|
|
||||||
print("Contenu de " + filename)
|
|
||||||
print('-' * 30)
|
|
||||||
for line in f:
|
|
||||||
print(line, end='')
|
|
||||||
|
|
||||||
f.close()
|
|
||||||
|
|
||||||
# 'with' est une solution plus simple, qui gère automatiquement la fermeture du fichier.
|
|
||||||
filename = 'read_me.doc'
|
|
||||||
|
|
||||||
print("\n\nContenu de " + filename)
|
|
||||||
print('-' * 30)
|
|
||||||
with open(filename, 'r', encoding='UTF-8') as f:
|
|
||||||
for line in f:
|
|
||||||
print(line, end='')
|
|
|
@ -1,11 +0,0 @@
|
||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
filename = 'read_me.doc'
|
|
||||||
f = open(filename, 'r', encoding='UTF-8')
|
|
||||||
|
|
||||||
# print("Contenu de " + filename) print('-' * 30)
|
|
||||||
for line in f:
|
|
||||||
print(line, end='')
|
|
||||||
|
|
||||||
f.close()
|
|
||||||
|
|
|
@ -1,11 +1,32 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
filename = 'read_me.doc'
|
#rr = open('read_me.doc', 'r', encoding='UTF-8')
|
||||||
f = open(filename, 'r', encoding='UTF-8')
|
rr = open('include/widget.h', 'r', encoding='UTF-8')
|
||||||
|
ww = open('scripts/junk', "w")
|
||||||
|
|
||||||
# print("Contenu de " + filename) print('-' * 30)
|
l = [None] * 75
|
||||||
for line in f:
|
n = 0
|
||||||
print(line, end='')
|
|
||||||
|
|
||||||
f.close()
|
for line in rr:
|
||||||
|
if (line [0:4] == 'void'
|
||||||
|
or line [0:3] == 'int'
|
||||||
|
or line [0:4] == 'char'
|
||||||
|
or line [0:10] == 'const char'
|
||||||
|
or line [0:8] == 'GtkEntry'
|
||||||
|
or line [0:17] == 'struct TreeNode_t'):
|
||||||
|
#print(n, ' ', line [:len(line)-1])
|
||||||
|
#ww.write(line [:len(line)])
|
||||||
|
l[n] = line
|
||||||
|
n += 1
|
||||||
|
|
||||||
|
l.sort()
|
||||||
|
n = 0
|
||||||
|
for line in l:
|
||||||
|
print(n, ' ', line [:len(line)-1])
|
||||||
|
if n in range(30):
|
||||||
|
ww.write(line.split(' ')[1] + '\n')
|
||||||
|
n += 1
|
||||||
|
|
||||||
|
rr.close()
|
||||||
|
ww.close()
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
* gcc `pkg-config --cflags --libs gtk4 epoxy glib-2.0` -lm -o instanced_cubes instanced_cubes.c
|
* gcc `pkg-config --cflags --libs gtk4 epoxy glib-2.0` -lm -o instanced_cubes instanced_cubes.c
|
||||||
* ./instanced_cubes
|
* ./instanced_cubes
|
||||||
*
|
*
|
||||||
*
|
* https://docs.gtk.org/gdk4/class.Cursor.html TODO
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
|
|
@ -90,6 +90,12 @@ static void *get_ZOOM_box()
|
||||||
void *widget_get_space_view(int partition_space_vs_camera)
|
void *widget_get_space_view(int partition_space_vs_camera)
|
||||||
{
|
{
|
||||||
GtkBox *drawbox = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0));
|
GtkBox *drawbox = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0));
|
||||||
|
GdkSurface *drawsurface = gdk_surface_new_toplevel (gdk_display_get_default());
|
||||||
|
gdk_display_beep (gdk_display_get_default());
|
||||||
|
GdkCursor *drawbox_cursor = gdk_cursor_new_from_name ("cell",
|
||||||
|
gdk_cursor_new_from_name ("default", NULL));
|
||||||
|
gdk_surface_set_cursor (drawsurface, drawbox_cursor);
|
||||||
|
|
||||||
// util_gl_setup_glarea (0, GTK_WIDGET (drawbox));
|
// util_gl_setup_glarea (0, GTK_WIDGET (drawbox));
|
||||||
|
|
||||||
GtkBox *camera = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
GtkBox *camera = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 2));
|
||||||
|
|
Loading…
Reference in New Issue