'Programming'에 해당되는 글 1789건

  1. 2015.07.07 가변인자를 다시 넘겨주기 2
  2. 2015.06.24 std::endl
  3. 2015.06.18 printf 가변인자의 비밀?
  4. 2015.06.13 fasm / nasm / masm
  5. 2015.06.11 어셈블리 관련
  6. 2015.05.19 gcc 컴파일러 -D 옵션
  7. 2015.05.19 setjmp, longjmp
  8. 2015.05.19 코딩 룰 & 정적분석 툴
  9. 2015.05.12 자바 임베디드 JRE 라이센스?
  10. 2015.05.12 inline 함수..
Programming/C Win32 MFC2015. 7. 7. 13:45

현실적으로 불가능 -_-

다만 vsprintf 는 인자를 받으므로 인자를 이용해서 다시 문자열을 생성하는 식으로 쓸 수는 있음


[링크 : http://stackoverflow.com/questions/2060578/is-it-possible-to-write-a-varargs-function-that-sends-it-argument-list-to-anothe]


#include <stdio.h>

int printf(const char *format, ...);

int fprintf(FILE *stream, const char *format, ...);

int sprintf(char *str, const char *format, ...);

int snprintf(char *str, size_t size, const char *format, ...);


#include <stdarg.h>

int vprintf(const char *format, va_list ap);

int vfprintf(FILE *stream, const char *format, va_list ap);

int vsprintf(char *str, const char *format, va_list ap);

int vsnprintf(char *str, size_t size, const char *format, va_list ap);


[링크 : http://linux.die.net/man/3/vsprintf] 


'Programming > C Win32 MFC' 카테고리의 다른 글

Cppcheck  (0) 2015.09.30
void형 포인터 ++  (0) 2015.07.14
printf 가변인자의 비밀?  (0) 2015.06.18
gcc 컴파일러 -D 옵션  (0) 2015.05.19
setjmp, longjmp  (0) 2015.05.19
Posted by 구차니
Programming/C++ STL2015. 6. 24. 19:03

'\n' + fflush(stdout) 이라고 하면 되려나?


[링크 : http://www.cplusplus.com/reference/ostream/endl/]

[링크 : http://stackoverflow.com/questions/213907/c-stdendl-vs-n]

'Programming > C++ STL' 카테고리의 다른 글

cpp const  (0) 2016.06.22
const 멤버 변수 초기화(member variable initializer)  (0) 2016.06.22
c++ 현변환 연산자(cast operator in c++)  (0) 2015.01.26
functor / 펑터  (0) 2014.04.16
cpp static 변수 및 메소드  (0) 2014.03.18
Posted by 구차니
Programming/C Win32 MFC2015. 6. 18. 15:03

느낌적인 느낌으로는 가변인자는 가장 큰 변수형인 void 형을 취할테니..

printf 함수에서 %f를 double로 처리하면서 float에서는 오류가 발생하는 느낌?


아무튼.. 먼가 미묘한 작동을 하네..


[링크 : http://stackoverflow.com/questions/7295066/using-printf-to-print-out-floating-values]

[링크 : http://todayhumor.com/?programmer_11386]

'Programming > C Win32 MFC' 카테고리의 다른 글

void형 포인터 ++  (0) 2015.07.14
가변인자를 다시 넘겨주기  (2) 2015.07.07
gcc 컴파일러 -D 옵션  (0) 2015.05.19
setjmp, longjmp  (0) 2015.05.19
inline 함수..  (0) 2015.05.12
Posted by 구차니

Microsoft Macro ASseMbler

masm (16/32bit) / ml64 (64bit)

[링크 : https://en.wikipedia.org/wiki/Microsoft_Macro_Assembler]

[링크 : https://msdn.microsoft.com/en-us/library/afzk3475.aspx]


nasm

Netwide Assembler

[링크 : http://www.nasm.us/]

[링크 : https://en.wikipedia.org/wiki/Netwide_Assembler]


fasm

[링크 : http://flatassembler.net/]

[링크 : https://en.wikipedia.org/wiki/FASM]




[링크 : http://blog.naver.com/asmpro/220205244661]


'Programming > Assembly(어셈블리)' 카테고리의 다른 글

.text .data .code .bss ...  (0) 2016.02.19
어셈블리 관련  (0) 2015.06.11
ia32 어셈블리 언어  (0) 2013.12.12
.DATA? 지시어  (0) 2011.07.31
x86 register  (2) 2011.07.17
Posted by 구차니

다시 한번 도전!!! 해봐야지 ㅠㅠ


[링크 : http://todayhumor.com/?programmer_5407]

[링크 : http://stackoverflow.com/questions/8304914/difference-between-dword-ptr-and-dword-ptres]

[링크 : http://en.wikipedia.org/wiki/LOADALL]

[링크 : http://bbolmin.tistory.com/82]

'Programming > Assembly(어셈블리)' 카테고리의 다른 글

.text .data .code .bss ...  (0) 2016.02.19
fasm / nasm / masm  (0) 2015.06.13
ia32 어셈블리 언어  (0) 2013.12.12
.DATA? 지시어  (0) 2011.07.31
x86 register  (2) 2011.07.17
Posted by 구차니
Programming/C Win32 MFC2015. 5. 19. 14:35

배치빌드 하거나 할 경우 유용하게 쓰이는 옵션


-D name

Predefine name as a macro, with definition 1. 


-D name=definition

The contents of definition are tokenized and processed as if they appeared during translation phase three in a ‘#define’ directive. In particular, the definition will be truncated by embedded newline characters.

If you are invoking the preprocessor from a shell or shell-like program you may need to use the shell's quoting syntax to protect characters such as spaces that have a meaning in the shell syntax.


If you wish to define a function-like macro on the command line, write its argument list with surrounding parentheses before the equals sign (if any). Parentheses are meaningful to most shells, so you will need to quote the option. With sh and csh, -D'name(args...)=definition' works.


-D and -U options are processed in the order they are given on the command line. All -imacros file and -include file options are processed after all -D and -U options. 


-U name

Cancel any previous definition of name, either built in or provided with a -D option. 


-undef

Do not predefine any system-specific or GCC-specific macros. The standard predefined macros remain defined. 


[링크 : https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html] 


+

Visual studio에서는 /D로 적용된다.

[링크 : https://msdn.microsoft.com/ko-kr/library/teas0593.aspx]

'Programming > C Win32 MFC' 카테고리의 다른 글

가변인자를 다시 넘겨주기  (2) 2015.07.07
printf 가변인자의 비밀?  (0) 2015.06.18
setjmp, longjmp  (0) 2015.05.19
inline 함수..  (0) 2015.05.12
혼돈의 카오스 - 교차참조 헤더  (0) 2015.05.11
Posted by 구차니
Programming/C Win32 MFC2015. 5. 19. 10:03

setjmp와 longjmp는 함수를 넘나드는(다른 파일도 되려나?) 점프인데

goto 보다 더 위험한(!) 놈이라 잘 쓰지 않도록 되어 있는 것으로 보인다.

게다가 순수 C 구현이 아닌 OS 지원을 받는 넘이라 시스템 별로 다르게 작동 할지도 모른다고 ㄷㄷㄷ


코드로는 jmp_buf 는 점프할 지점을 저장하는 것이고

sizeof로 해보니 200을 뱉어낸다 ㄷㄷ (Ubuntu 12.04 64bit Edition)

PC(Program Counter) 뿐만 아니라 스택을 저장하는 거라 그런가?


코드상으로는 main()의 setjmp를 수행하는 지점이 돌아올 지점이고
longjmp에서 setjmp로 점프!
여러개의 setjmp로 여러 포인트를 잡아놓고
longjmp로 왔다 갔다 가능해 보이긴 하지만.. 까다로울 듯?

$ cat test.c

#include <stdio.h>

#include <setjmp.h>


jmp_buf pos;


void proc()

{

   static int i = 0;


   ++i;

   if(i<10)

       longjmp(pos, i);


   return;

}


int main()

{

   int a;


   a = setjmp(pos);

   printf("%d\n", a);

   proc();

   return 0;

}


[링크 : http://www.jiniya.net/wp/archives/5030]

[링크 : http://egloos.zum.com/studyfoss/v/5275830]


$ ./a.out
0
1
2
3
4
5
6
7
8
9



#include <setjmp.h>

int setjmp(jmp_buf env);

void longjmp(jmp_buf env, int val);


[링크 : http://linux.die.net/man/3/setjmp]

[링크 : http://linux.die.net/man/3/longjmp] 



'Programming > C Win32 MFC' 카테고리의 다른 글

printf 가변인자의 비밀?  (0) 2015.06.18
gcc 컴파일러 -D 옵션  (0) 2015.05.19
inline 함수..  (0) 2015.05.12
혼돈의 카오스 - 교차참조 헤더  (0) 2015.05.11
#ifdef 와 #ifdef ()의 차이  (0) 2015.04.13
Posted by 구차니



[링크 : http://www.oss.kr/oss_repository6/69515] 정적 분석 툴(오픈소스)

[링크 : http://biglook.tistory.com/16] 행정안전부 JAVA/C 코딩 룰

Posted by 구차니
Programming/Java2015. 5. 12. 16:19

문득 수다 떨다가 검색 -_-

야이!!! FXXKIING 오라클!!!


Is Java still free?

The current version of Java - Java SE 8 - is free and available for redistribution for general purpose computing. Java SE continues to be available under the Oracle Binary Code License (BCL) free of charge. JRE use for embedded devices and other computing environments may require a license fee from Oracle. Read more about embedded use of Java SE or contact your local Oracle sales representative to obtain a license.

[링크 : http://www.oracle.com/technetwork/articles/javase/faqs-jsp-136696.html]


So What Does Java SE-Embedded Cost?


The universal answer to such a question is: it depends.  That is to say it depends upon the capability of the embedded processor.  Before we lose you, let's show the list price for Java embedded licensing associated with three platforms and then explain how we arrived at the numbers.  As of the posting of this entry, 06 December, 2013, here they are:


Per-unit cost for a Raspberry Pi: US $0.71

Per-unit cost for system based on Intel Atom Z510P: US $2.68

Per-unit cost for a Compulab Trim-Slice: US $5.36

[링크 : https://blogs.oracle.com/jtc/entry/java_embedded_pricing_publicly_available]

'Programming > Java' 카테고리의 다른 글

Java SE 8 설치해보려고 했더니..  (2) 2019.01.03
자바 유료화?  (10) 2018.11.05
predefined annotation /java  (0) 2014.06.27
JUnit tutorial  (0) 2014.06.27
java unchecked/checked exception  (0) 2014.05.15
Posted by 구차니
Programming/C Win32 MFC2015. 5. 12. 14:44

프로젝트에서 inline 함수를 다른 파일로 뺴서 하니

없는 함수라고 배째는 현상 발생 -_-


일단 __inline 키워드 빼니 해결되긴 한데..

extern __inline 이렇게 안해줘서 그런가?


[링크 : http://stackoverflow.com/questions/5229343/how-to-declare-an-inline-function-in-c99-multi-file-project]


KEIL

[링크 : http://www.keil.com/forum/13177/]

'Programming > C Win32 MFC' 카테고리의 다른 글

gcc 컴파일러 -D 옵션  (0) 2015.05.19
setjmp, longjmp  (0) 2015.05.19
혼돈의 카오스 - 교차참조 헤더  (0) 2015.05.11
#ifdef 와 #ifdef ()의 차이  (0) 2015.04.13
winUSB / win32 physical drive  (0) 2014.12.23
Posted by 구차니