summary refs log tree commit diff stats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #4964 from jangko/orderedtable_initialsizeAndreas Rumpf2016-10-271-1/+1
|\ | | | | fixes #4940
| * fixes #4940andri lim2016-10-271-1/+1
| |
* | fixes #4915andri lim2016-10-271-4/+4
|/
* fixed == and cmp to work on nimvmArne Döring2016-10-261-25/+33
|
* Fixes #4959.Dominik Picheta2016-10-261-0/+10
|
* Mark socketError as gcsafeYuriy Glukhov2016-10-261-1/+1
|
* Fixes #4946Felix Krause2016-10-241-0/+1
|
* Merge pull request #4888 from arnetheduck/mmap-fixesAndreas Rumpf2016-10-241-3/+10
|\ | | | | add MAP_ANONYMOUS const for amd64, fix MAP_PRIVATE on mips etc
| * add MAP_ANONYMOUS const for amd64, fix MAP_PRIVATE on mips etc (see fe36254)Jacek Sieka2016-10-121-3/+10
| |
* | Merge pull request #4924 from nigredo-tori/fix-4917Andreas Rumpf2016-10-241-9/+47
|\ \ | | | | | | Make createDir return discardable bool
| * | Improve as previously discussedDmitry Polienko2016-10-221-11/+21
| | | | | | | | | | | | Better name for exposed primitive function, checks for pre-existing files
| * | Make `createDir` more robustDmitry Polienko2016-10-221-1/+3
| | | | | | | | | | | | | | | Should now properly work for root directories on Windows (after isAbsolute is fixed)
| * | Revert createDir signature, expose rawCreateDirDmitry Polienko2016-10-221-12/+15
| | |
| * | Fix for unix and solarisDmitry Polienko2016-10-221-6/+5
| | |
| * | Make createDir return discardable boolDmitry Polienko2016-10-221-11/+35
| | |
* | | asynchttpserver: cleanup example codeAraq2016-10-241-1/+1
| | |
* | | Merge pull request #4847 from honewatson/patch-1Andreas Rumpf2016-10-241-0/+11
|\ \ \ | | | | | | | | Add respond proc example
| * | | Add respond proc examplehonewatson2016-10-031-0/+11
| | | | | | | | | | | | Add an example for the respond proc demonstration JSON response.
* | | | Merge pull request #4945 from arnetheduck/cleanup-tyXxxAndreas Rumpf2016-10-242-4/+3
|\ \ \ \ | | | | | | | | | | Cleanup ty xxx
| * | | | clean up tyMutable remnantsJacek Sieka2016-10-241-2/+2
| | | | |
| * | | | clean up tyConst remnantsJacek Sieka2016-10-241-1/+1
| | | | |
| * | | | clean up tyBigNum remnantsJacek Sieka2016-10-242-3/+2
| | | | |
* | | | | Merge pull request #4814 from scriptum/rpg-pcre-jitAndreas Rumpf2016-10-242-4/+13
|\ \ \ \ \ | | | | | | | | | | | | Enable JIT in PCRE to improve regular expressions performance
| * | | | | Remove TODO for PCRE JITPavel Roschin2016-10-101-1/+0
| | | | | |
| * | | | | Enable JIT in PCRE to improve regular expressions performancePavel Roschin2016-09-232-3/+13
| | | | | |
* | | | | | Merge pull request #4819 from andreaferretti/usefulmacrosAndreas Rumpf2016-10-242-0/+45
|\ \ \ \ \ \ | | | | | | | | | | | | | | Some useful macros
| * | | | | | Removed use of stmtAndrea Ferretti2016-09-251-1/+1
| | | | | | |
| * | | | | | Added expandMacros macroAndrea Ferretti2016-09-221-0/+24
| | | | | | |
| * | | | | | Added a dump macro for debuggingAndrea Ferretti2016-09-221-0/+21
| | | | | | |
* | | | | | | Merge pull request #4812 from andreaferretti/jsconsoleAndreas Rumpf2016-10-241-0/+44
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Added js console object
| * | | | | | | New version of js console using macros - avoid the use of .apply methodAndrea Ferretti2016-10-061-4/+22
| | | | | | | |
| * | | | | | | Updated js console logging to avoid wrapping into arrayAndrea Ferretti2016-10-061-17/+4
| | | | | | | |
| * | | | | | | Update to allow varargs in js console loggingAndrea Ferretti2016-09-221-1/+8
| | | | | | | |
| * | | | | | | Added js console objectAndrea Ferretti2016-09-211-0/+32
| |/ / / / / /
* | | | | | | Merge pull request #4943 from nigredo-tori/fix-4942Andreas Rumpf2016-10-241-2/+4
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Reset HttpClient if new URL has different port
| * | | | | | | Reset HttpClient if new URL has different portDmitry Polienko2016-10-241-2/+4
| | | | | | | |
* | | | | | | | Merge pull request #4935 from flyx/tablefixAndreas Rumpf2016-10-241-4/+37
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Table fixes. fixes #4901
| * | | | | | | | Table fixes. fixes #4901Felix Krause2016-10-231-4/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * added `==` for OrderedTable, CountTable and the *Ref types * added missing documentation to all `==` procs * fixed clear() for OrderedTables, which did not work because `var` does not work well with `|` * added tests
* | | | | | | | | Merge pull request #4938 from FedericoCeratto/unittestAndreas Rumpf2016-10-241-3/+21
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Improve unittest docs
| * | | | | | | | | Improve unittest docsFederico Ceratto2016-10-231-3/+21
| |/ / / / / / / /
* | | | | | | | | Merge pull request #4937 from cheatfate/newosAndreas Rumpf2016-10-241-36/+125
|\ \ \ \ \ \ \ \ \ | |_|_|_|_|/ / / / |/| | | | | | | | Some changes to os.nim
| * | | | | | | | Fix for getCurrentDir().cheatfate2016-10-231-36/+125
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix for expandFilename(). Fix for getAppFilename().
* | / / / / / / remove remnants of tyIterJacek Sieka2016-10-241-1/+1
| |/ / / / / / |/| | | | | |
* | | | | | | fixes #4386Andreas Rumpf2016-10-231-2/+2
|/ / / / / /
* | | | | | Merge pull request #4931 from nigredo-tori/fix-4929Andreas Rumpf2016-10-221-2/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix isAbsolute for Windows root directories
| * | | | | | Fix isAbsolute for Windows root directoriesDmitry Polienko2016-10-221-2/+2
| | |_|_|/ / | |/| | | |
* | | | | | Merge pull request #4932 from cheatfate/fix4928Andreas Rumpf2016-10-221-5/+5
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix #4928
| * | | | | | Fix #4928cheatfate2016-10-221-5/+5
| | | | | | |
* | | | | | | Merge pull request #4923 from jdbernard/set-dst-properly-in-times-parseDominik Picheta2016-10-221-6/+12
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | Fix #4922, bug in times.parse, mishandling DST.
| * | | | | | Fix #4922, bug in times.parse, mishandling DST.Jonathan Bernard2016-10-211-6/+12
| |/ / / / /
k">return -1; } /* extern */ int getproto(Window w) { int i, format, protos, status; unsigned long extra, res; Atom *protocols, real; protos = 0; status = XGetWindowProperty(dpy, w, wmatom[WMProtocols], 0L, 20L, False, XA_ATOM, &real, &format, &res, &extra, (unsigned char **)&protocols); if(status != Success || protocols == 0) return protos; for(i = 0; i < res; i++) if(protocols[i] == wmatom[WMDelete]) protos |= PROTODELWIN; free(protocols); return protos; } void sendevent(Window w, Atom a, long value) { XEvent e; e.type = ClientMessage; e.xclient.window = w; e.xclient.message_type = a; e.xclient.format = 32; e.xclient.data.l[0] = value; e.xclient.data.l[1] = CurrentTime; XSendEvent(dpy, w, False, NoEventMask, &e); XSync(dpy, False); } void quit(Arg *arg) { readin = running = False; } /* * There's no way to check accesses to destroyed windows, thus those cases are * ignored (especially on UnmapNotify's). Other types of errors call Xlibs * default error handler, which may call exit. */ int xerror(Display *dpy, XErrorEvent *ee) { if(ee->error_code == BadWindow || (ee->request_code == X_SetInputFocus && ee->error_code == BadMatch) || (ee->request_code == X_PolyText8 && ee->error_code == BadDrawable) || (ee->request_code == X_PolyFillRectangle && ee->error_code == BadDrawable) || (ee->request_code == X_PolySegment && ee->error_code == BadDrawable) || (ee->request_code == X_ConfigureWindow && ee->error_code == BadMatch) || (ee->request_code == X_GrabKey && ee->error_code == BadAccess) || (ee->request_code == X_CopyArea && ee->error_code == BadDrawable)) return 0; fprintf(stderr, "dwm: fatal error: request code=%d, error code=%d\n", ee->request_code, ee->error_code); return xerrorxlib(dpy, ee); /* may call exit */ } int main(int argc, char *argv[]) { int r, xfd; fd_set rd; if(argc == 2 && !strncmp("-v", argv[1], 3)) { fputs("dwm-"VERSION", (C)opyright MMVI Anselm R. Garbe\n", stdout); exit(EXIT_SUCCESS); } else if(argc != 1) eprint("usage: dwm [-v]\n"); dpy = XOpenDisplay(0); if(!dpy) eprint("dwm: cannot open display\n"); xfd = ConnectionNumber(dpy); screen = DefaultScreen(dpy); root = RootWindow(dpy, screen); otherwm = False; XSetErrorHandler(xerrorstart); /* this causes an error if some other window manager is running */ XSelectInput(dpy, root, SubstructureRedirectMask); XSync(dpy, False); if(otherwm) eprint("dwm: another window manager is already running\n"); XSync(dpy, False); XSetErrorHandler(NULL); xerrorxlib = XSetErrorHandler(xerror); XSync(dpy, False); setup(); drawstatus(); scan(); /* main event loop, also reads status text from stdin */ XSync(dpy, False); procevent(); readin = True; while(running) { FD_ZERO(&rd); if(readin) FD_SET(STDIN_FILENO, &rd); FD_SET(xfd, &rd); r = select(xfd + 1, &rd, NULL, NULL, NULL); if((r == -1) && (errno == EINTR)) continue; if(r > 0) { if(readin && FD_ISSET(STDIN_FILENO, &rd)) { readin = NULL != fgets(stext, sizeof(stext), stdin); if(readin) stext[strlen(stext) - 1] = 0; else strcpy(stext, "broken pipe"); drawstatus(); } } else if(r < 0) eprint("select failed\n"); procevent(); } cleanup(); XCloseDisplay(dpy); return 0; }