toolbox

Check-in [8648f0c046]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:rss: remove useless variable
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 8648f0c046ae226fc7e73d338b0a45bcb4bda1a7ac6e7e351d79ace926b4b84d
User & Date: jef 2020-06-10 04:19:09
Context
2020-06-15
19:14
soudnmachine: switch to mpv Leaf check-in: 7d897a0e08 user: jef tags: trunk
2020-06-10
04:19
rss: remove useless variable check-in: 8648f0c046 user: jef tags: trunk
2020-05-02
09:16
lib: switch to TAILQ for jtlst implementation for openbsd compatibility check-in: f070c34d00 user: jef tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/rss/feeds.c.

27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
..
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96

void
feeds_display()
{
	sqlite3_stmt *res;
	char *title, *desc, *link, *feedlink, *json;
	cJSON *feeds, *feed, *jstitle, *jsdesc, *jslink, *jsfeedlink;
	int step;

	feeds = cJSON_CreateArray();
	if (feeds == NULL)
		goto jsonerr;
	db_open();
	res = db_prepare("SELECT title, description, link, feedlink FROM feeds;");
	while ((step = sqlite3_step(res)) == SQLITE_ROW) {
		title = (char *) sqlite3_column_text(res, 0);
		desc = (char *) sqlite3_column_text(res, 1);
		link = (char *) sqlite3_column_text(res, 2);
		feedlink = (char *) sqlite3_column_text(res, 3);

		feed = cJSON_CreateObject();
		jstitle = cJSON_CreateString(title);
................................................................................

static struct feedlinks *
feeds_get_feedlinks()
{
	struct feedlinks *feedlinks;
	struct feedlink *feedlink;
	sqlite3_stmt *res;
	int step;

	feedlinks = xcalloc(1, sizeof(struct feedlinks));
	TAILQ_INIT(feedlinks);

	db_open();
	res = db_prepare("SELECT feedlink FROM feeds;");
	while ((step = sqlite3_step(res)) == SQLITE_ROW) {
		feedlink = xcalloc(1, sizeof(struct feedlink));
		feedlink->url = xstrdup((char *) sqlite3_column_text(res, 0));
		TAILQ_INSERT_TAIL(feedlinks, feedlink, next);
	}
	sqlite3_finalize(res);
	db_close();








<






|







 







<






|







27
28
29
30
31
32
33

34
35
36
37
38
39
40
41
42
43
44
45
46
47
..
74
75
76
77
78
79
80

81
82
83
84
85
86
87
88
89
90
91
92
93
94

void
feeds_display()
{
	sqlite3_stmt *res;
	char *title, *desc, *link, *feedlink, *json;
	cJSON *feeds, *feed, *jstitle, *jsdesc, *jslink, *jsfeedlink;


	feeds = cJSON_CreateArray();
	if (feeds == NULL)
		goto jsonerr;
	db_open();
	res = db_prepare("SELECT title, description, link, feedlink FROM feeds;");
	while (sqlite3_step(res) == SQLITE_ROW) {
		title = (char *) sqlite3_column_text(res, 0);
		desc = (char *) sqlite3_column_text(res, 1);
		link = (char *) sqlite3_column_text(res, 2);
		feedlink = (char *) sqlite3_column_text(res, 3);

		feed = cJSON_CreateObject();
		jstitle = cJSON_CreateString(title);
................................................................................

static struct feedlinks *
feeds_get_feedlinks()
{
	struct feedlinks *feedlinks;
	struct feedlink *feedlink;
	sqlite3_stmt *res;


	feedlinks = xcalloc(1, sizeof(struct feedlinks));
	TAILQ_INIT(feedlinks);

	db_open();
	res = db_prepare("SELECT feedlink FROM feeds;");
	while (sqlite3_step(res) == SQLITE_ROW) {
		feedlink = xcalloc(1, sizeof(struct feedlink));
		feedlink->url = xstrdup((char *) sqlite3_column_text(res, 0));
		TAILQ_INSERT_TAIL(feedlinks, feedlink, next);
	}
	sqlite3_finalize(res);
	db_close();