summaryrefslogtreecommitdiffstats
path: root/articles.c
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2015-02-17 15:15:26 +0900
committerFreeArtMan <dos21h@gmail.com>2015-02-17 15:15:26 +0900
commitc1e6c1341ace1f61569e6d1d0dbfb36cb192113c (patch)
tree9fc23f173342a680333825bc8300cad422ba99a5 /articles.c
parent3090282601248d3ce5f91cbddeb450d744b27472 (diff)
downloadmicrobbs-c1e6c1341ace1f61569e6d1d0dbfb36cb192113c.tar.gz
microbbs-c1e6c1341ace1f61569e6d1d0dbfb36cb192113c.zip
Updated libterm. Updated config headers
Diffstat (limited to 'articles.c')
-rw-r--r--articles.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/articles.c b/articles.c
index 7db8b39..a5c196b 100644
--- a/articles.c
+++ b/articles.c
@@ -135,6 +135,7 @@ int bbs_article_list( term_screen *ts, const char *dir_name )
int cnt;
for ( cnt=0; cnt<n; cnt++)
{
+ //create full pathname to file put it in pathname
sds d_name = sds_new( eps[cnt]->d_name );
sds pathname = sds_new( dir_name );
pathname = sds_cat( pathname, d_name );
@@ -199,8 +200,13 @@ int bbs_article_list( term_screen *ts, const char *dir_name )
int cnt = 1;
while (iter != NULL)
{
+ struct stat art_stat;
+
term_cur_set_c( ts, 0 );
- printf( "[%02d] %s\n", cnt, (char *)iter->val);
+ //get stat structure and get filesize
+
+ stat( iter->val, &art_stat );//no err check
+ printf( "[%02d] %s ( %ld bytes)\n", cnt, (char *)iter->val, art_stat.st_size );
cnt += 1;
iter = iter->next;
}