Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Annoying Bits...

Name: Anonymous 2012-08-21 18:28

Files like following are annoying.

/***************************************************************************
 *   Copyright (C) 2007 Ryan Schultz, PCSX-df Team, PCSX team              *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA.           *
 ***************************************************************************/

/*
* Sound (SPU) functions.
*/

#include "spu.h"

void CALLBACK SPUirq(void) {
    psxHu32ref(0x1070) |= SWAPu32(0x200);
}

Name: Anonymous 2012-08-21 18:29

>>1
why didnt they included a complete GPL license here?

Name: Anonymous 2012-08-21 18:32

>>2
It's unnecessary when it's included in the COPYING file.

Name: Anonymous 2012-08-21 18:36

>>1
Why did they waste a whole file for a single one-line function?

Name: Anonymous 2012-08-21 19:06

>>4
The function clearly takes 3 lines.

Name: Anonymous 2012-08-21 19:19

>>4,5
It clearly takes 5, retards. Didn't you notice the blank lines before and after it?

Name: Anonymous 2012-08-21 19:33

>>4
Because it is C/C++. You can leave a CALLBACK function in header.

Name: Anonymous 2012-08-21 19:51

This is why I encourage putting everything in one file. Vim folds are really a better way of organizing stuff for mid-size projects. Eliminates the need for linker bullshit.

Name: Anonymous 2012-08-21 20:02

>>8
I keep my mid-size projects in multiple files and I just do the #includes in the right order.

That way I don't have to deal with linkers because I only need to do gcc *.c *.h and everything stays tidy.

Name: Anonymous 2012-08-22 1:00

>>9
gcc (...) *.h
ihbt

Name: Anonymous 2012-08-22 2:43

>le me coding in C like a boss
>when suddenly a wild segmentation fault appears
>FFFFFUUUUUUUUUUUUUUUUU

Name: Anonymous 2012-08-22 4:14

>>3
FreeBSD does this right: single line comments in every file with a magic marker, like

/*! Copyright (C) 1970 - 2038 Acme Corp.  Legal mumbo jumbo */

If you want to change the (short) boilerplate, you just run a script.

>>9
Really short compilation units still show up in static libraries where you may only want to grab one or two functions at a time.  The real solution is to use a compiler that can place each symbol in its own section for the linker.

Name: Anonymous 2012-08-22 10:00

I feel being raped by the GPL.

And then goes this

#ifdef __cplusplus
extern "C" {
#endif


[code]
/*  PPF Patch Support for PCSX-Reloaded
 *  Copyright (c) 2009, Wei Mingzhi <whistler_wmz@users.sf.net>.
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA
 */

#ifndef __PPF_H__
#define __PPF_H__

#ifdef __cplusplus
extern "C" {
#endif

void BuildPPFCache();
void FreePPFCache();
void CheckPPFCache(unsigned char *pB, unsigned char m, unsigned char s, unsigned char f);

#ifdef __cplusplus
}
#endif
#endif
[/cpde]

Name: Anonymous 2012-08-22 12:21

This is why I encourage putting everything in one line. Vim line splits are really a better way of organizing stuff for mid-size projects. Eliminates the need for bullshit.

Name: Anonymous 2012-08-22 14:13

>>10
You know what I meant.

Basically, my makefile is just one instruction that tells shitcc to compile everything in the folder.

No need for linking bullshit.

Don't change these.
Name: Email:
Entire Thread Thread List