From 3b1b0464be312bb6106bad50143985277b89b830 Mon Sep 17 00:00:00 2001 From: Liam Waldron Date: Sun, 15 Dec 2024 11:57:40 -0500 Subject: [PATCH] 12/15 --- css/nord.css | 16 ++++++++++----- docs/libglacier.html | 48 ++++++++++++++++++++++++++++++++------------ 2 files changed, 46 insertions(+), 18 deletions(-) diff --git a/css/nord.css b/css/nord.css index 047cee7..ed8f24f 100644 --- a/css/nord.css +++ b/css/nord.css @@ -100,7 +100,7 @@ html { border-radius: 2px; padding: 4px; width: 50%; - color: #2E3440; + color: #D8DEE9; } .news { @@ -181,7 +181,7 @@ warnhead { border-radius: 2px; padding: 6px; width: 50%; - color: #2E3440; + color: #D8DEE9; } newshead { @@ -395,7 +395,13 @@ body, html { hr { color: #88c0d0; - height: 20px; - width: 0px; - border-width: 0px; + width: 50%; + border-width: 4px; + border-radius: 5px; + margin-left: 0; +} + +.tab { + display: inline-block; + margin-left: 80px; } diff --git a/docs/libglacier.html b/docs/libglacier.html index dbd4dcc..2b72d8a 100644 --- a/docs/libglacier.html +++ b/docs/libglacier.html @@ -59,15 +59,16 @@

#include <glacier_log.h>

#include <glacier_pkgops.h>

#include <glacier_runtime.h>

+

#include <glacier_security.h>

-

To compile libglacier into your program, add the following compile flag:

-

-lconfig

+

To compile libglacier into your program, add the flag -lglacier to your build process.

+

$ gcc program.c -lglacier -o program

4 - Configuration Functions

libglacier supplies functions for parsing and getting values from libconfig-syntax configuration files. While only three are present, more are planned for the future.

4.1 init_config

-

init_config initializes the libconfig library, and allows configuration files to be parsed.

+

init_config initializes the libconfig library, and allows configuration files to be parsed.

No parameters are accepted by init_config.

CODE: init_config used in a program
@@ -76,11 +77,17 @@

int

main()

{

-

        init_config();

+

        if (init_config() != 0) {

+

                errlog("failed to initialize libconfig"); +

                return(EXIT_FAILURE);

+

        }

+

        else {

+

                successlog("Initialized libconfig"); +

        }

}

init_config returns 0 on success, and 1 on failure.

-

+

4.2 die_config

die_config unloads the libconfig library. You should always run this when you're finished with libconfig in order to free memory.

No parameters are accepted by die_config.

@@ -140,9 +147,9 @@

int

main()

{

-

        struct node pack = create_node("pack"); -

        struct node dep1 = create_node("dep1"); -

        add_child(pack, dep1);

+

struct node pack = create_node("pack"); +

struct node dep1 = create_node("dep1"); +

add_child(pack, dep1);

}

5.3 print_tree

@@ -159,12 +166,27 @@

int

main()

{

-

        struct node pack = create_node("pack");

-

        struct node dep1 = create_node("dep1");

-

        add_child(pack, dep1);

-

        print_tree(pack, 0);

+

struct node pack = create_node("pack");

+

struct node dep1 = create_node("dep1");

+

add_child(pack, dep1);

+

print_tree(pack, 0);

}

+

5.4 init_queue

+

init_queue initializes a queue data structure.

+

init_queue accepts the following parameters:

+ + CODE: init_queue used in a program +
+

#include <glacier_data.h>

+

 

+

int

+

main()

+

{

+

hi

+

6 - Logging Functions

The logging functions libglacier provides are designed to allow a uniform style of output.

@@ -256,7 +278,7 @@
  • 0 on success

  • 1 on failure

  • - CODE: run_make_task used in a program + CODE: run_make_task used in a program

    #include <glacier_pkgops.h>