Add documentation for workspace_get()

This commit is contained in:
Michael Stapelberg 2009-09-27 15:20:47 +02:00
parent f38809288a
commit 9b1699f4c4
2 changed files with 12 additions and 1 deletions

View File

@ -16,7 +16,12 @@
#ifndef _WORKSPACE_H
#define _WORKSPACE_H
/**
* Returns a pointer to the workspace with the given number (starting at 0),
* creating the workspace if necessary (by allocating the necessary amount of
* memory and initializing the data structures correctly).
*
*/
Workspace *workspace_get(int number);
/**

View File

@ -27,6 +27,12 @@
#include "workspace.h"
#include "client.h"
/*
* Returns a pointer to the workspace with the given number (starting at 0),
* creating the workspace if necessary (by allocating the necessary amount of
* memory and initializing the data structures correctly).
*
*/
Workspace *workspace_get(int number) {
if (number > (num_workspaces-1)) {
int old_num_workspaces = num_workspaces;