aboutsummaryrefslogtreecommitdiff
path: root/c
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-04-01 19:48:29 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-04-01 19:48:29 +0200
commitbc9ee9be4d6c164687f1797215f1ea3177ef5bb2 (patch)
treede97d2b0f2a04d6b6649eb8b4d6c0a305e459da1 /c
parent226b05d4bdcff492070e715bf0cbd719eb98ac06 (diff)
downloadEpisodeBrowser-bc9ee9be4d6c164687f1797215f1ea3177ef5bb2.tar.gz
Adjust formatting.
Diffstat (limited to 'c')
-rw-r--r--c/datalistview.c4
-rw-r--r--c/defs.h4
-rw-r--r--c/episodelistview.c11
-rw-r--r--c/listview.c2
-rw-r--r--c/main.c2
5 files changed, 11 insertions, 12 deletions
diff --git a/c/datalistview.c b/c/datalistview.c
index 637350d..efeb7d4 100644
--- a/c/datalistview.c
+++ b/c/datalistview.c
@@ -75,7 +75,7 @@ DlvShowEpisode(int iEpisode)
tszKey = TszFromSz(szKey, CP_UTF8);
if (!tszKey) continue;
tszValue = TszFromSz(szValue, CP_UTF8);
- if (!tszValue) goto n;
+ if (!tszValue) goto c;
lviKey.mask = LVIF_TEXT;
lviKey.iItem = i;
@@ -89,7 +89,7 @@ DlvShowEpisode(int iEpisode)
ListView_SetItem(HDlv, &lviValue);
free(tszValue);
-n: free(tszKey);
+ c: free(tszKey);
}
}
diff --git a/c/defs.h b/c/defs.h
index 82bde40..ea1d776 100644
--- a/c/defs.h
+++ b/c/defs.h
@@ -30,8 +30,8 @@ void ElvUpdateName(LPLVITEM);
HWND DlvCreate();
void DlvShowEpisode(int);
-#define P(m,p,a,t) if (!PL_call_predicate(NULL, PL_Q_NORMAL, \
- PL_predicate(p,a,m), t))
+#define P(m,p,a,t) if (!PL_call_predicate(NULL, PL_Q_NORMAL, \
+ PL_predicate(p,a,m), t))
#define Q(m,p,a,t) PL_open_query(NULL, PL_Q_NORMAL, PL_predicate(p,a,m), t)
#define Qn(q) PL_next_solution(q)
#define Qc(q) PL_cut_query(q)
diff --git a/c/episodelistview.c b/c/episodelistview.c
index 074b459..b292725 100644
--- a/c/episodelistview.c
+++ b/c/episodelistview.c
@@ -169,14 +169,13 @@ ElvUpdate()
t2 = T(3);
PI(t2,i+1) return;
tszName = NULL;
- P("episode_data","lookup_episode_local",3,t2) goto skipname;
- GAC(t2+1,&szName) goto skipname;
+ P("episode_data","lookup_episode_local",3,t2) goto ep;
+ GAC(t2+1,&szName) goto ep;
tszName = TszFromSz(szName, CP_UTF8);
if (!tszName) return;
- /* Format episode string. */
-skipname:
- cb = 100;
+ /* Format episode number string. */
+ ep: cb = 100;
tszEpisode = malloc(cb*sizeof(TCHAR));
if (!tszEpisode) goto e;
_stprintf_s(tszEpisode, cb, TEXT("%d"), i+1);
@@ -197,7 +196,7 @@ skipname:
}
free(tszEpisode);
-e: if (tszName) free(tszName);
+ e: if (tszName) free(tszName);
}
/* Reset selection and scrolling position. */
diff --git a/c/listview.c b/c/listview.c
index 628ed13..a69ddf8 100644
--- a/c/listview.c
+++ b/c/listview.c
@@ -20,7 +20,7 @@ LvCreate(HMENU hMenu)
WC_LISTVIEW,
TEXT(""),
WS_CHILD|WS_VISIBLE|WS_VSCROLL|WS_TABSTOP
- |LVS_REPORT|LVS_NOSORTHEADER,
+ |LVS_REPORT|LVS_NOSORTHEADER,
0, 0, 0, 0,
HWnd, hMenu, GetModuleHandle(NULL), NULL
);
diff --git a/c/main.c b/c/main.c
index 5c705f0..6f8b834 100644
--- a/c/main.c
+++ b/c/main.c
@@ -20,7 +20,7 @@ static void UpdateTheme(void);
int WINAPI
WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
- LPSTR lpCmdLine, INT nCmdShow)
+ LPSTR lpCmdLine, INT nCmdShow)
{
char *argv[2];
HWND hWnd;