[CONTACT]

[ABOUT]

[POLICY]

git clone dmenu dmenu Log gph

Found at: gopher.r-36.net:70/scm/dmenu/commit/81bcf078f6c510314f140471efb8952160fdb3ad.gph

tmade function signatures more consistent to my coding style - dmenu - Dmenu fork with xft fonts.

git clone git://r-36.net/dmenu

Log

Files

Refs

README

LICENSE

---

commit 81bcf078f6c510314f140471efb8952160fdb3ad

parent 0e5f467aa85e318ed27fc5d6d3826426a06ef3c3

Author: Anselm R. Garbe

Date:   Tue, 12 Sep 2006 10:59:00 +0200
made function signatures more consistent to my coding style
Diffstat:
  draw.c                              |      15 +++++----------
  main.c                              |      18 ++++++------------
  util.c                              |      12 ++++--------
3 files changed, 15 insertions(+), 30 deletions(-)
---

diff --git a/draw.c b/draw.c

t@@ -10,8 +10,7 @@
 /* static */
 static unsigned int
-textnw(const char *text, unsigned int len)
-{
+textnw(const char *text, unsigned int len) {
         XRectangle r;
         if(dc.font.set) {
t@@ -24,8 +23,7 @@ textnw(const char *text, unsigned int len)
 /* extern */
 void
-drawtext(const char *text, unsigned long col[ColLast])
-{
+drawtext(const char *text, unsigned long col[ColLast]) {
         int x, y, w, h;
         static char buf[256];
         unsigned int len, olen;
t@@ -78,8 +76,7 @@ drawtext(const char *text, unsigned long col[ColLast])
 }
 unsigned long
-getcolor(const char *colstr)
-{
+getcolor(const char *colstr) {
         Colormap cmap = DefaultColormap(dpy, screen);
         XColor color;
t@@ -88,8 +85,7 @@ getcolor(const char *colstr)
 }
 void
-setfont(const char *fontstr)
-{
+setfont(const char *fontstr) {
         char **missing, *def;
         int i, n;
t@@ -137,7 +133,6 @@ setfont(const char *fontstr)
 }
 unsigned int
-textw(const char *text)
-{
+textw(const char *text) {
         return textnw(text, strlen(text)) + dc.font.height;
 }

diff --git a/main.c b/main.c

t@@ -42,8 +42,7 @@ static Window root;
 static Window win;
 static void
-calcoffsets()
-{
+calcoffsets() {
         unsigned int tw, w;
         if(!curr)
t@@ -71,8 +70,7 @@ calcoffsets()
 }
 static void
-drawmenu()
-{
+drawmenu() {
         Item *i;
         dc.x = 0;
t@@ -110,8 +108,7 @@ drawmenu()
 }
 static void
-match(char *pattern)
-{
+match(char *pattern) {
         unsigned int plen;
         Item *i, *j;
t@@ -151,8 +148,7 @@ match(char *pattern)
 }
 static void
-kpress(XKeyEvent * e)
-{
+kpress(XKeyEvent * e) {
         char buf[32];
         int num, prev_nitem;
         unsigned int i, len;
t@@ -251,8 +247,7 @@ kpress(XKeyEvent * e)
 }
 static char *
-readstdin()
-{
+readstdin() {
         static char *maxname = NULL;
         char *p, buf[1024];
         unsigned int len = 0, max = 0;
t@@ -289,8 +284,7 @@ Display *dpy;
 DC dc = {0};
 int
-main(int argc, char *argv[])
-{
+main(int argc, char *argv[]) {
         char *maxname;
         fd_set rd;
         struct timeval timeout;

diff --git a/util.c b/util.c

t@@ -13,16 +13,14 @@
 /* static */
 static void
-badmalloc(unsigned int size)
-{
+badmalloc(unsigned int size) {
         eprint("fatal: could not malloc() %u bytes\n", size);
 }
 /* extern */
 void *
-emalloc(unsigned int size)
-{
+emalloc(unsigned int size) {
         void *res = malloc(size);
         if(!res)
                 badmalloc(size);
t@@ -30,8 +28,7 @@ emalloc(unsigned int size)
 }
 void
-eprint(const char *errstr, ...)
-{
+eprint(const char *errstr, ...) {
         va_list ap;
         va_start(ap, errstr);
t@@ -41,8 +38,7 @@ eprint(const char *errstr, ...)
 }
 char *
-estrdup(const char *str)
-{
+estrdup(const char *str) {
         void *res = strdup(str);
         if(!res)
                 badmalloc(strlen(str));
.


AD: