1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-22 19:33:02 +01:00
Commit Graph

50 Commits

Author SHA1 Message Date
jfreegman
2fcbc4fa1c
Remove lots of duplicate code related to printing timestamps 2020-11-30 17:55:57 -05:00
jfreegman
39e4ff8bd6
Fix tab complete bug
If a directory contains a single entry tab complete will no longer fail
2020-11-26 16:20:51 -05:00
jfreegman
8d9d51640c
Fix display bug caused by noread flag appended to unread messages
A line's line count now increments without messing up the formatting in cases where
the noread flag wraps to the next line.

Additionally, the way noread flags are handled has been refactored and made
more efficient.
2020-11-26 16:16:59 -05:00
zugz (tox)
d75d6e8b60
sort includes 2020-11-14 00:00:05 +00:00
jfreegman
e7a0c32a68
Refactor a few complex functions
Also moved some single use functions from misc_tools to their
respective files
2020-11-01 15:55:07 -05:00
jfreegman
7560bc9547
modularize string arrays for line completion
Instead of using various different forms of string arrays and having to handle them
differently for string completion, we now always use char pointer arrays. This allows
us to remove some large stack allocations, remove a bunch of confusing defines that
keep track of global array sizes, and generally unclutters the code so it's easier
to read.
2020-11-01 11:29:51 -05:00
jfreegman
2b43340c90
Convert all variable length arrays to heap allocations
VLA's are inherently unsafe so the safest option is to not use them
2020-11-01 11:29:48 -05:00
jfreegman
3cdcfbf4e5
Reduce size of some large stack memory allocations 2020-10-25 13:48:14 -04:00
jfreegman
4c302da503
Fix a bunch of Wformat-truncation warnings due to snprintf() misuse 2020-10-24 14:44:41 -04:00
iphydf
6f72a191ba
Revert "Add feature flags and missing #includes."
This reverts commit dd5fa236ae.

Also, set `-std=gnu99` in Bazel build.
2020-04-17 19:37:22 +00:00
iphydf
dd5fa236ae
Add feature flags and missing #includes.
These are needed to compile on some strict Linuxes.
2020-04-15 21:34:30 +00:00
jfreegman
98cb7f58c0
Fix unused parameter and unused result warnings 2020-03-15 14:57:00 -04:00
jfreegman
116bff8cef
format fixes 2019-12-07 23:17:02 -05:00
jfreegman
05eda76643
Partially fix autocomplete behaviour for input with spaces 2019-02-17 17:25:34 -05:00
jfreegman
ce6d4861fb
Fix bug where autocomplete added a forward slash to files with no extension
Also slightly refactored the line complete functions
2018-10-17 18:00:09 -04:00
jfreegman
8f0e6026f0
Add enum for file_type() and a little cleanup 2018-10-17 18:00:08 -04:00
jfreegman
258736995d
Remove ability to set note with status command 2018-10-17 18:00:08 -04:00
jfreegman
56e03a3f8b
No longer require quotes to enclose paths 2018-10-17 18:00:08 -04:00
jfreegman
63cc23401a
Improve readability of defines 2018-10-08 13:39:04 -04:00
jfreegman
a37bf300f9
Update astylerc to match toxcore & reformat all source files 2018-07-18 11:33:16 -04:00
jfreegman
815c29ee31
Significantly reduce time before trying to re-send a message with no read receipt
(also some formatting cleanup)
2018-03-03 23:54:12 -05:00
jfreegman
5cd196a769
Fix autocomplete bug
Formatting was messed up due to not accounting for null byte in directory list
2018-02-20 20:54:26 -05:00
jfreegman
f2c116feb3
Fix potential string truncations with snprintf 2017-09-01 17:36:17 -04:00
jfreegman
0136f22076
Fix UI bugs & format
This fixes a bug where lines would sometimes be incorrectly marked as unread, as well as
a bug where inbound messages would sometimes be coloured incorrectly
2017-06-01 16:46:12 -04:00
jakob
22ea522baf Add "/run" to autocompleter and fix example Python script. 2017-05-22 20:47:56 -04:00
Jfreegman
f056f13329
Astyle everything and add an astyle options script to repo 2016-09-24 21:07:04 -04:00
Jfreegman
9fcbc3bde0
Fix tab-complete bug causing buffer to sometimes clear 2016-06-11 23:49:56 -04:00
Jfreegman
fa0e645a79
Fix a bunch of misc bugs and corner cases 2015-11-08 03:57:01 -05:00
Jfreegman
11701d22a1
Lots of bug fixes and general code cleanup 2015-08-27 03:38:08 -04:00
Jfreegman
035420e5c7
Revert commit 312d0c3 (localization/gettext)
There were serious problems with branch merging that need to be resolved first
2015-07-04 01:19:16 -04:00
Ansa89
85d3c18ba6 Add localization system (gettext) 2015-05-28 15:50:55 +02:00
Jfreegman
470eaeb97b Merge branch 'master' of https://github.com/hardlyeven/toxic into hardlyeven-master 2015-03-18 15:45:37 -04:00
Andrey Alekseenko
ec23cedc3a Fixing couple leaking file descriptors 2015-03-18 19:28:04 +03:00
jlo
ce1ae1d7dc added tab autocomplete for "/status o" => "/status online" 2015-03-17 14:25:15 -05:00
dantok
eeeaf8d707 Update autocomplete.c 2015-01-25 21:52:07 +01:00
dantok
37b3b5a5ed Fix an edge case when obtaining home directory.
Make the path to home directory empty before calling get_home_dir(), otherwise if the call fails, the contents are undefined.
2015-01-25 20:49:52 +01:00
Jfreegman
544c402f78
implement avatars (setting only) and generalize path tab-complete 2014-09-26 03:10:44 -04:00
Jfreegman
58b0a04019 separate file transfer updates from callbacks 2014-08-17 00:11:49 -04:00
Felix Janda
c49de7733c Add missing includes
Fixes compilation with musl libc
2014-08-03 09:44:48 +02:00
Jfreegman
3cbe61e111
fix a few formatting bugs and simplify code a bit 2014-08-02 15:35:57 -04:00
stal
7e5b41c8e0 another apple include: <sys/syslimits.h>
for NAME_MAX
2014-07-31 10:52:36 -07:00
Jfreegman
94a8ce5aa8
fix buggy path autocomplete behaviour 2014-07-28 01:33:12 -04:00
Jfreegman
f630a3e604
fix possible buffer overflows and undefined behaviour 2014-07-25 17:55:21 -04:00
Jfreegman
b68deef6db allow line_info_add to take formatted strings with variable # of args 2014-07-24 23:03:55 -04:00
Jfreegman
8d8df585ad
sort directories and skip special symbols for path autocomplete 2014-07-23 18:34:32 -04:00
Jfreegman
bc94e08970 sendfile tab-complete for ~/ shortcut 2014-07-21 15:11:30 -04:00
Jfreegman
7e667a8028 print multiple matches for all tab-complete operations, fix bug when tab-completing at end of line 2014-07-18 13:48:21 -04:00
Jfreegman
d4e41d6053 autocomplete pathnames with spaces 2014-07-18 03:20:40 -04:00
Jfreegman
f30dccf726
return correct value, fix comment 2014-07-18 01:52:33 -04:00
Jfreegman
ea3fcd5b79 auto-completion for paths when sending file & improved auto-complete algorithm to do partial matches 2014-07-18 01:37:33 -04:00