True, False are X11-specific, make sure to use c99 stdbool for
program-specific things.
... also remove left-over vim mode string in config.
/* See LICENSE file for copyright and license details. */
/* See LICENSE file for copyright and license details. */
-/* vim: expandtab
- */
-/* Default settings; can be overrided by command line. */
+/* Default settings; can be overriden by command line. */
-static Bool topbar = True; /* -b option; if False, dmenu appears at bottom */
+static bool topbar = true; /* -b option; if False, dmenu appears at bottom */
/* -fn option overrides fonts[0]; default X11 font or font set */
static const char *fonts[] = {
"monospace:size=10"
/* -fn option overrides fonts[0]; default X11 font or font set */
static const char *fonts[] = {
"monospace:size=10"
/* See LICENSE file for copyright and license details. */
#include <ctype.h>
#include <locale.h>
/* See LICENSE file for copyright and license details. */
#include <ctype.h>
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct Item {
char *text;
Item *left, *right;
struct Item {
char *text;
Item *left, *right;
};
static void appenditem(Item *item, Item **list, Item **last);
};
static void appenditem(Item *item, Item **list, Item **last);
int
main(int argc, char *argv[]) {
int
main(int argc, char *argv[]) {
int i;
for(i = 1; i < argc; i++)
int i;
for(i = 1; i < argc; i++)
exit(0);
}
else if(!strcmp(argv[i], "-b")) /* appears at the bottom of the screen */
exit(0);
}
else if(!strcmp(argv[i], "-b")) /* appears at the bottom of the screen */
else if(!strcmp(argv[i], "-f")) /* grabs keyboard before reading stdin */
else if(!strcmp(argv[i], "-f")) /* grabs keyboard before reading stdin */
else if(!strcmp(argv[i], "-i")) { /* case-insensitive item matching */
fstrncmp = strncasecmp;
fstrstr = cistrstr;
else if(!strcmp(argv[i], "-i")) { /* case-insensitive item matching */
fstrncmp = strncasecmp;
fstrstr = cistrstr;
int x = 0, y = 0, h = bh, w;
drw_setscheme(drw, &scheme[SchemeNorm]);
int x = 0, y = 0, h = bh, w;
drw_setscheme(drw, &scheme[SchemeNorm]);
- drw_rect(drw, 0, 0, mw, mh, True, 1, 1);
+ drw_rect(drw, 0, 0, mw, mh, 1, 1, 1);
if(prompt && *prompt) {
drw_setscheme(drw, &scheme[SchemeSel]);
if(prompt && *prompt) {
drw_setscheme(drw, &scheme[SchemeSel]);
break;
case XK_Right:
if(text[cursor] != '\0') {
break;
case XK_Right:
if(text[cursor] != '\0') {
*p = '\0';
if(!(items[i].text = strdup(buf)))
die("cannot strdup %u bytes:", strlen(buf)+1);
*p = '\0';
if(!(items[i].text = strdup(buf)))
die("cannot strdup %u bytes:", strlen(buf)+1);
if(strlen(items[i].text) > max)
max = strlen(maxstr = items[i].text);
}
if(strlen(items[i].text) > max)
max = strlen(maxstr = items[i].text);
}