Skip to content

Commit

Permalink
remove using namespace std - its wrong!
Browse files Browse the repository at this point in the history
  • Loading branch information
newdigate committed Dec 16, 2023
1 parent cbe3100 commit 13d6115
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
12 changes: 6 additions & 6 deletions extras/soundio/save_raw/save_raw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ void my_handler(sig_atomic_t i){
printf("Caught signal %d\n",i);
} else
{
cerr << "sig seg fault handler" << endl;
std::cerr << "sig seg fault handler" << std::endl;
const int asize = 10;
void *array[asize];
size_t size;
Expand All @@ -133,15 +133,15 @@ void my_handler(sig_atomic_t i){
size = backtrace(array, asize);

// print out all the frames to stderr
cerr << "stack trace: " << endl;
std::cerr << "stack trace: " << std::endl;
backtrace_symbols_fd(array, size, STDERR_FILENO);
cerr << "resend SIGSEGV to get core dump" << endl;
std::cerr << "resend SIGSEGV to get core dump" << std::endl;
signal(i, SIG_DFL);
kill(getpid(), i);
}
}
void crash_handler(sig_atomic_t i){
cerr << "sig seg fault handler" << endl;
std::cerr << "sig seg fault handler" << std::endl;
const int asize = 10;
void *array[asize];
size_t size;
Expand All @@ -150,9 +150,9 @@ void crash_handler(sig_atomic_t i){
size = backtrace(array, asize);

// print out all the frames to stderr
cerr << "stack trace: " << endl;
std::cerr << "stack trace: " << std::endl;
backtrace_symbols_fd(array, size, STDERR_FILENO);
cerr << "resend SIGSEGV to get core dump" << endl;
std::cerr << "resend SIGSEGV to get core dump" << std::endl;
signal(i, SIG_DFL);
kill(getpid(), i);
}
Expand Down
12 changes: 6 additions & 6 deletions extras/soundio/save_raw_sd/save_raw_sd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ void my_handler(sig_atomic_t i){
printf("Caught signal %d\n",i);
} else
{
cerr << "sig seg fault handler" << endl;
std::cerr << "sig seg fault handler" << std::endl;
const int asize = 10;
void *array[asize];
size_t size;
Expand All @@ -142,15 +142,15 @@ void my_handler(sig_atomic_t i){
size = backtrace(array, asize);

// print out all the frames to stderr
cerr << "stack trace: " << endl;
std::cerr << "stack trace: " << std::endl;
backtrace_symbols_fd(array, size, STDERR_FILENO);
cerr << "resend SIGSEGV to get core dump" << endl;
std::cerr << "resend SIGSEGV to get core dump" << std::endl;
signal(i, SIG_DFL);
kill(getpid(), i);
}
}
void crash_handler(sig_atomic_t i){
cerr << "sig seg fault handler" << endl;
std::cerr << "sig seg fault handler" << std::endl;
const int asize = 10;
void *array[asize];
size_t size;
Expand All @@ -159,9 +159,9 @@ void crash_handler(sig_atomic_t i){
size = backtrace(array, asize);

// print out all the frames to stderr
cerr << "stack trace: " << endl;
std::cerr << "stack trace: " << std::endl;
backtrace_symbols_fd(array, size, STDERR_FILENO);
cerr << "resend SIGSEGV to get core dump" << endl;
std::cerr << "resend SIGSEGV to get core dump" << std::endl;
signal(i, SIG_DFL);
kill(getpid(), i);
}
Expand Down
12 changes: 6 additions & 6 deletions extras/soundio/save_wav/save_wav.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ void my_handler(sig_atomic_t i){
printf("Caught signal %d\n",i);
} else
{
cerr << "sig seg fault handler" << endl;
std::cerr << "sig seg fault handler" << std::endl;
const int asize = 10;
void *array[asize];
size_t size;
Expand All @@ -127,15 +127,15 @@ void my_handler(sig_atomic_t i){
size = backtrace(array, asize);

// print out all the frames to stderr
cerr << "stack trace: " << endl;
std::cerr << "stack trace: " << std::endl;
backtrace_symbols_fd(array, size, STDERR_FILENO);
cerr << "resend SIGSEGV to get core dump" << endl;
std::cerr << "resend SIGSEGV to get core dump" << std::endl;
signal(i, SIG_DFL);
kill(getpid(), i);
}
}
void crash_handler(sig_atomic_t i){
cerr << "sig seg fault handler" << endl;
std::cerr << "sig seg fault handler" << std::endl;
const int asize = 10;
void *array[asize];
size_t size;
Expand All @@ -144,9 +144,9 @@ void crash_handler(sig_atomic_t i){
size = backtrace(array, asize);

// print out all the frames to stderr
cerr << "stack trace: " << endl;
std::cerr << "stack trace: " << std::endl;
backtrace_symbols_fd(array, size, STDERR_FILENO);
cerr << "resend SIGSEGV to get core dump" << endl;
std::cerr << "resend SIGSEGV to get core dump" << std::endl;
signal(i, SIG_DFL);
kill(getpid(), i);
}
12 changes: 6 additions & 6 deletions extras/soundio/sd_play_all/sd_play_all.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ void my_handler(sig_atomic_t i){
printf("Caught signal %d\n",i);
} else
{
cerr << "sig seg fault handler" << endl;
std::cerr << "sig seg fault handler" << std::endl;
const int asize = 10;
void *array[asize];
size_t size;
Expand All @@ -225,15 +225,15 @@ void my_handler(sig_atomic_t i){
size = backtrace(array, asize);

// print out all the frames to stderr
cerr << "stack trace: " << endl;
std::cerr << "stack trace: " << std::endl;
backtrace_symbols_fd(array, size, STDERR_FILENO);
cerr << "resend SIGSEGV to get core dump" << endl;
std::cerr << "resend SIGSEGV to get core dump" << std::endl;
signal(i, SIG_DFL);
kill(getpid(), i);
}
}
void crash_handler(sig_atomic_t i){
cerr << "sig seg fault handler" << endl;
std::cerr << "sig seg fault handler" << std::endl;
const int asize = 10;
void *array[asize];
size_t size;
Expand All @@ -242,9 +242,9 @@ void crash_handler(sig_atomic_t i){
size = backtrace(array, asize);

// print out all the frames to stderr
cerr << "stack trace: " << endl;
std::cerr << "stack trace: " << std::endl;
backtrace_symbols_fd(array, size, STDERR_FILENO);
cerr << "resend SIGSEGV to get core dump" << endl;
std::cerr << "resend SIGSEGV to get core dump" << std::endl;
signal(i, SIG_DFL);
kill(getpid(), i);
}
Expand Down

0 comments on commit 13d6115

Please sign in to comment.