summaryrefslogtreecommitdiff
path: root/src/common/util.h
AgeCommit message (Collapse)Author
2018-06-28Move tor_gethostname to lib/netNick Mathewson
2018-06-28Move tor_escape_str_for_pt_args into or/transports.cNick Mathewson
2018-06-28Move string_is_key_value to lib/encodingNick Mathewson
2018-06-28Move weakrng into lib/intmathNick Mathewson
2018-06-28Extract process-management functionality into a new lib/processNick Mathewson
Note that procmon does *not* go here, since procmon needs to integrate with the event loop.
2018-06-27Move confline.c to lib/encoding: it is about encoding key-value pairsNick Mathewson
Also, move "unescape_string()" to encoding too, since it's about encoding data as C strings.
2018-06-27Move hex_str to binascii.cNick Mathewson
2018-06-27Extract time encoding functions into lib/encodingNick Mathewson
2018-06-27Move several address-string-testing functions to address.cNick Mathewson
2018-06-27Move various mem* functions to lib/stringNick Mathewson
2018-06-27Move set/get_uint*() to inline functions in arch/bytes.hNick Mathewson
Also move our ntohll/htonll functions.
2018-06-27Extract functions from compat.c and util.h into a new fs libraryNick Mathewson
2018-06-27Move read/write_all_to_socket into lib/net.Nick Mathewson
2018-06-27Split read_all and write_all into separate functionsNick Mathewson
2018-06-26Move tor_parse_long and friends into parse_int.h in libtor-stringNick Mathewson
2018-06-26Move the escape-for-log code into src/lib/logNick Mathewson
It doesn't need anything higher-level, and everything that needs the logs potentially needs this.
2018-06-22Move util_bug into libtor-logNick Mathewson
2018-06-22Remove the util_bug.h include from smartlist.h.Nick Mathewson
This change makes a whole bunch of things in torlog.c break, since apparently I did not find all the fd dependencies.
2018-06-22Extract the locking and logging codeNick Mathewson
The locking code gets its own module, since it's more fundamental than the higher-level locking code. Extracting the logging code was the whole point here. :)
2018-06-22Extract simple integer math into its own moduleNick Mathewson
2018-06-22Move smartlist_add_{v,}asprintf into smartlist.[ch]Nick Mathewson
Now that I know that "strings" nests below "container", I know this is safe.
2018-06-22Extract key string manipulation functions into a new library.Nick Mathewson
2018-06-22Move ARRAY_LENGTH to compiler_compat.hNick Mathewson
2018-06-22Extract our code for answering "what time is it right now".Nick Mathewson
The other time stuff is higher-level
2018-06-22Move STRUCT_VAR_P to compat_compiler.Nick Mathewson
2018-06-21Simplify include structure of container.[ch]Nick Mathewson
2018-06-21Extract tor_malloc and friends to a new module.Nick Mathewson
2018-06-21Rectify include paths (automated).Nick Mathewson
You have no idea how glad I am that this is automated.
2018-06-21Rectify include paths (automated)Nick Mathewson
2018-06-21Rectify include paths (automated)Nick Mathewson
2018-06-21Rectify include paths (automated)Nick Mathewson
2018-06-20Move horrible-emergency handling into torerr.[ch]Nick Mathewson
Previously we had code like this for bad things happening from signal handlers, but it makes sense to use the same logic to handle cases when something is happening at a level too low for log.c to be involved. My raw_assert*() stuff now uses this code.
2018-06-20Remove dmalloc support; closes #26426Nick Mathewson
Dmalloc hasn't seen a release in over a decade, and there are much better tools to use these days.
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-06-20Update copyrights to 2018.Nick Mathewson
2018-04-23Merge remote-tracking branch 'neel/b25511-r4'Nick Mathewson
2018-04-16Add format_local_iso_time_nospace()Neel Chauhan
2018-04-16Helper function to add u32 without overflow.Mike Perry
2018-04-04Remove PortForwarding optionsNeel Chauhan
Signed-off-by: Isis Lovecruft <isis@torproject.org>
2018-03-28Merge branch 'maint-0.3.3'Nick Mathewson
2018-03-28Rename string_is_valid_hostname -> string_is_valid_nonrfc_hostnameNick Mathewson
Per discussion on 25055.
2018-03-28Allow IPv6 address strings to be used as hostnames in SOCKS5 requestsrl1987
2018-02-15Remove workaround code for systems where free(NULL) is busted.Nick Mathewson
Add an autoconf test to make sure we won't regret it. Closes ticket 24484.
2018-01-10Document the alignment limitation of tor_free()Nick Mathewson
2017-12-08Replace all FREE_AND_NULL* uses to take a type and a free function.Nick Mathewson
This commit was made mechanically by this perl script: \#!/usr/bin/perl -w -i -p next if /^#define FREE_AND_NULL/; s/\bFREE_AND_NULL\((\w+),/FREE_AND_NULL\(${1}_t, ${1}_free_,/; s/\bFREE_AND_NULL_UNMATCHED\(/FREE_AND_NULL\(/;
2017-12-08Let's have only one FREE_AND_NULL variant.Nick Mathewson
This commit removes the old FREE_AND_NULL, and renames the old FREE_AND_NULL_UNMATCHED so that it is now called FREE_AND_NULL. This will break all the FREE_AND_NULL_* users; the next commit will fix them.
2017-12-08Make tor_free only evaluate its input once (at least on gcc and clang)Nick Mathewson
2017-12-08Switch to a safer FREE_AND_NULL implementationNick Mathewson
This one only evaluates the input once, so it cannot mess up even if there are side effects.
2017-12-08Convert the rest of src/common's headers to use FREE_AND_NULLNick Mathewson
2017-11-17Add a macro to call a free_ function and clear a variableNick Mathewson