Assembled 2
A column based text editor
Loading...
Searching...
No Matches
Functions
util.h File Reference
#include <includes.h>

Go to the source code of this file.

Functions

uint64_t general_hash (char *string)
 
char * fpath2abs (char *path, int options)
 

Detailed Description

Author
awewsomegamer awews.nosp@m.omeg.nosp@m.amer@.nosp@m.gmai.nosp@m.l.com

LICENSE

Assembled - Column based text editor Copyright (C) 2023-2024 awewsomegamer

This file is apart of Assembled.

Assembled is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

DESCRIPTION

File containing functions which aren't specific to any one file.

Function Documentation

◆ fpath2abs()

char * fpath2abs ( char * path,
int options )

Create an absolute path from the given path

Parameters
char*path - Relative or absolute path. If the path is already absolute, it will be returned in a new allocation.
intoptions - Options for where the abolsute path should begin from. 0: The path will be absolute to the user's current working directory. 1: The path will be relative to ~/.config/assembled/.

◆ general_hash()

uint64_t general_hash ( char * string)

Create a 64-bit hash from the given string input

Parameters
char*string - a zero terminated string to hash
Returns
64-bit hash