8000 Several bug fixes by Alessandro-Salerno · Pull Request #4 · Alessandro-Salerno/tarman · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Several bug fixes #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# tarman
# Copyright (C) 2024 Alessandro Salerno
# Copyright (C) 2024 - 2025 Alessandro Salerno
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion include/archive.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*************************************************************************
| tarman |
| Copyright (C) 2024 Alessandro Salerno |
| Copyright (C) 2024 - 2025 Alessandro Salerno |
| |
| This program is free software: you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |
Expand Down
2 changes: 1 addition & 1 deletion include/cli/directives/commands.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*************************************************************************
| tarman |
| Copyright (C) 2024 Alessandro Salerno |
| Copyright (C) 2024 - 2025 Alessandro Salerno |
| |
| This program is free software: you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |
Expand Down
6 changes: 3 additions & 3 deletions include/cli/directives/lookup.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*************************************************************************
| tarman |
| Copyright (C) 2024 Alessandro Salerno |
| Copyright (C) 2024 - 2025 Alessandro Salerno |
| |
| This program is free software: you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |
Expand All @@ -24,8 +24,8 @@
#include "cli/directives/types.h"

typedef struct {
cli_drt_desc_t *table;
size_t num_entries;
cli_drt_desc_t *table;
size_t num_entries;
} cli_lkup_table_t;

bool cli_lkup_command(const char *command, cli_drt_desc_t *dst);
Expand Down
2 changes: 1 addition & 1 deletion include/cli/directives/options.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*************************************************************************
| tarman |
| Copyright (C) 2024 Alessandro Salerno |
| Copyright (C) 2024 - 2025 Alessandro Salerno |
| |
| This program is free software: you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |
Expand Down
38 changes: 19 additions & 19 deletions include/cli/directives/types.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*************************************************************************
| tarman |
| Copyright (C) 2024 Alessandro Salerno |
| Copyright (C) 2024 - 2025 Alessandro Salerno |
| |
| This program is free software: you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |
Expand All @@ -21,28 +21,28 @@
#include <stdbool.h>

typedef struct {
const char *input;
bool from_url;
bool from_repo;
const char *pkg_fmt;
const char *pkg_name;
const char *app_name;
const char *exec_path;
const char *working_dir;
const char *icon_path;
bool add_path;
bool add_desktop;
bool add_tarman;
const char *input;
bool from_url;
bool from_repo;
const char *pkg_fmt;
const char *pkg_name;
const char *app_name;
const char *exec_path;
const char *working_dir;
const char *icon_path;
bool add_path;
bool add_desktop;
bool add_tarman;
} cli_info_t;

typedef bool (*cli_fcn_t)(cli_info_t *info, const char *next);
typedef int (*cli_exec_t)(cli_info_t info);

typedef struct {
const char *short_option;
const char *full_option;
cli_fcn_t handler;
bool has_argument;
cli_exec_t exec_handler;
const char *description;
const char *short_option;
const char *full_option;
cli_fcn_t handler;
bool has_argument;
cli_exec_t exec_handler;
const char *description;
} cli_drt_desc_t;
2 changes: 1 addition & 1 deletion include/cli/input.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*************************************************************************
| tarman |
| Copyright (C) 2024 Alessandro Salerno |
| Copyright (C) 2024 - 2025 Alessandro Salerno |
| |
| This program is free software: you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |
Expand Down
2 changes: 1 addition & 1 deletion include/cli/output.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*************************************************************************
| tarman |
| Copyright (C) 2024 Alessandro Salerno |
| Copyright (C) 2024 - 2025 Alessandro Salerno |
| |
| This program is free software: you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |
Expand Down
2 changes: 1 addition & 1 deletion include/cli/parser.h
E377
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*************************************************************************
| tarman |
| Copyright (C) 2024 Alessandro Salerno |
| Copyright (C) 2024 - 2025 Alessandro Salerno |
| |
| This program is free software: you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |
Expand Down
22 changes: 11 additions & 11 deletions include/config.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*************************************************************************
| tarman |
| Copyright (C) 2024 Alessandro Salerno |
| Copyright (C) 2024 - 2025 Alessandro Salerno |
| |
| This program is free software: you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |
Expand All @@ -24,19 +24,19 @@
#include <stdlib.h>

