- 主题:[求助]菜鸟级的问题
我们站用的是kbs2.0,现在想从学校的公告页里截取公告发往bbs的某版,截取过滤部分都已经用c++另外写程序实现了,现在的困难是不知道如何实现自动发往bbs,请各位提点建议。
另外,我在程序里直接include "/路径/bbs.h"是无法编译的,肯定是少了很多关键编译环境参数,看了下自动生成的makefile,太复杂了,不知道哪些是关键?
--
FROM 219.133.176.*
有点担心php的效率和安全问题,要是被别人知道了脚本所在,狂触发它会塞爆服务器的吧?
【 在 pig2532 (猪猪猪) 的大作中提到: 】
: 不如用php写个发文脚本
: 然后wget之
--
FROM 219.133.176.*
谢谢指点,这个am和生成出来的东西,差异之大简直另人发指。。。
不过还是不明白应该copy哪些去我自己的头文件里呢。。。
CC="@LIBTOOL@"
CCLD="@CC@"
bin_PROGRAMS = poststat static usage Xhtml Bhtml listonline \
showBM idx0Ann lazybm fixdir autoundeny statBM gen_title \
find_rm_lost statguy autoclear showipdeny \
scanIP scanMODE listMODE ulevel \
mails genhot bonlinelog uonlinelog dayuserlog alluserlog \
gennewboard outdaybm process_invalid_mail bmerge rebuild_digest \
post_brdlog post_buse newpoststat genbplot sync_mailsize
EXTRA_DIST = urlencode.c
EXTRA_PROGRAMS =
LDADD=-lBBS -lsystem -L../libBBS -L../libsystem
AM_CFLAGS= -I$(top_srcdir)/src
CLEANFILES=@EXTRA_CLEAN@
【 在 fancyrabbit (兔兔猫★Initial F★屁股决定大脑) 的大作中提到: 】
: 看看 post_file 函数
: 你看看local_utl下的怎么编译的,看看 Makefile.am 就行了
: 实在不行你就丢到这下头编译
: ...................
--
修改:PowerRC FROM 219.133.176.*
FROM 219.133.176.*
谢谢各位大牛的指点。
【 在 fancyrabbit (兔兔猫★Initial F★屁股决定大脑) 的大作中提到: 】
: 嗯,一种方法就是bin_programs后头加你那个程序
: 我觉得简单,然后 make make install 到 $(BBSHOME)/bin下面了
: 或者你就手动 参数写上 -lBBS -lsystem -L../libBBS -L../libsystem,看到那行LDADD了吧。。。:)
: ...................
--
FROM 219.133.176.*
我快晕菜了。。。
Zpower# ./Makefilex
In file included from Lyinfo.cpp:21:
/home/kbs_bbs/src/bbs.h:105: error: expected identifier before "false"
/home/kbs_bbs/src/bbs.h:105: error: expected `}' before "false"
/home/kbs_bbs/src/bbs.h:105: error: expected unqualified-id before "false"
/home/kbs_bbs/src/bbs.h:105: error: expected declaration before '}' token
In file included from Lyinfo.cpp:21:
/home/kbs_bbs/src/bbs.h:104:1: unterminated #ifndef
/home/kbs_bbs/src/bbs.h:24:1: unterminated #ifndef
bbs.h:105是:
typedef enum { false = 0, true = 1 } bool;
--
FROM 219.133.176.*
我都没改动过bbs.h的啊。。。不过我是用g++编译的,难道不兼容?
bbs.h的94~115..
#ifndef DEBUG_MEMORY
#ifndef FREEBSD
#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif /* HAVE_MALLOC_H */
#endif /*FREEBSD*/
#else /* DEBUG_MEMOTY */
#include "mpatrol.h"
#endif /* DEBUG_MEMORY */
#ifndef HAVE_BOOL
typedef enum { false = 0, true = 1 } bool;
#else /* HAVE_BOOL */
#ifndef true
#define true 1
#endif /* true */
#ifndef false
#define false 0
#endif /* false */
【 在 JulyClyde (七月) 的大作中提到: 】
: 再上几行呢?
--
FROM 219.133.176.*
omg......难道我要另外在用c写个程序去调用我这个用cpp写的程序截取的内容来发帖?
早知道就用php好了,几个include就可以直接调用了。。。
【 在 atppp (Big Mouse) 的大作中提到: 】
: 用c,不要写cpp程序
--
FROM 219.133.176.*
我是学java入门编程的,所以理所当然的就用cpp....
【 在 atppp (Big Mouse) 的大作中提到: 】
: 就这么简单一个程序有必要用cpp么?
--
FROM 219.133.176.*
这个?
http://thread.gmane.org/gmane.comp.version-control.git/57643/focus=57918
From: Linus Torvalds <torvalds <at> linux-foundation.org>
Subject: Re: [RFC] Convert builin-mailinfo.c to use The Better String Library.
Newsgroups: gmane.comp.version-control.git
Date: 2007-09-06 17:50:28 GMT (6 days, 12 hours and 25 minutes ago)
On Wed, 5 Sep 2007, Dmitry Kakurin wrote:
>
> When I first looked at Git source code two things struck me as odd:
> 1. Pure C as opposed to C++. No idea why. Please don't talk about portability,
> it's BS.
*YOU* are full of bullshit.
C++ is a horrible language. It's made more horrible by the fact that a lot
of substandard programmers use it, to the point where it's much much
easier to generate total and utter crap with it. Quite frankly, even if
the choice of C were to do *nothing* but keep the C++ programmers out,
that in itself would be a huge reason to use C.
In other words: the choice of C is the only sane choice. I know Miles
Bader jokingly said "to piss you off", but it's actually true. I've come
to the conclusion that any programmer that would prefer the project to be
in C++ over C is likely a programmer that I really *would* prefer to piss
off, so that he doesn't come and screw up any project I'm involved with.
C++ leads to really really bad design choices. You invariably start using
the "nice" library features of the language like STL and Boost and other
total and utter crap, that may "help" you program, but causes:
- infinite amounts of pain when they don't work (and anybody who tells me
that STL and especially Boost are stable and portable is just so full
of BS that it's not even funny)
- inefficient abstracted programming models where two years down the road
you notice that some abstraction wasn't very efficient, but now all
your code depends on all the nice object models around it, and you
cannot fix it without rewriting your app.
In other words, the only way to do good, efficient, and system-level and
portable C++ ends up to limit yourself to all the things that are
basically available in C. And limiting your project to C means that people
don't screw that up, and also means that you get a lot of programmers that
do actually understand low-level issues and don't screw things up with any
idiotic "object model" crap.
So I'm sorry, but for something like git, where efficiency was a primary
objective, the "advantages" of C++ is just a huge mistake. The fact that
we also piss off people who cannot see that is just a big additional
advantage.
If you want a VCS that is written in C++, go play with Monotone. Really.
They use a "real database". They use "nice object-oriented libraries".
They use "nice C++ abstractions". And quite frankly, as a result of all
these design decisions that sound so appealing to some CS people, the end
result is a horrible and unmaintainable mess.
But I'm sure you'd like it more than git.
Linus
【 在 foxban (长白发了....) 的大作中提到: 】
: 再次看到了c和cpp的对峙...
: ms类unix开发,特别是系统开发人员从骨子里bs cpp...
: 最近看unix编程艺术得到的结论-_-
: ...................
--
FROM 219.133.176.*
嗯。
不过抓取和过滤处理我已经自己编程实现了,由socket开始写起的。
我还想写个类,专门封装所有kbs的发帖操作,不过看来工程浩大,所以我放弃了。
【 在 sxdxsimple (雾里龙虾) 的大作中提到: 】
: 我的意见是
: 隔1天wget抓一次
: 然后用C语言编译一个程序结合bash script写一个脚本
: ...................
--
FROM 219.133.176.*