Autoformat
This commit is contained in:
@@ -16,7 +16,8 @@ bool asana_init(char *pat) {
|
|||||||
curl = curl_easy_init();
|
curl = curl_easy_init();
|
||||||
if (!curl) return false;
|
if (!curl) return false;
|
||||||
|
|
||||||
snprintf(asana_auth_header_str, AUTH_HEADER_SIZE, "Authorization: Bearer %s", pat);
|
snprintf(asana_auth_header_str, AUTH_HEADER_SIZE, "Authorization: Bearer %s",
|
||||||
|
pat);
|
||||||
asana_auth_header = curl_slist_append(NULL, asana_auth_header_str);
|
asana_auth_header = curl_slist_append(NULL, asana_auth_header_str);
|
||||||
|
|
||||||
if (!asana_auth_header) return false;
|
if (!asana_auth_header) return false;
|
||||||
@@ -30,7 +31,8 @@ void asana_cleanup() {
|
|||||||
curl_global_cleanup();
|
curl_global_cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t asana_write_callback(void *contents, size_t size, size_t nmemb, void *resp) {
|
size_t asana_write_callback(void *contents, size_t size, size_t nmemb,
|
||||||
|
void *resp) {
|
||||||
Response *response = (Response *)resp;
|
Response *response = (Response *)resp;
|
||||||
|
|
||||||
size_t realsize = size * nmemb;
|
size_t realsize = size * nmemb;
|
||||||
@@ -72,4 +74,3 @@ void asana_free_response(Response *r) {
|
|||||||
free(r->body);
|
free(r->body);
|
||||||
free(r);
|
free(r);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
7
ncac.c
7
ncac.c
@@ -1,13 +1,12 @@
|
|||||||
#include "ncac.h"
|
#include "ncac.h"
|
||||||
|
|
||||||
#include <curses.h>
|
#include <curses.h>
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <term.h>
|
#include <term.h>
|
||||||
|
|
||||||
#include "ui/base.h"
|
|
||||||
#include "asana/fetch.h"
|
#include "asana/fetch.h"
|
||||||
|
#include "ui/base.h"
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
setup();
|
setup();
|
||||||
@@ -17,7 +16,7 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
char input;
|
char input;
|
||||||
|
|
||||||
while(1) {
|
while (1) {
|
||||||
switch (input = getch()) {
|
switch (input = getch()) {
|
||||||
case 'a':
|
case 'a':
|
||||||
draw_text("Hello, world!", &curs_x, &curs_y);
|
draw_text("Hello, world!", &curs_x, &curs_y);
|
||||||
|
|||||||
Reference in New Issue
Block a user