Skip to content

Commit f3e35bd

Browse files
committed
svnbrowse: Rename svn_browse__ctx_t to svn_browse__model_t so we can use the
model/view pattern where the model is responsible for data and view does the rendering stuff. The list, state, path, and even selection with scroller would belong to the model. All interactions with curses is what view is responsible for. * subversion/svnbrowse/svnbrowse.c (svn_browse__ctx_t): rename... (svn_browse__model_t): ...to this (everywhere): adjust references git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1932718 13f79535-47bb-0310-9956-ffa450edef68
1 parent 6f4e6d2 commit f3e35bd

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

subversion/svnbrowse/svnbrowse.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,18 @@ typedef struct svn_browse__state_t {
5858
apr_pool_t *pool;
5959
} svn_browse__state_t;
6060

61-
typedef struct svn_browse__ctx_t {
61+
typedef struct svn_browse__model_t {
6262
const char *root;
6363
svn_opt_revision_t revision;
6464

6565
svn_client_ctx_t *client;
6666

6767
svn_browse__state_t *current;
6868
apr_pool_t *pool;
69-
} svn_browse__ctx_t;
69+
} svn_browse__model_t;
7070

7171
static svn_error_t *
72-
init_client(svn_browse__ctx_t *ctx, apr_pool_t *pool)
72+
init_client(svn_browse__model_t *ctx, apr_pool_t *pool)
7373
{
7474
svn_auth_baton_t *auth;
7575

@@ -105,7 +105,7 @@ list_cb(void *baton,
105105

106106
static svn_error_t *
107107
state_create(svn_browse__state_t **state_p,
108-
svn_browse__ctx_t *ctx,
108+
svn_browse__model_t *ctx,
109109
const char *relpath,
110110
apr_pool_t *result_pool,
111111
apr_pool_t *scratch_pool)
@@ -129,7 +129,7 @@ state_create(svn_browse__state_t **state_p,
129129
}
130130

131131
static svn_error_t *
132-
enter_path(svn_browse__ctx_t *ctx, const char *relpath,
132+
enter_path(svn_browse__model_t *ctx, const char *relpath,
133133
apr_pool_t *scratch_pool)
134134
{
135135
svn_browse__state_t *newstate;
@@ -145,7 +145,7 @@ enter_path(svn_browse__ctx_t *ctx, const char *relpath,
145145
}
146146

147147
static void
148-
ui_draw(svn_browse__ctx_t *ctx, apr_pool_t *pool)
148+
ui_draw(svn_browse__model_t *ctx, apr_pool_t *pool)
149149
{
150150
int i;
151151
const char *abspath = svn_path_url_add_component2(ctx->root,
@@ -184,7 +184,7 @@ ui_draw(svn_browse__ctx_t *ctx, apr_pool_t *pool)
184184
static svn_error_t *
185185
sub_main(int *code, int argc, char *argv[], apr_pool_t *pool)
186186
{
187-
svn_browse__ctx_t ctx = { 0 };
187+
svn_browse__model_t ctx = { 0 };
188188
apr_pool_t *iterpool;
189189

190190
if (argc != 2)

0 commit comments

Comments
 (0)