Commit Graph

7 Commits

Author SHA1 Message Date
Mike Sharov 23a08804f8 Run code through indent
This mainly changes the indentation level from 8 to 4 spaces,
because I have difficulty working with the wide indents.
There should be no non-whitespace changes here.
2021-04-09 17:56:41 -04:00
Mike Sharov 24a28f44d0 Move all global variabls to main.c
Move all global struct definitions to main.h
Merge all global settings into struct settings
Prefix all global variables with _ to emphasize they are global
2018-04-30 11:15:42 -04:00
Mike Sharov 5359416458 General cleanup
Reduce variable scope
	Make functions static when possible
	Make vars const when possible
	Make vars unsigned when possible
	Use bool type from stdbool.h
	Rename some confusingly named variables (i.e. tmp, tmp2)
    	Prefer stack storage to same-scope malloc/free
	Prefer enums for constants
	Prefer sprintf to strcat and other tricks
	Simplify redundant blocks
	Simplify strtok flow
	Remove unnecessary parentheses and braces
	Replace some magic constants with clearer alternatives
	Remove libm dependency (log10 in about.c)
	Make highlight logic in interface.c more consistent
	Fix wrong item being hashed in digcalc
	Remove clear to reduce flicker
	Use = {} for zero-initializing
	Use calloc instead of malloc/manual zeroing
	Make MainQuit be called with an error in a signal handler
	Fix file opening modes to match intended use
	Read and display error log in window instead of using pager
	Remove non-ascii characters from setup.c; replace with hex codes
2018-04-30 09:47:10 -04:00
Mike Sharov c75ddea2ce Replace header guards with the universally supported pragma once 2018-04-27 11:05:49 -04:00
Mike Sharov f1a7b649f6 Update copyright headers to current recommendations
Recommended header wording copied from https://www.gnu.org/licenses/gpl-howto.html
	The only two changes are to use the project name, Snownews,
	instead of "this program", to clarify that the entire project is
	under the GPL license, rather than only the file with the header.
	The second change is to replace snail mail address with the license
	URL. It is unreasonable to expect users to send an actual letter to
	a US address if the user is in, say, Germany. Postage is expensive.
2018-04-27 09:31:21 -04:00
Koz 0f7c424f3f Relicensing to GPL-3.0 2017-10-24 11:37:27 +13:00
Oliver Feiler 486fa09995 Import the old snownews code into git. The old hg repo blew up anyway. :( 2015-07-02 18:27:59 +02:00