<html lang='en'>
<head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
<title>
GitLab
</title>
</meta>
</head>
<style>
img {
max-width: 100%;
height: auto;
}
p.details {
font-style:italic;
color:#777
}
.footer p {
font-size:small;
color:#777
}
pre.commit-message {
white-space: pre-wrap;
}
.file-stats a {
text-decoration: none;
}
.file-stats .new-file {
color: #090;
}
.file-stats .deleted-file {
color: #B00;
}
</style>
<body>
<div class='content'>
<h3>
Andrew Price pushed to branch master
at <a href="https://projects.sucs.org/arthur/mw">Justin Mitchell / mw</a>
</h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://projects.sucs.org/arthur/mw/commit/1be3f67d31c40ab57979494c1fc35f666bf245d0">1be3f67d</a></strong>
<div>
<span>by Andrew Price</span>
<i>at 2016-03-03T21:43:11+00:00</i>
</div>
<pre class='commit-message'>Remove the hashtag logging stuff
Experiment: success
Conclusion: no</pre>
</li>
</ul>
<h4>1 changed file:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
src/client/log.c
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://projects.sucs.org/arthur/mw/commit/1be3f67d31c40ab57979494c1fc35f666bf245d0#diff-0'>
<strong>
src/client/log.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/src/client/log.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/src/client/log.c
</span><span style="color: #aaaaaa">@@ -17,7 +17,6 @@
</span>
extern struct user * const user;
static void *file_url(void * data);
<span style="color: #000000;background-color: #ffdddd">-static void *file_tag(void * data);
</span>
/*
* Check whats said for URLs and log them
<span style="color: #aaaaaa">@@ -27,7 +26,7 @@ struct uripatt {
</span> const char *regex;
int regflags; /* compile flags */
regex_t *patt; /* compiled version */
<span style="color: #000000;background-color: #ffdddd">- enum { END=0, URL, FLAG, IGNORE, NOLOG, TAG } type;
</span><span style="color: #000000;background-color: #ddffdd">+ enum { END=0, URL, FLAG, IGNORE, NOLOG } type;
</span> uint32_t flags;
};
<span style="color: #aaaaaa">@@ -54,15 +53,6 @@ struct uripatt urilist[] = {
</span> {"^-log", REG_ICASE, NULL, NOLOG, 0},
{"^(-log)$", REG_ICASE, NULL, NOLOG, 0},
{"^(nolog)$", REG_ICASE, NULL, NOLOG, 0},
<span style="color: #000000;background-color: #ffdddd">- /* section for hashtags, exclude C preprocessor directives */
- {"^#include$", REG_ICASE, NULL, IGNORE, 0},
- {"^#define$", REG_ICASE, NULL, IGNORE, 0},
- {"^#pragma$", REG_ICASE, NULL, IGNORE, 0},
- {"^#if$", REG_ICASE, NULL, IGNORE, 0},
- {"^#ifdef$", REG_ICASE, NULL, IGNORE, 0},
- {"^#ifndef$", REG_ICASE, NULL, IGNORE, 0},
- {"^#endif$", REG_ICASE, NULL, IGNORE, 0},
- {"^#[[:alnum:]]+$", REG_ICASE|REG_EXTENDED, NULL, TAG, 0},
</span> { NULL, 0, NULL, END, 0 }
};
<span style="color: #aaaaaa">@@ -71,11 +61,6 @@ struct urihit {
</span> uint32_t flags;
};
<span style="color: #000000;background-color: #ffdddd">-struct taghit {
- char *tag;
- char *line;
-};
-
</span> void catchuri(const char *what)
{
char *text = strip_colours(what);
<span style="color: #aaaaaa">@@ -83,8 +68,6 @@ void catchuri(const char *what)
</span> /* kludge, find at most 20 URLs */
char *foundurl[20];
int nfoundurl=0;
<span style="color: #000000;background-color: #ffdddd">- char *foundtag[20];
- int nfoundtag=0;
</span> uint32_t flags = 0;
/* split the line into words on whitespace */
<span style="color: #aaaaaa">@@ -128,9 +111,6 @@ void catchuri(const char *what)
</span> free(text);
return;
}
<span style="color: #000000;background-color: #ffdddd">- if (u->type == TAG) {
- if (nfoundtag < 20) foundtag[nfoundtag++] = token;
- }
</span> }
u++;
}
<span style="color: #aaaaaa">@@ -156,24 +136,6 @@ void catchuri(const char *what)
</span> }
pthread_attr_destroy(&ptattr);
}
<span style="color: #000000;background-color: #ffdddd">-
- /* we also found some tags */
- if (nfoundtag>0) {
- int i;
- pthread_attr_t ptattr;
-
- pthread_attr_init(&ptattr);
- pthread_attr_setdetachstate(&ptattr, PTHREAD_CREATE_DETACHED);
- for (i=0;i<nfoundtag;i++) {
- struct taghit *tag;
- pthread_t pt;
- tag = malloc(sizeof(struct taghit));
- tag->tag = strdup(foundtag[i]);
- tag->line = strdup(what);
- pthread_create(&pt, &ptattr, file_tag, tag);
- }
- pthread_attr_destroy(&ptattr);
- }
</span> free(text);
}
<span style="color: #aaaaaa">@@ -321,32 +283,6 @@ static void *file_url(void * data)
</span> return NULL;
}
<span style="color: #000000;background-color: #ffdddd">-static void *file_tag(void * data)
-{
- struct taghit *tag = data;
- struct db_result *res;
-
- char *query = sqlite3_mprintf("INSERT INTO mwtag (user, tag, added, line) "
- "VALUES (%Q,%Q,datetime('now'),%Q)",
- user->record.name, tag->tag, tag->line);
- res = db_query(MWURI_DB, query, 1);
- if (res == NULL) {
- res = db_query(MWURI_DB, "CREATE TABLE mwtag "
- "(id INTEGER PRIMARY KEY AUTOINCREMENT, "
- "user TEXT, tag TEXT, added TEXT, line TEXT)", 0);
- if (res != NULL) {
- db_free(res);
- res = db_query(MWURI_DB, query, 0);
- }
- }
- db_free(res);
- sqlite3_free(query);
- free(tag->tag);
- free(tag->line);
- free(tag);
- return NULL;
-}
-
</span> /* store the doing/status string in the db */
void catchdoing(const char *what)
{
</code></pre>
<br>
</li>
</div>
<div class='footer' style='margin-top: 10px;'>
<p>
—
<br>
<a href="https://projects.sucs.org/arthur/mw/commit/1be3f67d31c40ab57979494c1fc35f666bf245d0">View it on GitLab</a>.
<br>
You're receiving this email because of your account on projects.sucs.org.
If you'd like to receive fewer emails, you can
adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Commit","url":"https://projects.sucs.org/arthur/mw/commit/1be3f67d31c40ab57979494c1fc35f666bf245d0"}}</script>
</p>
</div>
</body>
</html>