workspace->type = CT_WORKSPACE;
FREE(workspace->name);
workspace->name = sstrdup(num);
- /* We set ->num to the number if this workspace’s name consists only of
- * a positive number. Otherwise it’s a named ws and num will be -1. */
+ /* We set ->num to the number if this workspace’s name begins with a
+ * positive number. Otherwise it’s a named ws and num will be -1. */
char *endptr = NULL;
long parsed_num = strtol(num, &endptr, 10);
if (parsed_num == LONG_MIN ||
* Focuses the next workspace.
*
*/
-Con* workspace_next() {
+Con* workspace_next(void) {
Con *current = con_get_workspace(focused);
Con *next = NULL;
Con *output;
* Focuses the previous workspace.
*
*/
-Con* workspace_prev() {
+Con* workspace_prev(void) {
Con *current = con_get_workspace(focused);
Con *prev = NULL;
Con *output;
* Focuses the next workspace on the same output.
*
*/
-Con* workspace_next_on_output() {
+Con* workspace_next_on_output(void) {
Con *current = con_get_workspace(focused);
Con *next = NULL;
Con *output = con_get_output(focused);
* Focuses the previous workspace on same output.
*
*/
-Con* workspace_prev_on_output() {
+Con* workspace_prev_on_output(void) {
Con *current = con_get_workspace(focused);
Con *prev = NULL;
Con *output = con_get_output(focused);
+ DLOG("output = %s\n", output->name);
if (current->num == -1) {
/* If named workspace, find previous named workspace. */
* Focuses the previously focused workspace.
*
*/
-void workspace_back_and_forth() {
+void workspace_back_and_forth(void) {
if (!previous_workspace_name) {
DLOG("No previous workspace name set. Not switching.");
return;