typedef enum {
TM_CFG_PARSE_STATUS_NOFILE,
TM_CFG_PARSE_STATUS_PERM,
TM_CFG_PARSE_STATUS_MALFORMED,
TM_CFG_PARSE_STATUS_INVKEY,
TM_CFG_PARSE_STATUS_INVVAL,
TM_CFG_PARSE_STATUS_ERR,
TM_CFG_PARSE_STATUS_OK
TM_CFG_PARSE_STATUS_NOFILE,
TM_CFG_PARSE_STATUS_PERM,
TM_CFG_PARSE_STATUS_MALFORMED,
TM_CFG_PARSE_STATUS_INVKEY,
TM_CFG_PARSE_STATUS_INVVAL,
TM_CFG_PARSE_STATUS_ERR,
TM_CFG_PARSE_STATUS_OK
} cfg_parse_status_t;

typedef enum {
TM_CFG_PROP_MATCH_FALSE,
TM_CFG_PROP_MATCH_OK,
TM_CFG_PROP_MATCH_ERR
TM_CFG_PROP_MATCH_FALSE,
TM_CFG_PROP_MATCH_OK,
TM_CFG_PROP_MATCH_ERR
} cfg_prop_match_t;

typedef void cfg_generic_info_t;
Expand Down
2 changes: 1 addition & 1 deletion include/download.h
2851
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*************************************************************************
| tarman |
| Copyright (C) 2024 Alessandro Salerno |
| Copyright (C) 2024 - 2025 Alessandro Salerno |
| |
| This program is free software: you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |
Expand Down
20 changes: 10 additions & 10 deletions include/os/console.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*************************************************************************
| tarman |
| Copyright (C) 2024 Alessandro Salerno |
| Copyright (C) 2024 - 2025 Alessandro Salerno |
| |
| This program is free software: you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |
Expand All @@ -22,18 +22,18 @@
#include <stdlib.h>

typedef struct {
size_t rows;
size_t columns;
size_t rows;
size_t columns;
} csz_t;

typedef enum {
TM_COLOR_RED,
TM_COLOR_GREEN,
TM_COLOR_YELLOW,
TM_COLOR_MAGENTA,
TM_COLOR_CYAN,
TM_COLOR_TEXT,
TM_COLOR_RESET
TM_COLOR_RED,
TM_COLOR_GREEN,
TM_COLOR_YELLOW,
TM_COLOR_MAGENTA,
TM_COLOR_CYAN,
TM_COLOR_TEXT,
TM_COLOR_RESET
} color_t;

csz_t os_console_get_sz(void);
Expand Down
2 changes: 1 addition & 1 deletion include/os/darwin/tm-os-defs.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*************************************************************************
| tarman |
| Copyright (C) 2024 Alessandro Salerno |
| Copyright (C) 2024 - 2025 Alessandro Salerno |
| |
| This program is free software: you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |
Expand Down
2 changes: 1 addition & 1 deletion include/os/env.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*************************************************************************
| tarman |
| Copyright (C) 2024 Alessandro Salerno |
| Copyright (C) 2024 - 2025 Alessandro Salerno |
| |
| This program is free software: you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |
Expand Down
2 changes: 1 addition & 1 deletion include/os/exec.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*************************************************************************
| tarman |
| Copyright (C) 2024 Alessandro Salerno |
| Copyright (C) 2024 - 2025 Alessandro Salerno |
| |
| This program is free software: you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |
Expand Down
34 changes: 17 additions & 17 deletions include/os/fs.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*************************************************************************
| tarman |
| Copyright (C) 2024 Alessandro Salerno |
| Copyright (C) 2024 - 2025 Alessandro Salerno |
| |
| This program is free software: you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |
Expand All @@ -23,33 +23,33 @@
#include <stdlib.h>

typedef enum {
TM_FS_DIROP_STATUS_NOEXIST = 0,
TM_FS_DIROP_STATUS_EXIST = 1,
TM_FS_DIROP_STATUS_PERM = 2,
TM_FS_DIROP_STATUS_END = 3,
TM_FS_DIROP_STATUS_ERR = 4,
TM_FS_DIROP_STATUS_OK = 5
TM_FS_DIROP_STATUS_NOEXIST = 0,
TM_FS_DIROP_STATUS_EXIST = 1,
TM_FS_DIROP_STATUS_PERM = 2,
TM_FS_DIROP_STATUS_END = 3,
TM_FS_DIROP_STATUS_ERR = 4,
TM_FS_DIROP_STATUS_OK = 5
} fs_dirop_status_t;

