Commit 2860baf3 authored by Sebastian Ramacher's avatar Sebastian Ramacher

Clean up

Signed-off-by: default avatarSebastian Ramacher <sebastian@ramacher.at>
parent 28fd73c1
/* See LICENSE file for license and copyright information */
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include "config.h"
#include "commands.h"
#include "datastructures.h"
#include "internal.h"
#include "session.h"
#include "settings.h"
#include "shortcuts.h"
#include "utils.h"
#include "template.h"
#include "utils.h"
#define COMMENT_PREFIX "\"#"
......
......@@ -412,8 +412,7 @@ girara_template_set_variable_value(GiraraTemplate* object, const char* name,
return;
}
if (g_strcmp0(variable->value, value) != 0)
{
if (g_strcmp0(variable->value, value) != 0) {
g_free(variable->value);
variable->value = g_strdup(value);
......
......@@ -195,48 +195,6 @@ girara_file_open(const char* path, const char* mode)
}
return fp;
/* TODO */
/*FILE* fp;*/
/*struct stat lstat;*/
/*struct stat fstat;*/
/*int fd;*/
/*char* mode = "rb+";*/
/*if (lstat(path, &lstat) == -1) {*/
/*if (errno != ENOENT) {*/
/*return NULL;*/
/*}*/
/*if ((fd = open(path, O_CREAT | O_EXCL | O_RDWR, 0600)) == -1) {*/
/*return NULL;*/
/*}*/
/*mode = "wb";*/
/*} else {*/
/*if ((fd = open(path, O_RDONLY)) == -1) {*/
/*return NULL;*/
/*}*/
/*if (fstat(fd, &fstat) == -1) {*/
/*if (lstat.st_mode != fstat.st_mode ||*/
/*lstat.st_ino != fstat.st_ino ||*/
/*lstat.st_dev != fstat.st_dev) {*/
/*close(fd);*/
/*return NULL;*/
/*}*/
/*}*/
/*ftruncate(fd, 0);*/
/*}*/
/*if ((fp = fdopen(fd, mode)) == NULL) {*/
/*close(fd);*/
/*unlink(path);*/
/*return NULL;*/
/*}*/
/*return fp;*/
}
#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment