repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
chlds/util | lib/car/obj/src/cals_sort_events.c | <gh_stars>0
/* **** Notes
Sort
//*/
# define CALEND
# define CAR
# include "../../../incl/config.h"
signed(__cdecl cals_sort_events(cals_roll_t(*argp))) {
auto cals_event_t *ev;
auto signed i,r;
if(!argp) return(0x00);
if(!(CALS_INIT&(R(flag,*argp)))) return(0x00);
r = cals_count_events(argp);
if(!r) return(0x0... |
chlds/util | lib/car/obj/src/cals_display_upcoming_events_r.c | <gh_stars>0
/* **** Notes
Display upcoming events or..
//*/
# define CALEND
# define CAR
# include "../../../incl/config.h"
signed(__cdecl cals_display_upcoming_events_r(time_t(criterion),cals_event_t(*cache),cals_roll_t(*argp))) {
auto cals_event_t *ev;
auto signed char *b;
auto time_t t;
auto signed i,r;
if(!ca... |
chlds/util | lib/car/obj/src/cals_store.c | <reponame>chlds/util<gh_stars>0
/* **** Notes
Store an event at file event.csv in directory ~/.cals/.
Remarks:
Currently under construction
//*/
# define CALEND
# define CAR
# include <stdio.h>
# include "../../../incl/config.h"
signed(__cdecl cals_store(cals_event_t(*argp))) {
auto signed char *b;
auto time_t t;... |
chlds/util | lib/cbr/obj/src/cli_save_beta.c | /*
Save.
Along with C and Windows libraries
Remarks:
Refer at util/lib/obj/src/cli_io_beta.c
*/
# define CBR
# define CLI_W32
# include <conio.h>
# include <stdio.h>
# include <stdlib.h>
# include "../../../incl/config.h"
signed(__cdecl cli_save_beta(CLI_W32_STAT(*argp))) {
/* **** DATA, BSS and STACK */
static... |
chlds/util | lib/cbr/obj/src/cli_eq.c | /*
Along with C library
Remarks:
Refer at util/lib/obj/src/cli_parse.c
*/
# define CBR
# include <conio.h>
# include <stdio.h>
# include <stdlib.h>
# include "../../../incl/config.h"
signed(__cdecl cli_eq(signed(fd),CLI_TYPEWRITER(*argp))) {
/* **** DATA, BSS and STACK */
auto signed i,r;
auto signed short flag;... |
chlds/util | lib/car/obj/src/ct_tx.c | /* **** Notes
Count letters to a specific point or to the terminating null character.
Remarks:
Along with alignement of the tab.
*/
# define CAR
# include "../../../incl/config.h"
signed(__cdecl ct_tx(signed(to),signed(arg/* align */),signed char(*argp))) {
/* **** DATA, BSS and STACK */
auto signed char *b;
auto... |
chlds/util | lib/cbr/obj/src/cli_copy_to_pages.c | /*
Copy to pages.
Along with C library
Remarks:
Refer at fn. cli_paste_beta.
*/
# define CBR
# include <conio.h>
# include <stdio.h>
# include <stdlib.h>
# include "../../../incl/config.h"
signed(__cdecl cli_copy_to_pages(signed short(lastbreak),cli_spool_t(*argp),signed char(*base))) {
/* **** DATA, BSS and ST... |
chlds/util | lib/car/obj/src/concatenate_w.c | /* **** Notes
Concatenate.
Remarks:
Release the *di later e.g., rl(di).
Refer at fn. rl.
//*/
# define CAR
# include "../../../incl/config.h"
signed(__cdecl concatenate_w(signed(arg),signed short(**di),signed short(*si))) {
auto signed short *w;
auto signed r;
auto signed short flag;
if(arg<(0x00)) return(0x00);... |
chlds/util | lib/car/obj/src/encode_surrogate_w.c | <reponame>chlds/util<filename>lib/car/obj/src/encode_surrogate_w.c
/*
Encode a character into bytes based on UTF-8.
Remarks:
Return the number of encoded bytes.
*/
# define CAR
# include "../../../incl/config.h"
signed(__cdecl encode_surrogate_w(signed char(**di),signed short(second),signed short(first))) {
auto ... |
chlds/util | lib/car/obj/src/cv_wk_mo.c | /* **** Notes
Convert into seconds of a first day of the first week.
Remarks:
Refer at <corecrt_wtime.h>
*/
# define CALEND
# define CAR
# include "../../../incl/config.h"
signed(__cdecl cv_wk_mo(signed short(wk),time_t(*di),time_t(si))) {
auto struct tm *tp;
auto time_t t;
auto signed i,r;
auto signed short curr... |
chlds/util | lib/cbr/obj/src/cli_vers_beta.c | <filename>lib/cbr/obj/src/cli_vers_beta.c
/*
Display the version.
Along with C and Windows libraries
Remarks:
Refer at util/lib/obj/src/cli_io_beta.c
*/
# define CBR
# define CLI_W32
# include <conio.h>
# include <stdio.h>
# include <stdlib.h>
# include "../../../incl/config.h"
signed(__cdecl cli_vers_beta(CLI_W... |
chlds/util | bin/obj/src/extra/u.c | /* To output in UTF-8
Save files in UTF-8, define _UNICODE, include <tchar.h>, auto TCHAR *p = (L"...."), fn. _putwch/_puttch and more..
> cl -c -source-charset:utf-8 t.c
> cl -c -source-charset:utf-8 output_in_utf_8.c
> link t.obj output_in_utf_8.obj
> t(.exe)
*/
# define _UNICODE
# include <stdio.h>
# include <s... |
chlds/util | lib/car/obj/src/ct_f.c | /* **** Notes
Count function pointers.
*/
# define CAR
# include "./../../../incl/config.h"
signed(__cdecl ct_f(signed(__cdecl**f)(void(*argp)))) {
if(!f) return(0x00);
if(!(*f)) return(0x00);
f++;
return(0x01+(ct_f(f)));
}
|
chlds/util | lib/car/obj/src/cals_convert.c | /* **** Notes
Convert argument b "Year,Month Day,Time(,Year,Month Day,Time),Flag,Subject" in CSV into the cals_event_t format.
Remarks:
Currently under construction
//*/
# define CALEND
# define CAR
# include <stdio.h>
# include "../../../incl/config.h"
signed(__cdecl cals_convert(signed char(*b),cals_event_t(*arg... |
chlds/util | lib/car/obj/src/cv_subject.c | /* **** Notes
Map a subject on the RAM.
Remarks:
Release the memory block.
Refer at fn. cals_entry and fn. cals_parse.
//*/
# define CALEND
# define CAR
# include "../../../incl/config.h"
signed(__cdecl cv_subject(signed char(*b),cals_event_t(*argp))) {
auto signed char *p;
auto signed i,r;
auto signed short mo;
... |
chlds/util | lib/car/obj/src/cv_bv.c | /* **** Notes
Convert into an array.
Remarks:
After calling fn. cv_bv, please call fn. rl to unmap the buffer allocated on the RAM.
Based on UTF-8
*/
# define CAR
# include "./../../../incl/config.h"
signed(__cdecl cv_bv(signed char(*cache),signed char(**di),signed char(**si))) {
auto signed r;
if(!di) return(0x... |
chlds/util | lib/car/obj/src/write_pages.c | <gh_stars>0
/* **** Notes
Write.
//*/
# define CAR
# include <io.h>
# include <stdio.h>
# include <stdlib.h>
# include <time.h>
# include <fcntl.h>
# include <sys/types.h>
# include <sys/stat.h>
# include <errno.h>
# include "../../../incl/config.h"
signed(__cdecl write_pages(signed char(*di),page_t(*si))) {
auto ... |
chlds/util | lib/car/obj/src/cli_fn_clip.c | /*
Copy to the clipboard.
Remarks:
Refer at util/lib/obj/src/cli_init_roll.c and util/bin/obj/src/ty.c
*/
# define CAR
# include <stdio.h>
# include "../../../incl/config.h"
signed(__cdecl cli_fn_clip(cli_property_t(*argp))) {
/* **** DATA, BSS and STACK */
auto cli_clipboard_t *clipboard;
auto cli_text_t *text;
... |
chlds/util | lib/car/obj/src/bsort.c | /* **** Notes
A bubble sort
implemented with fn. nsort().
arg: Put the numbre of elements of an array for values at.
argp: Put the leading address of an array for values at.
*/
# define CAR
# include "../../../incl/config.h"
signed(__cdecl bsort(signed(arg),signed(*argp))) {
auto signed r;
if(arg<(0x01)) return... |
chlds/util | lib/car/obj/src/cli_log.c | <reponame>chlds/util
/* **** Notes
Store bytes.
Remarks:
Code of line break: CRLF, LF or (0x00).
Append.
//*/
# define CAR
# define CALEND
# include <stdio.h>
# include "../../../incl/config.h"
signed(__cdecl cli_log(signed char(*di/* path */),signed char(*si/* contents */))) {
auto signed char **v;
auto time_t t... |
chlds/util | lib/car/obj/src/ncharbyte.c | <filename>lib/car/obj/src/ncharbyte.c
/*
Return the number of Unicode bytes for a character based on UTF-8
*/
# define CAR
# include <stdio.h>
# include "../../../incl/config.h"
signed(__cdecl ncharbyte(signed arg)) {
auto signed r;
auto signed const A_4B = (0x001FFFFF); // a 21-bit (.oooo.oooo .oooi.iiii .iiii.ii... |
chlds/util | lib/car/obj/src/cals_r.c | <filename>lib/car/obj/src/cals_r.c
/* **** Notes
Go for months
//*/
# define CALEND
# define CAR
# include "../../../incl/config.h"
signed(__cdecl cals_r(signed(arg),cals_t(*argp))) {
auto time_t t;
auto signed i,r;
auto signed short mo;
auto signed short flag;
if(!argp) return(0x00);
if(!arg) return(0x00);
if(a... |
chlds/util | bin/obj/src/si.c | <gh_stars>0
/* **** Notes
Refer at <corecrt_wtime.h>
*/
# define C_CODE_STDS
# define CALEND
# define CAR
# include "./../../../lib/incl/config.h"
signed(__cdecl main(signed(argc),signed char(**argv),signed char(**envp))) {
auto signed char *b;
auto signed i,l,r;
auto struct _stat stats;
auto time_t t[CLI_RULE];
a... |
chlds/util | lib/cbr/obj/src/cli_book.c | /* **** Notes
Copy characters on workspace to the current page.
Remarks:
Refer at fn. cli_bind_pages.
Build a doubly linked list
Along with C library
*/
# define CBR
# define CLI_W32
# include <conio.h>
# include <stdio.h>
# include <stdlib.h>
# include "../../../incl/config.h"
signed(__cdecl cli_book(CLI_TYPEWRI... |
chlds/util | lib/cbr/obj/src/cli_in_w.c | /*
Get a byte or bytes encoded in UTF-8 for one character based on UTF-8 out of the key board.
Also get the Unicode character.
Remarks:
Return the number of bytes for one character.
Notes:
Call fn. _getch twice to read <Ctrl-@>.
The first call returns (0x00) and the second call returns (0x03)..
*/
# define CBR
# ... |
chlds/util | lib/cbr/obj/src/cli_ctrl_fn_internal.c | <filename>lib/cbr/obj/src/cli_ctrl_fn_internal.c
/* **** Notes
Run in an array of function pointers.
Remarks:
Based on UTF-8
*/
# define CBR
# include <stdio.h>
# include "../../../incl/config.h"
signed(__cdecl cli_ctrl_fn_internal(signed(arg),void(*argp))) {
auto signed char *b;
auto signed char *p;
auto signed ... |
chlds/util | lib/cbr/obj/src/cli_ctrl_r_beta.c | /*
Press <Ctrl-R> to invoke the function.
Along with C and Windows libraries
Remarks:
Refer at util/lib/obj/src/cli_io_beta.c
Run..
*/
# define CBR
# define CLI_W32
# include <stdio.h>
# include "../../../incl/config.h"
signed(__cdecl cli_ctrl_r_beta(CLI_W32_STAT(*argp))) {
auto signed char *b;
auto signed i,r;... |
chlds/util | lib/car/obj/src/rect_beta.c | <reponame>chlds/util
/*
Set CLI_IN to get the current frame or CLI_OUT to set the frame at argument io.
Remarks:
Refer at fn. cli_init_property.
The beta edition is for Windows 10 64-bit OS.
*/
# define CAR
# include "../../../incl/config.h"
# include <windows.h>
signed(__cdecl rect_beta(signed(io),signed(arg),rec... |
chlds/util | bin/obj/src/pick.c | /* **** Notes
Find files that contain the specific string using depth-first search.
Remarks:
The command is case-sensitive.
*/
# define C_CODE_STDS
# include "./../../../lib/incl/config.h"
/* **** Global variables */
signed TheNumbreOfDirectories = (0x00);
signed TheNumbreOfFiles = (0x00);
/* **** entry point */
... |
chlds/util | lib/car/obj/src/output_pages.c | <reponame>chlds/util
/* **** Notes
Output.
Remarks:
Refer at fn. cv_ww, cv_v and rl_v.
Based on UTF-8
*/
# define CAR
# include "../../../incl/config.h"
signed(__cdecl output_pages(signed short(arg/* align */),page_t(*argp))) {
auto signed char *b;
auto page_t *page;
auto signed r;
auto signed short flag;
if(!ar... |
chlds/util | lib/car/obj/src/embed_w.c | /* **** Notes
Embed.
*/
# define CAR
# include <stdio.h>
# include "../../../incl/config.h"
signed(__cdecl embed_w(signed(arg),signed short(*argp))) {
auto signed r;
if(!argp) return(0x00);
if(arg) r = embed_w_rr(arg,argp);
else r = embed_w_r(argp);
return(r);
}
|
chlds/util | lib/car/obj/src/cat_ll.c | /* **** Notes
Output character lines out of the argument
k: Put the terminating address of the <knot> structure at.
Remarks:
Use in fn. cmdln_output
*/
# define CAR
# include <stdio.h>
# include "../../../incl/config.h"
signed(__cdecl cat_ll(KNOT(*k))) {
if(!k) return(0x00);
printf("%s \n",(*k).p);
k = ((*k).d)... |
chlds/util | lib/car/obj/src/ctrl_a.c | /*
Press <Ctrl-A> to invoke the function.
Remarks:
Refer at fn. ctrl_fn_b.
*/
# define CAR
# include <stdio.h>
# include "../../../incl/config.h"
signed(__cdecl ctrl_a(ty_t(*argp))) {
auto signed char *b;
auto page_t *page;
auto signed r;
auto signed short flag;
if(!argp) return(0x00);
if(DBG) printf("%s ","<Ct... |
chlds/util | lib/cbr/obj/src/cli_bind_snapshots.c | /* **** Notes
Concatenate snapshots after allocating a memory block for structure cli_snapshot_t.
Remarks:
Build a doubly linked list
Along with C library
*/
# define CBR
# include <conio.h>
# include <stdio.h>
# include <stdlib.h>
# include "../../../incl/config.h"
signed(__cdecl cli_bind_snapshots(cli_history_t... |
chlds/util | lib/car/obj/src/chrono_date_r.c | /* **** Notes
Map the date.
Remarks:
Call fn. rl later.
//*/
# define CALEND
# define CAR
# include "../../../incl/config.h"
signed(__cdecl chrono_date_r(signed(arg),signed char(**di),signed short(*si))) {
auto signed char *b;
auto time_t t;
auto signed r;
auto signed short flag;
if(arg<(0x01)) return(0x00);
if(... |
chlds/util | lib/car/obj/src/cals_refer_periodic_events.c | /* **** Notes
Refer
//*/
# define CALEND
# define CAR
# include "../../../incl/config.h"
signed(__cdecl cals_refer_periodic_events(signed short(arg),cals_event_t(*cache),cals_roll_t(*cached),cals_t(*argp))) {
auto signed i,r;
auto signed short flag;
auto signed short periodic;
auto signed(__cdecl*f)(signed short(a... |
chlds/util | lib/car/obj/src/cat_w.c | <filename>lib/car/obj/src/cat_w.c
/* **** Notes
Concatenate to the terminating null pointer.
Remarks:
Put a null pointer at the end of arguments.
Release buffer later.
Add an ABI attribute of functions to both the declaration and definition
of variadic functions to compile C source files with GCC on WSL (Ubuntu 64-b... |
chlds/util | lib/incl/cbr_f.h | <gh_stars>0
/*
The constants, data types and functions for Typewriter
Along with C library
Remarks:
Call function _getch twice to read <Ctrl-@>.
The first call returns (0x00) and the second call returns (0x03)..
Refer at util/lib/car/obj/src/cli_in.c and at util/lib/cbr/obj/src/cli_io.c
Refer at ./config.h
*/
sign... |
chlds/util | lib/car/obj/src/out_argt.c | <filename>lib/car/obj/src/out_argt.c
/* **** Notes
Output.
Remarks:
A character string should be terminated with the null character.
Refer at fn. cv_ww, fn. read_b and fn. rm_crlf to replace CR/LF with the null character.
Return the number of rows output for characters.
*/
# define CAR
# include "./../../../incl/co... |
chlds/util | lib/cbr/obj/src/lk_vt_opt.c | /* **** Notes
Opt.
Remarks:
Based on UTF-8
*/
# define CBR
# define CLI_W32
# include <stdio.h>
# include "../../../incl/config.h"
# include "../../../incl/c_dir.h"
signed(__cdecl lk_vt_opt(c_dirs_info_t(*argp))) {
auto signed char *b;
auto signed i,r;
auto signed short flag;
auto cli_virtual_terminal_t vt;
if(!... |
chlds/util | lib/cbr/obj/src/cli_clear_rows_internal_beta.c | <gh_stars>0
/* **** Notes
Clear rows.
Remarks:
Refer at fn. cli_clear_row_beta.
*/
# define CBR
# define CLI_W32
# include "../../../incl/config.h"
signed(__cdecl cli_clear_rows_internal_beta(signed short(edge),CLI_W32_STAT(*argp))) {
/* **** DATA, BSS and STACK */
auto CLI_COORD coord;
auto signed i,r;
auto si... |
chlds/util | lib/car/obj/src/cv_argt_r.c | <filename>lib/car/obj/src/cv_argt_r.c
/* **** Notes
Split out of an array for letters.
*/
# define CAR
# include "../../../incl/config.h"
signed(__cdecl cv_argt_r(signed char(**di),signed char(*si))) {
auto signed char *b;
auto signed r;
if(!di) return(0x00);
if(!si) return(0x00);
*di = (0x00);
if(!(*si)) return... |
chlds/util | lib/car/obj/src/cv_v.c | /* **** Notes
Split out of an array for letters.
Remarks:
After calling fn. cv_v, please call fn. rl_v to unmap the buffer allocated on the RAM.
*/
# define CAR
# include "../../../incl/config.h"
signed(__cdecl cv_v(signed char(***di),signed char(*si))) {
auto signed char **v;
auto signed char *b;
auto signed i,r... |
chlds/util | bin/obj/src/ty.c | <reponame>chlds/util
/*
Typewriter
*/
# define CBR
# define CLI_W32
# define THRESHOLD (0x02)
# include "../../../lib/incl/config.h"
signed(__cdecl wmain(signed(argc),signed short(**argv),signed short(**envp))) {
/* **** DATA, BSS and STACK */
auto CLI_W32_STAT cli_w32_stat = {
(0x00),
};
auto cli_page_t *page;... |
chlds/util | lib/car/obj/src/ct_digits_r.c | /* **** Notes
Count digits.
*/
# define CAR
# include "./../../../incl/config.h"
signed(__cdecl ct_digits_r(signed char(*fig),signed char(*argp))) {
auto signed r;
if(!fig) return(0x00);
if(!argp) return(0x00);
if(!(*argp)) return(0x00);
r = ord(fig,*argp);
if(!(r<(ct(fig)))) return(0x00);
argp++;
return(0x01+... |
chlds/util | lib/cbr/obj/src/cli_diff_history.c | /* **** Notes
Take snapshots to redo and undo.
Along with C library
Remarks:
Call fn. cli_book before invoking the function to take the content out of workspace.
Refer at fn. cli_spool_beta, fn. cli_kb_beta and fn. cli_book.
Build a doubly linked list
Based on UTF-8
*/
# define CBR
# define CLI_W32
# include <con... |
chlds/util | lib/car/obj/src/restore_rules.c | /* **** Notes
Restore.
Remarks:
Along with C library
//*/
# define CAR
# include <stdio.h>
# include "../../../incl/config.h"
signed(__cdecl restore_rules(signed(arg/* append or.. */),page_t(*argp))) {
auto signed char *b;
auto rule_t *rule;
auto signed r;
auto signed short flag;
if(!argp) return(0x00);
flag = ... |
chlds/util | lib/car/obj/src/ctrl_bullet.c | <reponame>chlds/util
/*
Type a bullet (i.e., 0x2022) in UTF-8.
Remarks:
Refer at util/lib/obj/src/cli_io_b.c
*/
# define CAR
# include <stdio.h>
# include "../../../incl/config.h"
signed(__cdecl ctrl_bullet(ty_t(*argp))) {
auto signed char *b;
auto signed char *p;
auto rule_t *rule;
auto page_t *page;
auto signed... |
chlds/util | lib/car/obj/src/descend_ll.c | <filename>lib/car/obj/src/descend_ll.c
/* **** Notes
Descend the current temporary knot position - i.e., (*argp).t in a pointer of the knot structure.
Deprecated..
di: Put the address for the current temporary knot in a pointer of the knot structure at.
si: Put the current temporary knot - or e.g., terminating i.e.,... |
chlds/util | lib/car/obj/src/car.c | <gh_stars>0
/* **** Notes
Count column digits for a double word.
//*/
# define CAR
# include "../../../incl/config.h"
signed(__cdecl car(signed short(radix),signed(arg))) {
auto signed short hexa = (0x10);
auto signed short deci = (0x0A);
auto signed short bina = (0x02);
if(radix<(bina)) radix = (deci);
if(hexa<(... |
chlds/util | lib/car/obj/src/cv_d.c | <reponame>chlds/util
/* **** Notes
Convert a signed double word into letters.
Remarks:
Release.
//*/
# define CAR
# include "../../../incl/config.h"
signed(__cdecl cv_d(signed short(radix),signed char(**di),signed(si))) {
auto signed char *table = ("0123456789ABCDEF");
auto signed char minus = ('-');
auto signed ... |
chlds/util | lib/car/obj/src/out_oneline.c | <filename>lib/car/obj/src/out_oneline.c
/* **** Notes
Output only one line.
Remarks:
Return the number of bytes output for characters.
*/
# define CAR
# include "./../../../incl/config.h"
signed(__cdecl out_oneline(signed short(arg/* align */),signed short(cols),signed char(*sym),signed char(*argp))) {
auto signe... |
chlds/util | lib/car/obj/src/v_unmap_beta.c | <reponame>chlds/util<filename>lib/car/obj/src/v_unmap_beta.c<gh_stars>0
/*
Copy to the clipboard.
Remarks:
Refer at util/lib/obj/src/cli_init_roll.c and util/bin/obj/src/ty.c
*/
# define CAR
# include <stdio.h>
# include <windows.h>
# include "../../../incl/config.h"
signed(__cdecl v_unmap_beta(cli_clipboard_t(*ar... |
chlds/util | lib/car/obj/src/cals_weekly_event_in_the_day.c | /* **** Notes
Confirm.
Remarks:
Refer at fn. cals_periodic_event_in_the_day.
//*/
# define CALEND
# define CAR
# include "../../../incl/config.h"
signed(__cdecl cals_weekly_event_in_the_day(time_t(arg),cals_event_t(*argp))) {
auto struct tm *tp;
auto time_t t;
auto signed i,r;
auto signed short wk,di,mo,yr;
auto ... |
chlds/util | lib/car/obj/src/cals_refer_events.c | /* **** Notes
Refer
//*/
# define CALEND
# define CAR
# include "../../../incl/config.h"
signed(__cdecl cals_refer_events(signed short(flag),cals_t(*argp))) {
auto cals_event_t *ev;
auto struct tm *tp;
auto cals_roll_t roll;
auto time_t t;
auto signed i,r;
auto signed short mo,di,yr;
auto signed short wk;
auto si... |
chlds/util | lib/car/obj/src/cals_count_scheduled_monthly_events.c | /* **** Notes
Count periodic events scheduled for a week.
//*/
# define CALEND
# define CAR
# include "../../../incl/config.h"
signed(__cdecl cals_count_scheduled_monthly_events(signed(*cache),cals_event_t(*term),cals_event_t(*argp))) {
auto cals_event_t *ev;
auto struct tm *tp;
auto time_t t;
auto signed i,r;
aut... |
chlds/util | lib/car/obj/src/ct_letters.c | <reponame>chlds/util<filename>lib/car/obj/src/ct_letters.c
/* **** Notes
Count the number of Unicode letters based on UTF-8 to the terminating null character.
Remarks:
Refer at fn. ct_characters.
*/
# define CAR
# include "./../../../incl/config.h"
signed(__cdecl ct_letters(signed char(*argp))) {
/* **** DATA, BS... |
chlds/util | lib/car/obj/src/rf_leap_years.c | <gh_stars>0
/* **** Notes
Refer
*/
# define CAR
# include "./../../../incl/config.h"
signed(__cdecl rf_leap_years(signed short(arg))) {
auto signed i,r;
if(arg<(0x00)) arg = (0x01+(~arg));
r = (arg%(4));
if(r) return(0x00);
r = (arg%(100));
if(!r) {
r = (arg%(400));
if(r) return(0x00);
}
return(0x01);
}
|
chlds/util | lib/car/obj/src/art_r_r.c | <filename>lib/car/obj/src/art_r_r.c
/* **** Notes
Read content out of FILE in column.
*/
# define CAR
# include "./../../../incl/config.h"
signed(__cdecl art_r_r(signed short(*flag),signed short(cols),signed char(*sym),signed(fd))) {
auto signed char *b;
auto signed i,r;
auto signed short br;
auto signed char lf =... |
chlds/util | lib/cbr/obj/src/cli_leap_beta.c | <filename>lib/cbr/obj/src/cli_leap_beta.c<gh_stars>0
/*
Along with C and Windows libraries
Remarks:
Refer at util/lib/obj/src/cli_ctrl_g_beta.c
*/
# define CBR
# define CLI_W32
# include <conio.h>
# include <stdio.h>
# include <stdlib.h>
# include "../../../incl/config.h"
signed(__cdecl cli_leap_beta(signed char(... |
chlds/util | lib/car/obj/src/cv_ww_r.c | <reponame>chlds/util
/* **** Notes
Convert into an array of pointers for words-wrap arrays.
Remarks:
Refer at fn. cv_ww.
*/
# define CAR
# include "./../../../incl/config.h"
signed(__cdecl cv_ww_r(signed short(arg),signed char(**di),signed short(*flag),signed char(*sym),signed char(*si))) {
auto signed char *b;
a... |
chlds/util | lib/car/obj/src/cv_hr_r.c | /* **** Notes
Convert to time out of characters.
//*/
# define CAR
# include "../../../incl/config.h"
signed(__cdecl cv_hr_r(signed short(*hr),signed short(*mn),signed char(*argp))) {
auto signed char *b;
auto signed i,l,r;
auto signed short flag;
auto signed char *(pm[]) = {
"pm",
"p.m.",
"PM",
"P.M.",
0x00,
};
... |
chlds/util | lib/car/obj/src/ctrl_edge.c | /*
Go to the edge.
Remarks:
Refer at util/lib/obj/src/cli_io_b.c
*/
# define CAR
# include <stdio.h>
# include "../../../incl/config.h"
signed(__cdecl ctrl_edge(ty_t(*argp))) {
auto signed char *b;
auto rule_t *rule;
auto page_t *page;
auto signed i,r;
auto signed short flag;
if(!argp) return(0x00);
// page = (... |
chlds/util | lib/cbr/obj/src/cli_eq_load.c | <reponame>chlds/util
/*
Rewrite without loading the content if the operand is "none".
Remarks:
Refer at util/lib/obj/src/cli_parse.c
*/
# define CBR
# include <conio.h>
# include <stdio.h>
# include <stdlib.h>
# include "../../../incl/config.h"
signed(__cdecl cli_eq_load(CLI_TYPEWRITER(*argp))) {
auto signed cha... |
chlds/util | lib/car/obj/src/dir_or_file.c | <reponame>chlds/util
/* **** Notes
Is it a directory or file..?
*/
# define C_W32API
# define CAR
# include <stdio.h>
# include "../../../incl/config.h"
signed short(__cdecl dir_or_file(WIN32_FIND_DATA(*argp))) {
auto signed char *p;
auto signed short flag;
auto signed char const A_DOT_CHARACTER = ('.');
if(!argp... |
chlds/util | lib/car/obj/src/rd_f.c | /* **** Notes
Read bytes to the delimiter.
Remarks:
Call fn. rl later.
//*/
# define CAR
# include <stdio.h>
# include "../../../incl/config.h"
signed(__cdecl rd_f(signed char(**di),signed char(*delim),signed(fd))) {
auto signed char *b;
auto signed i,r;
auto signed short flag;
if(!di) return(0x00);
if(*di) retu... |
chlds/util | lib/car/obj/src/cl_b.c | /* **** Notes
Close.
Remarks:
Refer at fn. op_b.
*/
# define CAR
# include <io.h>
# include <stdio.h>
# include <stdarg.h>
# include <sys/types.h>
# include <sys/stat.h>
# include <fcntl.h>
# include "./../../../incl/config.h"
signed(__cdecl cl_b(signed(arg))) {
return(close(arg));
}
|
chlds/util | lib/car/obj/src/cli_output.c | <reponame>chlds/util
/* **** Notes
Output in column articles.
Remarks:
A character string should be terminated with the null character.
Refer at fn. cv_ww, fn. read_b and fn. rm_crlf to replace CR/LF with the null character.
Return the number of rows output for characters (..or the number of characters).
*/
# defin... |
chlds/util | lib/car/obj/src/cli_outv.c | <gh_stars>0
/* **** Notes
Output.
Remarks:
Refer at fn. cv_ww, cv_v and rl_v.
Based on UTF-8
*/
# define CAR
# include "../../../incl/config.h"
signed(__cdecl cli_outv(signed char(**argp))) {
if(!argp) return(0x00);
if(!(*argp)) return(0x00);
cli_outs(*argp);
argp++;
// if(!(cli_es(CTRL_K))) return(0x00);
retur... |
chlds/util | lib/car/obj/src/cli_init_clipboards.c | <reponame>chlds/util
/* **** Notes
Initialise clipboards.
*/
# define CAR
# include "../../../incl/config.h"
signed(__cdecl cli_init_clipboards(signed(arg),cli_clipboard_t(*argp))) {
/* **** DATA, BSS and STACK */
auto signed char *b;
auto signed i,r;
/* **** CODE/TEXT */
if(!argp) return(0x00);
if(!(cli_init_pa... |
chlds/util | lib/cbr/obj/src/cl_io_beta.c | /* **** Notes
Output Unicode characters in UTF-8 after decoding Unicode bytes input out of the key board.
Along with C and Windows libraries
Remarks:
Based on UTF-8
*/
# define CBR
# define CLI_W32
# define CL_FN (0x01+(0x20))
# include <conio.h>
# include <stdio.h>
# include <stdlib.h>
# include "../../../incl/... |
chlds/util | lib/car/obj/src/cals_add_events.c | /* **** Notes
Add
//*/
# define CALEND
# define CAR
# include "../../../incl/config.h"
signed(__cdecl cals_add_events(signed char(*content),cals_roll_t(*argp))) {
/* **** DATA, BSS and STACK */
auto cals_event_t *event;
auto signed i,r;
/* **** CODE/TEXT */
if(!content) return(0x00);
if(!argp) return(0x00);
if(!... |
chlds/util | lib/car/obj/src/cli_io_b_r.c | /* **** Notes
Output characters in UTF-16 after decoding bytes input out of the key board.
Remarks:
Based on UTF-8
*/
# define CAR
# include <stdio.h>
# include "../../../incl/config.h"
signed(__cdecl cli_io_b_r(signed(arg),ty_t(*argp))) {
auto signed char *b;
auto rule_t *rule;
auto page_t *page;
auto signed i,r... |
chlds/util | lib/car/obj/src/cals_sched_events.c | <gh_stars>0
/* **** Notes
Schedule
Remarks:
Currently under construction
//*/
# define CALEND
# define CAR
# include "../../../incl/config.h"
signed(__cdecl cals_sched_events(signed char(*content),cals_roll_t(*argp))) {
/* **** DATA, BSS and STACK */
auto cals_event_t *event;
auto signed char *b;
auto time_t t;
a... |
chlds/util | lib/cbr/obj/src/cl_prep_beta.c | /* **** Notes
Prepare the the two-row footer.
Remarks:
Along with C and Windows libraries
*/
# define CBR
# define CLI_W32
# include <conio.h>
# include <stdio.h>
# include <stdlib.h>
# include "../../../incl/config.h"
signed(__cdecl cl_prep_beta(CLI_W32_STAT(*argp))) {
/* **** DATA, BSS and STACK */
auto CLI_CO... |
chlds/util | lib/car/obj/src/cals_init.c | /* **** Notes
Initialise
//*/
# define CALEND
# define CAR
# include "../../../incl/config.h"
signed(__cdecl cals_init(signed(arg),cals_t(*argp))) {
auto time_t t;
auto signed r;
auto signed short di;
auto signed short mo;
if(!argp) return(0x00);
r = cals_init_event(&(R(today,*argp)));
if(!r) return(0x00);
OR(R... |
chlds/util | lib/car/obj/src/ct_wrds.c | <reponame>chlds/util
/* **** Notes
Count arguments to the terminating null character.
Remarks:
Refer at fn. ct_ars2 and fn. ct_ars_r.
//*/
# define CAR
# include "./../../../incl/config.h"
signed(__cdecl ct_wrds(signed char(*base))) {
/* **** DATA */
auto signed short flag;
auto signed retv;
auto signed r;
/* **... |
Edvvin/FileSystem | FileSystem/dir.h | <gh_stars>0
#pragma once
#include "kfs.h"
class KernelFile;
class Directory {
ClusterNo ind1Adr;
int ind1Cursor, ind2Cursor, dataCursor;
ClusterNo ind1[ClusterSize / sizeof(ClusterNo)];
ClusterNo ind2[ClusterSize / sizeof(ClusterNo)];
char data[ClusterSize];
int dirtyData, dirtyInd1, dirtyInd2;
BytesCnt cursor;... |
Edvvin/FileSystem | FileSystem/cache.h | #pragma once
#include "part.h"
//I might implement this
class Cache
{
protected:
Partition* p;
public:
virtual ClusterNo getCacheNumOfClusters();
virtual void writeBack();
virtual int readCluster(ClusterNo, char *buffer);
virtual int writeCluster(ClusterNo, const char *buffer);
virtual void clear(int doWriteBa... |
Edvvin/FileSystem | FileSystem/bitvect.h | #pragma once
#include "part.h"
class Cache;
class BitVector
{
Partition* p;
ClusterNo bitVectorId;
char bits[ClusterSize];
char dirty;
BitVector* next;
ClusterNo clusterCnt;
public:
BitVector(Partition* p);
BitVector(Partition* c, ClusterNo id, ClusterNo size);
void set(ClusterNo cNo);
void reset(ClusterNo c... |
Edvvin/FileSystem | FileSystem/kfs.h | #pragma once
#include <stdint.h>
#include "fs.h"
#include <windows.h>
#include "part.h"
#include <map>
class Cache;
class BitVector;
class Directory;
struct FileTableEntry {
int rCnt;
int wCnt;
FileTableEntry():rCnt(0), wCnt(0) {
}
~FileTableEntry() {
}
};
struct DirDesc {
char name[8];
char ext[3];
char ze... |
Edvvin/FileSystem | FileSystem/kfile.h | #pragma once
#include "file.h"
#include "part.h"
#include "kfs.h"
class KernelFile
{
ClusterNo ind1Adr;
int ind1Cursor, ind2Cursor, dataCursor;
ClusterNo ind1[ClusterSize / sizeof(ClusterNo)];
ClusterNo ind2[ClusterSize / sizeof(ClusterNo)];
char data[ClusterSize];
int dirtyData, dirtyInd1, dirtyInd2;
BytesCnt ... |
Edvvin/FileSystem | FileSystem/testprimer.h | #pragma once
#include"fs.h"
#include"file.h"
#include"part.h"
#include<iostream>
#include<fstream>
#include<cstdlib>
#include<windows.h>
#include<ctime>
#define signal(x) ReleaseSemaphore(x,1,NULL)
#define wait(x) WaitForSingleObject(x,INFINITE)
using namespace std;
extern HANDLE nit1, nit2;
extern DWORD ThreadID;... |
Edvvin/FileSystem | FileSystem/rcache.h | #pragma once
#include "kfs.h"
#include "kfile.h"
#include "cache.h"
#include "part.h"
class RealCache : public Cache {
ClusterNo size;
int* clocks;
char* dirty;
ClusterNo* adrs;
char* cache;
int hand;
int remaining;
int choose();
public:
static const int clockLimit = 4;
RealCache(Partition* p, ClusterNo si... |
iagocq/armethyst | fortnight06/isummation.c |
#define SIZE 10
int v[SIZE] = {5,2,9,6,3,10,7,4,1,8};
int summ=0;
void main (void) {
int i;
summ;
for (i = 0; i < SIZE; i++) {
summ+=v[i];
}
}
|
iagocq/armethyst | fortnight06/memory/cache/include/FACache.h | /* ----------------------------------------------------------------------------
(EN) armethyst - A simple ARM Simulator written in C++ for Computer Architecture
teaching purposes. Free software licensed under the MIT License (see license
below).
(PT) armethyst - Um simulador ARM simples escrito em C++... |
iagocq/armethyst | fortnight06/fpops.c | <filename>fortnight06/fpops.c<gh_stars>1-10
#define SIZE 11
/*
* Parabola: y = ax^2 + bx + c;
* xc: Centro da parabola -> y' = 0 -> 2ax + b = 0 -> x = -b / 2a = xc
* xc fica em v[SIZE / 2]; Logo, a abscissa x em v[0] é (xc - (SIZE/2))
*/
float v[SIZE] = {3.2, 0.5, 4.7, 0, 0, 0, 0, 0, 0, 0, 0};
void main (void) ... |
vasyharan/neovim | src/nvim/os/users.c | <gh_stars>1-10
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
// users.c -- operating system user information
#include <uv.h>
#include "auto/config.h"
#include "nvim/ascii.h"
#include "nvim/garray.h"
#inc... |
YnkDK/AiBToS-Project1 | src/Days.h | <gh_stars>0
/* -------------------------------------------------------------------------------------
** This software is implemented as part of the course
** Algorithms in Bioinformatics - Trees and Structures Q2/2015
** at Aarhus Univerity Denmark.
**
** Days.h
** Defines the algorithm developed by Day as describe... |
tharrry/sphincsplus | refx4/thash_sha256_simplex4.c | <filename>refx4/thash_sha256_simplex4.c<gh_stars>0
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "thash.h"
#include "address.h"
#include "params.h"
#include "sha256.h"
//#include "sha256_neon.h"
//#include "sha256_neon11.h"
/**
* Takes an array of inblocks concatenated array... |
tharrry/sphincsplus | sha256x4-neon/hash_sha256.c | #include <stdint.h>
#include <string.h>
#include "address.h"
#include "utils.h"
#include "params.h"
#include "hash.h"
#include "sha256.h"
#if SPX_N==32
#define SPX_SHAX_OUTPUT_BYTES SPX_SHA512_OUTPUT_BYTES
#define SPX_SHAX_BLOCK_BYTES SPX_SHA512_BLOCK_BYTES
#define shaX_inc_init sha512_inc_init
#define shaX_inc_block... |
tharrry/sphincsplus | sha256x4-neon/params.h | <filename>sha256x4-neon/params.h<gh_stars>10-100
#define str(s) #s
#define xstr(s) str(s)
#include xstr(params/params-PARAMS.h)
|
tharrry/sphincsplus | sha256x4-neon/thash_sha256_robustx4.c | <gh_stars>0
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "thash.h"
#include "address.h"
#include "params.h"
#include "sha256.h"
#include "sha256_neon.h"
/**
* Takes an array of inblocks concatenated arrays of SPX_N bytes.
*/
void thashx4(
unsigned char *out0,
... |
tharrry/sphincsplus | sha256-avx2/thash_sha256_simple.c | #include <stdint.h>
#include <string.h>
#include "thash.h"
#include "address.h"
#include "params.h"
#include "sha256.h"
/**
* Takes an array of inblocks concatenated arrays of SPX_N bytes.
*/
void thash(unsigned char *out, const unsigned char *in, unsigned int inblocks,
const unsigned char *pub_seed, uin... |
tharrry/sphincsplus | shake256-avx2/test/spx.c | <filename>shake256-avx2/test/spx.c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "../api.h"
#include "../params.h"
#include "../randombytes.h"
#define SPX_MLEN 32
#define SPX_SIGNATURES 1
int main()
{
int ret = 0;
int i;
/* Make stdout buffer more responsive. */
setbuf(stdout, ... |
tharrry/sphincsplus | shake256-avx2/hashx4.h | #ifndef SPX_HASHX4_H
#define SPX_HASHX4_H
#include <stdint.h>
void prf_addrx4(unsigned char *out0,
unsigned char *out1,
unsigned char *out2,
unsigned char *out3,
const unsigned char *key,
const uint32_t addrx4[4*8]);
#endif
|
tharrry/sphincsplus | sha256-avx2/hash_sha256x8.c | <gh_stars>10-100
#include <stdint.h>
#include <string.h>
#include "address.h"
#include "utils.h"
#include "params.h"
#include "hashx8.h"
#include "sha256.h"
#include "sha256x8.h"
#include "sha256avx.h"
/*
* 8-way parallel version of prf_addr; takes 8x as much input and output
*/
void prf_addrx8(unsigned char *out0,... |
tharrry/sphincsplus | shake256-avx2/thash_shake256_robustx4.c | <filename>shake256-avx2/thash_shake256_robustx4.c
#include <stdint.h>
#include <string.h>
#include "thashx4.h"
#include "address.h"
#include "params.h"
#include "fips202x4.h"
extern void KeccakP1600times4_PermuteAll_24rounds(__m256i *s);
/**
* 4-way parallel version of thash; takes 4x as much input and output
*/
... |
tharrry/sphincsplus | sha256x4-neon/address.c | #include <stdint.h>
#include <string.h>
#include "params.h"
#include "utils.h"
/*
* Specify which level of Merkle tree (the "layer") we're working on
*/
void set_layer_addr(uint32_t addr[8], uint32_t layer)
{
((unsigned char *)addr)[SPX_OFFSET_LAYER] = layer;
}
/*
* Specify which Merkle tree within the level ... |
tharrry/sphincsplus | sha256x4-neon/wots.h | #ifndef SPX_WOTS_H
#define SPX_WOTS_H
#include <stdint.h>
#include "params.h"
/**
* Takes a WOTS signature and an n-byte message, computes a WOTS public key.
*
* Writes the computed public key to 'pk'.
*/
void wots_pk_from_sig(unsigned char *pk,
const unsigned char *sig, const unsigned char ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.