typedef enum {
TM_FS_FILEOP_STATUS_NOEXIST = 0,
TM_FS_FILEOP_STATUS_PERM = 1,
TM_FS_FILEOP_STATUS_ERR = 2,
TM_FS_FILEOP_STATUS_OK = 3
TM_FS_FILEOP_STATUS_NOEXIST = 0,
TM_FS_FILEOP_STATUS_PERM = 1,
TM_FS_FILEOP_STATUS_ERR = 2,
TM_FS_FILEOP_STATUS_OK = 3
} fs_fileop_status_t;

typedef enum {
TM_FS_FILETYPE_DIR,
TM_FS_FILETYPE_REGULAR,
TM_FS_FILETYPE_EXEC,
TM_FS_FILETYPE_UNKNOWN
TM_FS_FILETYPE_DIR,
TM_FS_FILETYPE_REGULAR,
TM_FS_FILETYPE_EXEC,
TM_FS_FILETYPE_UNKNOWN
} fs_filetype_t;

typedef void *os_fs_dirstream_t;

typedef struct {
fs_filetype_t file_type;
const char *name;
fs_filetype_t file_type;
const char *name;
} fs_dirent_t;

fs_dirop_status_t os_fs_mkdir(const char *path);
Expand Down
2 changes: 1 addition & 1 deletion include/os/linux/tm-os-defs.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*************************************************************************
| tarman |
| Copyright (C) 2024 Alessandro Salerno |
| Copyright (C) 2024 - 2025 Alessandro Salerno |
| |
| This program is free software: you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |
Expand Down
2 changes: 1 addition & 1 deletion include/os/no-optional/console.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*************************************************************************
| tarman |
| Copyright (C) 2024 Alessandro Salerno |
| Copyright (C) 2024 - 2025 Alessandro Salerno |
| |
| This program is free software: you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |
Expand Down
2 changes: 1 addition & 1 deletion include/os/posix/console.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*************************************************************************
| tarman |
| Copyright (C) 2024 Alessandro Salerno |
| Copyright (C) 2024 - 2025 Alessandro Salerno |
| |
| This program is free software: you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |
Expand Down
2 changes: 1 addition & 1 deletion include/os/posix/env.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*************************************************************************
| tarman |
| Copyright (C) 2024 Alessandro Salerno |
| Copyright (C) 2024 - 2025 Alessandro Salerno |
| |
| This program is free software: you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |
Expand Down
2 changes: 1 addition & 1 deletion include/os/posix/exec.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*************************************************************************
| tarman |
| Copyright (C) 2024 Alessandro Salerno |
| Copyright (C) 2024 - 2025 Alessandro Salerno |
| |
| This program is free software: you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |
Expand Down
2 changes: 1 addition & 1 deletion include/os/posix/fs.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*************************************************************************
| tarman |
| Copyright (C) 2024 Alessandro Salerno |
| Copyright (C) 2024 - 2025 Alessandro Salerno |
| |
| This program is free software: you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |
Expand Down
30 changes: 15 additions & 15 deletions include/package.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*************************************************************************
| tarman |
| Copyright (C) 2024 Alessandro Salerno |
| Copyright (C) 2024 - 2025 Alessandro Salerno |
| |
| This program is free software: you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |
Expand All @@ -25,28 +25,28 @@

// Structure for tarman package files (packaage.tarman)
typedef struct {
const char *url;
const char *from_repoistory;
const char *application_name;
const char *executable_path;
const char *working_directory;
const char *icon_path;
const char *url;
const char *from_repoistory;
const char *application_name;
const char *executable_path;
const char *working_directory;
const char *icon_path;
} pkg_info_t;

// Structure of tarman recipe fles (recipe.tarman or <packagename>.tarman)
typedef struct {
pkg_info_t pkg_info;
const char *package_format;
bool add_to_path;
bool add_to_desktop;
bool add_to_tarman;
pkg_info_t pkg_info;
const char *package_format;
bool add_to_path;
bool add_to_desktop;
bool add_to_tarman;
} recipe_t;

// "Runtime" recipe
typedef struct {
recipe_t recipe;
const char *pkg_name;
bool is_remote;
recipe_t recipe;
const char *pkg_name;
bool is_remote;
} rt_recipe_t;

cfg_parse_status_t pkg_parse_ftmpkg(pkg_info_t *pkg_info, FILE *pkg_file);
Expand Down
2 changes: 1 addition & 1 deletion include/plugin/plugin.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*************************************************************************
| tarman |
| Copyright (C) 2024 Alessandro Salerno |
| Copyright (C) 2024 - 2025 Alessandro Salerno |
| |
| This program is free software: you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |
Expand Down
Loading
0