aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2020-12-30libthread: simplifyRuss Cox2-8/+1
Now that everything uses pthreads and pthreadperthread, can delete various conditionals, all the custom context code, and so on. Also update documents. Fixes #355.
2020-12-30libthread: add threadmaybackgroundRuss Cox1-2/+5
Programs that want to background themselves now need to define threadmaybackground returning 1. This avoids a confusing (to people and debuggers) extra parent process for all the threaded programs that will never want to background themselves.
2020-07-18draw: use int for Cacheinfo x fieldRuss Cox1-1/+1
With very large fonts (72pt or so) I see bad cache glyphs, and this fixes it. Not entirely sure exactly which code is overflowing, but something is.
2020-05-29libdraw: handle larger number of subfontsRuss Cox1-2/+3
2020-05-18devdraw, libdraw: handle keyboard runes > U+FFFFRuss Cox1-3/+8
Runes in Plan 9 were limited to the 16-bit BMP when I drew up the RPC protocol between graphical programs and devdraw a long time ago. Now that they can be 32-bit, use a 32-bit wire encoding too. A new message number to avoid problems with other clients (like 9fans.net/go). Add keyboard shortcut alt : , for U+1F602, face with tears of joy, to test that it all works.
2020-05-18build: drop _XOPEN_SOURCE in u.h on AIXRuss Cox1-1/+0
2020-05-18lib9: use __builtin_return_address on IBM XL/CBen Huntsman1-1/+1
2020-05-17lib9: use opendir/readdir to read directoriesRuss Cox1-3/+0
getdirentries(2) has been deprecated on macOS since 10.5 (ten releases ago). Using it requires disabling 64-bit inodes, but that in turn makes binaries incompatible with some dynamic libraries, most notably ASAN. At some point getdirentries(2) will actually be removed. For both these reasons, switch to opendir/readdir. A little clunky since we have to keep the DIR* hidden away to preserve the int fd interfaces, but it lets us remove a bunch of OS-specific code too.
2020-05-17lib9: add closeRuss Cox1-1/+3
More preparation for opendir.
2020-05-07all: fix #includes for AIX, add a few AIX "implementation" filesBen Huntsman1-0/+4
2020-05-07all: update build scripts to fix AIX XL/C compatibilityBen Huntsman1-2/+2
2020-01-19all: remove Linux 2.4 vs 2.6 detectionRuss Cox1-4/+2
Linux 2.4 is dead. (The libthread code hasn't worked for Linux 2.4 for a long time.)
2020-01-19libthread: rm FreeBSD 4 codeRuss Cox1-4/+2
Pretty sure FreeBSD 4 is gone now. :-)
2020-01-13libdraw: connect to devdraw via $wsysid when setRuss Cox1-0/+6
2020-01-13devdraw: move Client into devdraw.h and move global state inRuss Cox1-1/+0
2020-01-12lib9: make a p9frexp function wrapping system frexpRuss Cox1-1/+3
Under certain conditions it looks like frexp gets #defined to something else on macOS during system headers, which then breaks the declaration in libc.h.
2020-01-07lib9: remove getcallerpc implementationsRuss Cox1-11/+14
These make no sense and are not really needed at all. Add a best-effort attempt to get at the gcc/clang macro in lib9.h, but if it fails, no big deal. Fixes #324.
2018-11-16libdraw: redo default font construction to be hidpi-safeRuss Cox2-5/+0
If $font is not set, the default font is constructed from font data linked into every libdraw binary. That process was different from the usual openfont code, and so it was not hidpi-aware, resulting in very tiny fonts out of the box on hidpi systems, until users set $font. Fix this by using openfont to construct the default font, by recognizing the name *default* when looking for font and subfont file contents. Then all the hidpi scaling applies automatically. As a side effect, the concept of a 'default subfont' is gone, as are display->defaultsubfont, getdefont, and memgetdefont.
2018-11-15libdraw: add Cursor2, a 32x32 high-res cursorRuss Cox5-1/+22
Also add setcursor2, esetcursor2, and draw protocol encoding. Calls to the old setcursor, esetcursor create a 32x32 by pixel doubling when needed.
2017-01-069term, win: work around bsd linker nonsenseRuss Cox1-0/+2
Change-Id: Ifcef0636ee1e1fd0f9b06a8d1a99d58fae831318 Reviewed-on: https://plan9port-review.googlesource.com/2780 Reviewed-by: Russ Cox <rsc@swtch.com>
2016-11-20include: define _DEFAULT_SOURCEDavid du Colombier1-0/+1
Since glibc 2.20, the _BSD_SOURCE and _SVID_SOURCE macros are deprecated in favor of the _DEFAULT_SOURCE macro. See https://sourceware.org/glibc/wiki/Release/2.20#Packaging_Changes Change-Id: I18dd6a698f3f5aa51d1e45bf53b031bb061e17e8 Reviewed-on: https://plan9port-review.googlesource.com/1500 Reviewed-by: David du Colombier <0intro@gmail.com>
2015-06-03keyboard.h: add some missing key enums from Plan 9mischief1-1/+6
Change-Id: I0d8b94037309b15f839588c6547acaaaf3e2ed4d Reviewed-on: https://plan9port-review.googlesource.com/1151 Reviewed-by: Russ Cox <rsc@google.com>
2015-02-17libdraw: refine hidpi font selectionRuss Cox1-0/+1
Change-Id: Id1e6a2630713024a1925ad1341bb9c846f82e93e Reviewed-on: https://plan9port-review.googlesource.com/1171 Reviewed-by: Russ Cox <rsc@swtch.com>
2015-02-17libdraw: autoscale fonts when moving between low and high dpi screensRuss Cox1-1/+16
Change-Id: I6093955b222db89dfe437fb723593b173d888d01 Reviewed-on: https://plan9port-review.googlesource.com/1170 Reviewed-by: Russ Cox <rsc@swtch.com>
2015-02-17libdraw: add 2*font syntax for scaled fontsRuss Cox1-1/+2
An experiment. Change-Id: I40660a211b8372701597d80f7e86917e94cccbaa Reviewed-on: https://plan9port-review.googlesource.com/1161 Reviewed-by: Russ Cox <rsc@swtch.com>
2012-11-26libdraw: change DefaultDPI to 133Russ Cox1-1/+1
Let's see if that's any better. R=rsc http://codereview.appspot.com/6850103
2012-11-25libframe: auto scale tick for retinaRuss Cox1-2/+2
R=rsc http://codereview.appspot.com/6850102
2012-11-25libdraw: add scalesizeRuss Cox1-0/+1
R=rsc http://codereview.appspot.com/6855092
2012-11-25draw.h: add DefaultDPIRuss Cox1-1/+2
R=rsc http://codereview.appspot.com/6858071
2012-11-25devdraw, libdraw: add display->dpiRuss Cox1-0/+1
Fixed at 100 right now, but the plan is to make it accurate and then use it. R=rsc http://codereview.appspot.com/6856091
2012-10-22libthread: add threadspawndRuss Cox1-0/+1
R=rsc http://codereview.appspot.com/6742064
2012-07-14openbsd updates (thanks Pascal Stumpf)Russ Cox1-0/+2
R=rsc http://codereview.appspot.com/6401049
2012-06-02lib9/dial: add support for IPv6David du Colombier1-1/+1
The function p9dialparse() returns the host as a sockaddr_storage structure instead of a u32int, to be able to handle both IPv4 and IPv6 addresses. Because the sockaddr_storage structure also handle port numbers and Unix path names, there is no longer need to set them in the calling functions. However, these values are still returned for convenience. The sockaddr_in and sockaddr_un structures have been replaced by sockaddr_storage to handle Unix, IPv4 and IPv6 sockets. Names and addresses are resolved using either gethostbyname() or getaddrinfo() functions. The getaddrinfo() function is documented in RFC2553 and standardized since POSIX.1-2001. It supports both IPv4 and IPv6 addresses. The gethostbyname() function is deprecated since POSIX.1-2008. However, some libc implementations don't handle getaddrinfo() properly, thus we preferred to try gethostbyname() first. I've tried to preserve most of the old code logic to prevent from surprising or unwanted behavior. R=rsc http://codereview.appspot.com/6255068
2012-02-19libmach, acid, db: 64-bit supportRuss Cox2-68/+71
2012-01-21libventi: add functions vtsha1 and vtsha1checkDavid du Colombier1-0/+4
These functions are equivalent to vtSha1 and vtSha1Check from the old libventi and are particularly used by Fossil. R=rsc http://codereview.appspot.com/5555064
2011-11-08libventi: add VtEntryNoArchive from liboventi, for use with fossilDavid du Colombier1-0/+1
R=rsc CC=plan9port.codebot http://codereview.appspot.com/5298088
2011-11-08libventi: add functions reconn and redial for use with fossilDavid du Colombier1-0/+2
R=rsc CC=plan9port.codebot http://codereview.appspot.com/5325046
2011-06-13venti.h: import indentation from plan 9David du Colombier1-145/+147
R=rsc CC=plan9port.codebot http://codereview.appspot.com/4571065
2010-12-07delete 9P2000.uRuss Cox2-10/+0
thanks to Erik Quanstrom R=rsc http://codereview.appspot.com/3469042
2010-07-14u.h: add int8, uint8Russ Cox1-0/+2
R=rsc http://codereview.appspot.com/1791044
2010-02-07make flate crc32 work when ulong is 64 bitsRuss Cox2-3/+10
R=, rsc CC= http://codereview.appspot.com/203061
2009-09-13libc.h: update comment for 32-bit RuneRuss Cox1-2/+3
http://codereview.appspot.com/116097
2009-09-13lib9: fix dirread/stat mismatch on Snow LeopardRuss Cox1-0/+3
http://codereview.appspot.com/116096
2009-09-11convert to 4-byte UTF-8 and 32-bit RuneRuss Cox2-4/+5
http://codereview.appspot.com/116075
2009-08-23libavl: import from Plan 9Russ Cox1-0/+27
2009-08-20lib9: dotu fixes in convS2M, convM2STim Newsham1-0/+2
http://codereview.appspot.com/109049
2009-08-14more licensingRuss Cox2-0/+6
2009-08-14more licensingRuss Cox1-0/+2
2009-07-14mergeRuss Cox1-0/+3
2009-07-08mergeRuss Cox1-0/+1