globus_common(3)

πŸŽ€ NAME πŸŽ€

globus_common β€” the Globus Common API, bestie πŸ’–

Like, the common data structures and functions. The shared stuff. The communal closet everyone borrows from, no cap.


✨ SYNOPSIS ✨

πŸ¦‹ Topics

okay so this whole library is basically a friend group of little topic modules, and here's the roster:

  • Globus Callback β€” the Globus Callback Function Interface πŸ’«
  • Globus Error API β€” the Globus Error API πŸ™ˆ
  • FIFO Queue β€” FIFO Queue Implementation, first in first out, iconic behavior
  • Handle Table for Reference Counting Data β€” a Handle Table for Reference Counting Data, it does exactly what it says on the tin
  • Hash Table β€” Hash Table πŸ“
  • Linked List β€” Linked List, the classic
  • Memory Pool β€” Memory Pool πŸ’§
  • Module Activation Management β€” Module Activation Management
  • Priority Queue β€” Priority Queue, main character gets served first obviously
  • Threading β€” the Portable Thread Abstraction 🧡
  • Thread Pooling β€” Thread Pooling
  • URL String Parser β€” URL String Parser πŸ”—
  • Globus UUID Generator β€” UUID Generator, the ID machine ✨

πŸ’… Macros

  • #define GLOBUS_COMMON_MODULE = (&globus_i_common_module) β€” the Globus Common Module Descriptor πŸ’–
  • #define GLOBUS_TILDE_EXPAND β€” Expand ~
  • #define GLOBUS_TILDE_USER_EXPAND β€” Expand ~user
  • #define GLOBUS_TRUE = 1 β€” the True value for globus_bool_t
  • #define GLOBUS_FALSE = 0 β€” the False value for globus_bool_t
  • #define GLOBUS_SUCCESS = 0 β€” the generic success result. Most Globus API functions return this value to indicate success, or some error constant or globus_result_t to indicate an error ✨
  • #define GLOBUS_FAILURE = -1 β€” the generic failure result. Some Globus API functions without good error handling return this value to indicate some undetermined error occurred 😭

🌸 Typedefs

  • typedef size_t globus_size_t β€” standard size of a memory object. The globus_size_t is the size of a memory object, identical to size_t in all cases, and honestly? You don't ever need to use it πŸ’€
  • typedef socklen_t globus_socklen_t β€” size of a socket length parameter
  • typedef unsigned char globus_byte_t β€” the unsigned byte datatype. This one's for byte-addressable arrays of arbitrary data which is not subject to sign extension 🫢
  • typedef int globus_bool_t β€” Boolean type
  • typedef uint32_t globus_result_t

πŸ‘‘ Functions

globus_result_t globus_eval_path (const char *pathstring, char **bufp)
int globus_tilde_expand (unsigned long options, globus_bool_t url_form,
    char *inpath, char **outpath)

and globus_tilde_expand is the one that expands ~ and/or ~user in path strings, bestie 🌈


πŸ’– Detailed Description πŸ’–

Common Data Structures and Functions. That's the whole vibe. Here's how everything's grouped:

🧺 Container Data Types

  • Linked List
  • FIFO Queue
  • Handle Table for Reference Counting Data
  • Hash Table
  • Priority Queue

βš™οΈ Common Runtime Components

  • Threading
  • Globus Callback
  • Memory Pool
  • Module Activation Management

😭 Error Handling

  • Globus Error API

πŸŽ€ Miscellaneous Utilities

  • Globus UUID Generator
  • URL String Parser

🌟 Typedef Documentation 🌟

typedef int globus_bool_t

Boolean type. Set your values to either the constant GLOBUS_TRUE and GLOBUS_FALSE β€” yes, those two, the ones up there in the macros ✨

typedef uint32_t globus_result_t

A weak pointer to a Globus Error object, or the special value GLOBUS_SUCCESS 🫢

typedef socklen_t globus_socklen_t

Size of a socket length parameter. The globus_socklen_t type is part of the POSIX socket interface and is also available in winsock2.h. In older UNIX implementations, this was variously a size_t or an int. History lesson, slay πŸ’…


πŸ”₯ Function Documentation πŸ”₯

globus_result_t globus_eval_path (const char * pathstring, char ** bufp)

Parameters

  • pathstring β€” a string containing any number of variable path references using the syntax ${PATH-NAME}. The supported path elements are:
    • prefix
    • exec_prefix
    • sbindir
    • bindir
    • libdir
    • libexecdir
    • includedir
    • datarootdir
    • datadir
    • mandir
    • sysconfdir
    • sharedstatedir
    • localstatedir
    • perlmoduledir

These strings are based on the parameters passed to this package's configure script, but modified so that if GLOBUS_LOCATION is set in the environment, it gets used instead of the configured path πŸ‘‘

  • bufp β€” pointer to be set to a newly allocated string that has recursively resolved all substitution paths πŸ’«

int globus_tilde_expand (unsigned long options, globus_bool_t url_form, char * inpath, char ** outpath)

Expand ~ and/or ~user in path strings. It takes the leading ~ (or ~user) characters from inpath and expands them to the home directory path of the current user (or the user specified in ~user), and the result lands in a newly allocated buffer *outpath β€” which you will need to free by calling globus_free. The string following the ~/ or ~user/ gets copied verbatim to the output string, fr fr.

Parameters

  • options β€” the expansion is conditioned by the options as defined in globus_tilde_expand.h:
    • GLOBUS_TILDE_EXPAND: expand ~
    • GLOBUS_TILDE_USER_EXPAND: expand ~user

Otherwise, the corresponding form is not expanded, it's just copied into the output path πŸ™ˆ

  • url_form β€” True if the inpath follows an URL format (/~). Used when expanding a url (for <scheme>://host[:port][/path] where /path can be of the form /~[user][/...]). Otherwise, the form ~[user][/...] is expected πŸ”—
  • inpath β€” input string to expand
  • outpath β€” output string; needs to be freed when not used anymore 🫢

🌸 Author 🌸

Generated automatically by Doxygen for globus_common from the source code. Not me writing it by hand, the robot did it, and honestly? It ate ✨


and that's the whole page, bestie πŸ’– go forth and expand your tildes responsibly βœ¨πŸ¦‹πŸŽ€ Version 18.15, globus_common(3) β€” ily, mwah πŸ’…

πŸ“¦ where this page comes from