i3
Macros | Functions | Variables
display_version.c File Reference
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <fcntl.h>
#include "all.h"
Include dependency graph for display_version.c:

Go to the source code of this file.

Macros

#define I3__FILE__   "key_press.c"

Functions

static int version_string (void *ctx, const unsigned char *val, unsigned int len)
static int version_map_key (void *ctx, const unsigned char *stringval, unsigned int stringlen)
void display_running_version (void)
 Connects to i3 to find out the currently running version.

Variables

static bool human_readable_key
static char * human_readable_version
static yajl_callbacks version_callbacks

Macro Definition Documentation

#define I3__FILE__   "key_press.c"

Definition at line 2 of file display_version.c.

Function Documentation

void display_running_version ( void  )

Connects to i3 to find out the currently running version.

Useful since it might be different from the version compiled into this binary (maybe the user didn’t correctly install i3 or forgot te restart it).

The output looks like this: Running i3 version: 4.2-202-gb8e782c (2012-08-12, branch "next") (pid 14804)

The i3 binary you just called: /home/michael/i3/i3 The i3 binary you are running: /home/michael/i3/i3

Definition at line 70 of file display_version.c.

References human_readable_version, ipc_recv_message(), ipc_send_message(), root_atom_contents(), and state.

Referenced by main().

Here is the call graph for this function:

static int version_map_key ( void *  ctx,
const unsigned char *  stringval,
unsigned int  stringlen 
)
static

Definition at line 37 of file display_version.c.

References human_readable_key.

static int version_string ( void *  ctx,
const unsigned char *  val,
unsigned int  len 
)
static

Definition at line 27 of file display_version.c.

References human_readable_key, human_readable_version, and sasprintf().

Here is the call graph for this function:

Variable Documentation

bool human_readable_key
static

Definition at line 21 of file display_version.c.

Referenced by version_map_key(), and version_string().

char* human_readable_version
static

Definition at line 22 of file display_version.c.

Referenced by display_running_version(), and version_string().

yajl_callbacks version_callbacks
static
Initial value:
{
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL
}

Definition at line 44 of file display_version.c.