Skip to content

Commit

Permalink
add view_user.c
Browse files Browse the repository at this point in the history
  • Loading branch information
marvelliu committed Sep 7, 2011
1 parent 0490a12 commit 3ef823f
Show file tree
Hide file tree
Showing 7 changed files with 187 additions and 113 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.o
*.lo
config.log
.libs
autom4te.cache/*
local_utl/Makefile.in
212 changes: 106 additions & 106 deletions autom4te.cache/requests

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions config.log
Original file line number Diff line number Diff line change
Expand Up @@ -4032,3 +4032,21 @@ target_vendor='redhat'
extern "C" void std::exit (int) throw (); using std::exit;

configure: exit 0

## ---------------------- ##
## Running config.status. ##
## ---------------------- ##

This file was extended by LilacBBS config.status 8.0, which was
generated by GNU Autoconf 2.59. Invocation command line was

CONFIG_FILES =
CONFIG_HEADERS =
CONFIG_LINKS =
CONFIG_COMMANDS =
$ ./config.status local_utl/Makefile depfiles

on lilacbbs.com

config.status:770: creating local_utl/Makefile
config.status:1568: executing depfiles commands
14 changes: 11 additions & 3 deletions local_utl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ bin_PROGRAMS = poststat$(EXEEXT) static$(EXEEXT) usage$(EXEEXT) \
post_buse$(EXEEXT) newpoststat$(EXEEXT) genbplot$(EXEEXT) \
sync_mailsize$(EXEEXT) refresh_reply$(EXEEXT) \
fix_sysop$(EXEEXT) test$(EXEEXT) calculate_scores$(EXEEXT) \
boardhot$(EXEEXT)
boardhot$(EXEEXT) view_user$(EXEEXT)
EXTRA_PROGRAMS =
subdir = local_utl
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
Expand Down Expand Up @@ -249,6 +249,10 @@ usage_SOURCES = usage.c
usage_OBJECTS = usage.$(OBJEXT)
usage_LDADD = $(LDADD)
usage_DEPENDENCIES =
view_user_SOURCES = view_user.c
view_user_OBJECTS = view_user.$(OBJEXT)
view_user_LDADD = $(LDADD)
view_user_DEPENDENCIES =
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
Expand All @@ -268,7 +272,7 @@ SOURCES = Bhtml.c Xhtml.c alluserlog.c autoclear.c autoundeny.c \
process_invalid_mail.c rebuild_digest.c refresh_reply.c \
scanIP.c scanMODE.c showBM.c showipdeny.c statBM.c statguy.c \
static.c sync_mailsize.c test.c ulevel.c ultimate_search.c \
uonlinelog.c usage.c
uonlinelog.c usage.c view_user.c
DIST_SOURCES = Bhtml.c Xhtml.c alluserlog.c autoclear.c autoundeny.c \
blogstat.c bmerge.c boardhot.c bonlinelog.c calculate_scores.c \
dayuserlog.c dump_user_title.c find_rm_lost.c fix_sysop.c \
Expand All @@ -278,7 +282,7 @@ DIST_SOURCES = Bhtml.c Xhtml.c alluserlog.c autoclear.c autoundeny.c \
process_invalid_mail.c rebuild_digest.c refresh_reply.c \
scanIP.c scanMODE.c showBM.c showipdeny.c statBM.c statguy.c \
static.c sync_mailsize.c test.c ulevel.c ultimate_search.c \
uonlinelog.c usage.c
uonlinelog.c usage.c view_user.c
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
Expand Down Expand Up @@ -608,6 +612,9 @@ uonlinelog$(EXEEXT): $(uonlinelog_OBJECTS) $(uonlinelog_DEPENDENCIES)
usage$(EXEEXT): $(usage_OBJECTS) $(usage_DEPENDENCIES)
@rm -f usage$(EXEEXT)
$(LINK) $(usage_LDFLAGS) $(usage_OBJECTS) $(usage_LDADD) $(LIBS)
view_user$(EXEEXT): $(view_user_OBJECTS) $(view_user_DEPENDENCIES)
@rm -f view_user$(EXEEXT)
$(LINK) $(view_user_LDFLAGS) $(view_user_OBJECTS) $(view_user_LDADD) $(LIBS)

mostlyclean-compile:
-rm -f *.$(OBJEXT)
Expand Down Expand Up @@ -660,6 +667,7 @@ include ./$(DEPDIR)/ulevel.Po
include ./$(DEPDIR)/ultimate_search.Po
include ./$(DEPDIR)/uonlinelog.Po
include ./$(DEPDIR)/usage.Po
include ./$(DEPDIR)/view_user.Po

.c.o:
if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
Expand Down
2 changes: 1 addition & 1 deletion local_utl/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ bin_PROGRAMS = poststat static usage Xhtml Bhtml listonline \
mails genhot bonlinelog uonlinelog dayuserlog alluserlog \
gennewboard outdaybm process_invalid_mail bmerge rebuild_digest \
post_brdlog post_buse newpoststat genbplot sync_mailsize \
refresh_reply fix_sysop test calculate_scores boardhot
refresh_reply fix_sysop test calculate_scores boardhot view_user

EXTRA_DIST = urlencode.c
EXTRA_PROGRAMS =
Expand Down
14 changes: 11 additions & 3 deletions local_utl/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ bin_PROGRAMS = poststat$(EXEEXT) static$(EXEEXT) usage$(EXEEXT) \
post_buse$(EXEEXT) newpoststat$(EXEEXT) genbplot$(EXEEXT) \
sync_mailsize$(EXEEXT) refresh_reply$(EXEEXT) \
fix_sysop$(EXEEXT) test$(EXEEXT) calculate_scores$(EXEEXT) \
boardhot$(EXEEXT)
boardhot$(EXEEXT) view_user$(EXEEXT)
EXTRA_PROGRAMS =
subdir = local_utl
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
Expand Down Expand Up @@ -249,6 +249,10 @@ usage_SOURCES = usage.c
usage_OBJECTS = usage.$(OBJEXT)
usage_LDADD = $(LDADD)
usage_DEPENDENCIES =
view_user_SOURCES = view_user.c
view_user_OBJECTS = view_user.$(OBJEXT)
view_user_LDADD = $(LDADD)
view_user_DEPENDENCIES =
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
Expand All @@ -268,7 +272,7 @@ SOURCES = Bhtml.c Xhtml.c alluserlog.c autoclear.c autoundeny.c \
process_invalid_mail.c rebuild_digest.c refresh_reply.c \
scanIP.c scanMODE.c showBM.c showipdeny.c statBM.c statguy.c \
static.c sync_mailsize.c test.c ulevel.c ultimate_search.c \
uonlinelog.c usage.c
uonlinelog.c usage.c view_user.c
DIST_SOURCES = Bhtml.c Xhtml.c alluserlog.c autoclear.c autoundeny.c \
blogstat.c bmerge.c boardhot.c bonlinelog.c calculate_scores.c \
dayuserlog.c dump_user_title.c find_rm_lost.c fix_sysop.c \
Expand All @@ -278,7 +282,7 @@ DIST_SOURCES = Bhtml.c Xhtml.c alluserlog.c autoclear.c autoundeny.c \
process_invalid_mail.c rebuild_digest.c refresh_reply.c \
scanIP.c scanMODE.c showBM.c showipdeny.c statBM.c statguy.c \
static.c sync_mailsize.c test.c ulevel.c ultimate_search.c \
uonlinelog.c usage.c
uonlinelog.c usage.c view_user.c
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
Expand Down Expand Up @@ -608,6 +612,9 @@ uonlinelog$(EXEEXT): $(uonlinelog_OBJECTS) $(uonlinelog_DEPENDENCIES)
usage$(EXEEXT): $(usage_OBJECTS) $(usage_DEPENDENCIES)
@rm -f usage$(EXEEXT)
$(LINK) $(usage_LDFLAGS) $(usage_OBJECTS) $(usage_LDADD) $(LIBS)
view_user$(EXEEXT): $(view_user_OBJECTS) $(view_user_DEPENDENCIES)
@rm -f view_user$(EXEEXT)
$(LINK) $(view_user_LDFLAGS) $(view_user_OBJECTS) $(view_user_LDADD) $(LIBS)

mostlyclean-compile:
-rm -f *.$(OBJEXT)
Expand Down Expand Up @@ -660,6 +667,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ultimate_search.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uonlinelog.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/usage.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/view_user.Po@am__quote@

.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
Expand Down
34 changes: 34 additions & 0 deletions local_utl/view_user.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/* etnlegend, 2006.09.10, µ¼³öÓû§Éí·ÝÉ趨Êý¾Ý... */
#include "bbs.h"


int main(int argc, char **argv){
struct userec* user;
struct userdata ud;

if(chdir(BBSHOME)==-1)
{
printf("unable to chdir %s\n", BBSHOME);
return -1;
}
resolve_ucache();


char* userid = argv[1];
if(!getuser(userid, &user)){
fprintf(stderr, "%s\n", "locate specified user ...");
return -1;
}
read_userdata(userid, &ud);


fprintf(stdout,"%s\n","---- Current User Title Configuration ----");
printf("userid:%s\n", userid);
printf("realname:%s\n", ud.realname);
printf("email:%s\n", ud.email);
printf("reg_email:%s\n", ud.reg_email);

fprintf(stdout,"\n%s\n","------------------------------------------");
return 0;
}

0 comments on commit 3ef823f

Please sign in to comment.