C Project Template
Loading...
Searching...
No Matches
Classes | Macros | Functions
utils.h File Reference

General Utilities for C language. More...

#include <stdlib.h>
#include <assert.h>
Include dependency graph for utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  dymArr
 
struct  que
 

Macros

#define EMTY_QUE_SIG   -121242
 
#define N_ASCII_ELEMENT   128
 
#define MAX_STR_LEN   150000
 

Functions

int str2ascii (char)
 
int argmax (int a, int b)
 Argmax function with intergers.
 
dymArr init_Arr (int size)
 
void kill_dymArr (dymArr *)
 
void clear_Arr (dymArr *)
 
void append_dymArr (dymArr *, int val)
 
int get_item (dymArr, int i)
 
int pop_item (dymArr *)
 
que init_que (int size)
 
void kill_que (que *)
 
void enque (que *, int val)
 
int deque (que *)
 
int deque_rear (que *)
 
int peek_que (que *)
 
int peek_que_rear (que *q)
 

Detailed Description

General Utilities for C language.

Author
Shao-Ting Chiu (r0794.nosp@m.5001.nosp@m.@ntu..nosp@m.edu..nosp@m.tw)
Version
0.1
Date
2021-03-08

Function Documentation

◆ argmax()

int argmax ( int a,
int b )

Argmax function with intergers.

Parameters
a
b
Returns
int 0 when a is larger than b. Otherwise, 0.